Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

standalone mode, whiptail interface, userdefined classes and user customization #105

Merged
merged 6 commits into from
Jun 27, 2024

Conversation

insatomcat
Copy link
Member

@insatomcat insatomcat commented Jun 11, 2024

In order to add a standalone mode, we split the SEAPATH_HOST class into 2 :

  • SEAPATH_HOST package_config will contain packages that are needed by all host installations, standalone or cluster node
  • SEAPATH_CLUSTER will contain the packages needed for cluster mode.

We now need a way to have the user select more easily the classes he wants in his iso and the grub menu items he needs.

For that I propose a Text User Interface using whiptail (will work over ssh, docker, etc.). With this interface the user will be able to :

  • choose the package classes he wants to download/have in the local mirror of the iso file (that way he can reduce the size of the iso file and the time it takes to build)
  • choose the precise list of grub menu options he wants

He will need to call ./build_debian_iso with the "--custom" command line argument.
Not calling the argument will launch with defaults (all classes downloaded, and only one grub option with clustermode/lvmraid/english/no_debug/no_kerberos/no_cockpit)


As a proof this will simplify the adding of classes, the second commit adds a class for german keyboard layout.


Guest Disk config: rename vg1 to vg2

It can be useful to be able to mount the guest filesystem in the host (to check on disk usage for example, or to repair something). LVM will choke if we have 2 volume groups with the same name on the same system. To solve this, since the host will still use "vg1", we rename the guest VG to "vg2".


Add the USERCUSTOMIZATION class to facilitate user configuration

This commits splits the base hierarchy into 3:

  • srv_fai_config is still the default SEAPATH configuration
  • usercustomization is the same hierarchy but git will not track it, and the user can put custom files in it
  • build_tmp is a temporary folder where the installer will merge srv_fai_config and userconfiguration just before merging

srv_fai_config also includes now the new USERCUSTOMIZATION class, so that the files in the usercustomization/ folder can implement this class and override/add any setting.


Allows userdefined classes

With this commit the user can add his own classes by:

  • adding the class in the user_classes.conf file
  • dealing with a numbered script in usercustomization/class/ folder (for example usercustomization/class/99-custom, chmod 755) to use the class
  • adding all the files related to the classes in the usercustomization hierarchy

@insatomcat insatomcat force-pushed the whiptail branch 17 times, most recently from 80135ab to 737e2c1 Compare June 12, 2024 12:28
@insatomcat insatomcat requested a review from eroussy June 12, 2024 12:28
@insatomcat insatomcat marked this pull request as ready for review June 12, 2024 12:29
@insatomcat insatomcat force-pushed the whiptail branch 4 times, most recently from af33323 to cac935c Compare June 12, 2024 13:54
@insatomcat insatomcat changed the title whiptail interface, standalone mode... standalone mode and whiptail customization interface Jun 12, 2024
@insatomcat insatomcat force-pushed the whiptail branch 3 times, most recently from 1154d81 to 1867f1f Compare June 14, 2024 16:54
@insatomcat insatomcat changed the title standalone mode and whiptail customization interface standalone mode, whiptail customization interface, guest vg renaming Jun 17, 2024
@insatomcat insatomcat changed the title standalone mode, whiptail customization interface, guest vg renaming standalone mode, whiptail interface, userdefined classes and user customization Jun 17, 2024
@insatomcat insatomcat force-pushed the whiptail branch 7 times, most recently from 8f1cb1e to 23445af Compare June 18, 2024 12:02
In order to add a standalone mode, we split the SEAPATH_HOST class into 2 :

    SEAPATH_HOST package_config will contain packages that are needed by all host installations, standalone or cluster node
    SEAPATH_CLUSTER will contain the packages needed for cluster mode.

We now need a way to have the user select more easily the classes he wants in his iso and the grub menu items he needs.

For that I propose a Text User Interface using whiptail (will work over ssh, docker, etc.). With this interface the user will be able to :

    choose the package classes he wants to download/have in the local mirror of the iso file (that way he can reduce the size of the iso file and the time it takes to build)
    choose the precise list of grub menu options he wants

He will need to call ./build_debian_iso with the "--custom" command line argument.
Not calling the argument will launch with defaults (all classes downloaded, and only one grub option with clustermode/lvmraid/english/no_debug/no_kerberos/no_cockpit)

Signed-off-by: Florent CARLI <[email protected]>
It can be useful to be able to mount the guest filesystem in the host (to check on disk usage for example, or to repair something). LVM will choke if we have 2 volume groups with the same name on the same system. To solve this, since the host will still use "vg1", we rename the guest VG to "vg2".

Signed-off-by: Florent CARLI <[email protected]>
Signed-off-by: Florent CARLI <[email protected]>
This commits splits the base hierarchy into 3:
- srv_fai_config is still the default SEAPATH configuration
- usercustomization is the same hierarchy but git will not track it, and the user can put custom files in it
- build_tmp is a temporary folder where the installer will merge srv_fai_config and usercustomization just before building

srv_fai_config also includes now the new USERCUSTOMIZATION class, so that the files in the userconfiguration/ folder can implement this class and override/add any setting.

Signed-off-by: Florent CARLI <[email protected]>
With this commit the user can add his own classes by:
- adding the class in the user_classes.conf file
- dealing with a numbered script in usercustomization/class/ folder (for example usercustomization/class/99-custom, chmod 755) to use the class
- adding all the files related to the classes in the usercustomization hierarchy

Signed-off-by: Florent CARLI <[email protected]>
@insatomcat insatomcat merged commit 04c122a into main Jun 27, 2024
2 checks passed
@insatomcat insatomcat deleted the whiptail branch June 27, 2024 11:20
@eroussy eroussy linked an issue Jul 3, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to add new optionnal classes to build_debian_iso
2 participants