xcat-core
xcat-core copied to clipboard
postinstall scripts for diskfull installations
Hi guys.
Somebody of you know how to make that xcat execute a postinstallation script from the management node after a complete node installation. Since the postscripts and postbootscripts are executing from the node to be installed. I would add some additional configs that should be executed from the management node.
Xcat version: 2.16.4 Diskfull installation using centos 8.5
Thank you in advance for your help.
Note: I was reading that there are “postinstall” attribute but it is only applicable to diskless installation, source: https://xcat-docs.readthedocs.io/en/stable/guides/admin-guides/manage_clusters/common/deployment/prepostscripts/postinstall_script.html
Kind regards.
@marseaplage Unfortunately I can't think of a built in xCAT feature that can be used to automatically run post install customization tasks on the management node instead of the compute nodes. There is a feature (prescripts) that allows pre install customization tasks on the management node: https://xcat-docs.readthedocs.io/en/stable/guides/admin-guides/manage_clusters/common/deployment/prepostscripts/pre_script.html
Another alternative would be to write a script on the management node that wraps the installation process then performs the needed post-install customization.
@marseaplage It's possible to create a workaround for what you want using the node.postscripts
.
- Use
python
orperl
to create a small 20 line web API on the management node that listens for requests from the nodes. - Create a postscript that connects to this api from the node using
curl
and use that as a trigger to execute your requirements on the management node. - Place the postscript into /install and add it to the node attribute
node.postscripts
This will execute the postscript once node installation is complete, which in turn will trigger the processing you need to do on the management node. This process can also be applied to update other systems (for e.g. we used this method to update inventory management system tags for recently installed machines).
You will probably need some form of check to ensure that the API is only called once per node or make the processing idempotent.