Kadeploy allows the customization of each node by 2 means:
This script is common to all environments, its goal is to prepare the system to the hardware specification and the target hard disk drive for the deployment. It can load a specific IDE controller driver, improve deployment performance or make every kind of checks needed. This script is defined in the configuration file as pre_install_script and the associated archive as pre_install_archive.
The preinstallation archive is a gzipped tar archive, containing the pre_install_script in its root directory. Here is an example of a preinstallation archive structure:
/ init.ash lib/ bin/ awk df du xargs
The directory structure allows to custom the tasks to your needs. In this example, the pre_install_script is init.ash. Let's have a short look at this structure :
init.ashis my pre_install_script, so it needs to be there
bin/is a directory where you can add custom binaries, here, I needed awk, df, du and xargs.
lib/is a directory where you can add custom libraries for your binaries. I suggest you to compile static binaries, to prevent conflicts/version problems due to the presence of the system's shared libraries.
This script is associated to the environment to deploy. Its goal is to adapt the crude system image to a bootable system. It is composed of a gunzipped tar archive that contains all the sites files and a script traitement.ash in the archive's root directory. This archive is sent to the nodes, decompressed in a ramdisk and then the post_install_script
is executed on every node. The script name is defined in the configuration file as
post_install_script.
The postinstallation archive is a gzipped tar archive, containing the post_install_script in its root directory. Here is an example of a postinstallation archive structure:
/ traitement.ash etc/ fstab hosts hosts.allow hosts.deny ntpdate authorized_keys
The directory structure allows to custom the configuration script to your needs. Let's have a short look at this structure :
traitement.ashis my post_install_script.
etc/is a directory where I decided to put all the files I wanted to replace on my system, this is an arbitrary choice, but allows to keep a clean structure.
authorized_keysis the root's authorized_keys file I decided to put it in the root directory to be sure to have a look at it everytime I update my postinstallation archive.
/etc/fstaba site base file should be copied in the postinstall archive so that nfs mounts can be preserved and other site modifications could be preserved
/tmpshould have its rights modified
Many other basic files can be handled by putting them in the archive and replace the existing ones. They are not all listed here but only the most important ones :
/root/.ssh/authorized_keysshould contain the administrator's public key and also the public key of user
deploy
, to allow him to get a root shell on every node to reboot those. In order to do that this authorized_keys file has to be built and put in the archive's root directory/etc/hosts /etc/hosts.allow /etc/hosts.denyshould be set to fit the cluster's configuration, and ensure network connection within the cluster's network
Numerous modifications can be done here, from authentification server to tailored modification depending on the node's IP. A good idea should be to modify rc
scripts to prevent the first boot hard disk drive verification, because it is just a waste of time here, and avoid all the manual intervention that could occur on system boot : for example, by default, many distributions ask the root password before checking a filesystem on boot time.