Insip4all
From Grid5000
| Warning | |
|---|---|
To delete when Fedora4all-core4-x86 64 will become deprecated. As for now, please use TGZ-G5K | |
Insip4all is a little framework, which intends to make an installed 4all environement as site-neutral as possible. It makes insipid the systems.
Contents |
The cleaning problem
Systems becomes site-specific after being deployed.
Deployment effect
When you install an environment on Grid'5000, resulting system becomes site-specific because of:
- Environment's postinstall run
- Configuration generated by
DHCPclient
For example, after the deployment by kadeploy of a debian4all environment, these files are site specific:
/etc/fstab /etc/hosts /etc/hostname /etc/inittab /etc/ssh/ssh_host_* ...
What to clean
Insip4all makes the system neutral by:
- Replacing specific files by their neutral version:
echo 'localhost.localdomain' > /etc/hostname
- Removing others specific files, whose corresponding neutral version does not exist:
rm -f /etc/ssh/ssh_host_*
- Executing commands to clean some databases:
updatedb
- Adding files required for next deployment:
touch /fastboot
How it works
insip4all is only a pool of distribution dedicated scripts and neutral configuration.
Guess distribution
First step, insipid guess distribution that runs on.
if [ -f /etc/debian_version ]; then DISTRO="debian" elif [ -f /etc/fedora-release ]; then DISTRO="fedora" else DISTRO="unknown" fi
Neutral files
Then, it copies neutral version of configuration files available for all distribution or for the current one.
# neutral distribution specific files
cp ${CP_OPTS} ${INSIPID_DIR}/${DISTRO}/* /
# neutral generic files (eg. shared among all distributions)
cp ${CP_OPTS} ${INSIPID_DIR}/generic/* /
Script execution
At last, to address special hints like cleaning some databases, insip4all runs a distribution-specific script and a generic cleaning script after that.
# distribution specific cleaning process
${INSIPID_DIR}/${DISTRO}.sh
# cleaning process common to every distribution
${INSIPID_DIR}/generic.sh
Usage
Retrieve it
insip4all is installed on recent 4all images in:
/root/insip4all
You can also retrieve it from SVN repository at InriaGforge:
svn checkout svn://scm.gforge.inria.fr/svn/grid5000/admin/trunk/insip4all
Use it
It is very easy to use it:
cdinsip4all/./insipid.sh
It will automatically guess your distribution, as explained above.
