TGZ-G5K

From Grid5000
Jump to: navigation, search

tgz-g5k - a tool to create neutral deployment tgz image

Contents

Synopsis

tgz-g5k [OPTIONS] [login@host:/path/to/image.tgz]

Description

tgz-g5k is intended to create system deployment image that do not possess any site-flavour.

Technically, tgz-g5k remounts root partition to avoid pollution from virtual partitions like /dev. Then, it archives root partition content excluding some of the site-specific files and overwritting most of the others with their site-neutral counterpart.

If asked, the system archive can be sent on a distant host through a SSH connection after being created on the local host.

System archive creation

System archive creation is a not so easy task and tgz-g5k is made to provide an easy archive creation command, which deals with the following related issues.

udev/devfs

Using udev, a tmpfs filesystem is mounted on /dev during the boot process of the system. Hence, if you do a create a tar-archive of root filesystem through the / mount point, you will not archive the static content of /dev which does exist on the root filesystem, but which is hidden under udev’s virtual filesystem. Same behaviour happens with devfs, as a devfs filesystem is mounted on /dev.

So, you will then untar an system environment with nothing in /dev, which leads to a kernel panic during the boot process of deployed node, because kernel needs the /dev/console and /dev/null device files for instance, before the udev or devfs service is started.

To be sure to archive the whole content of the root filesystem, tgz-g5k remounts it in another location: /mnt/root. This way, no subsequent mounts on subdirectories, like /dev, /proc or /home, are present anymore.

File name's leading

For the system archive to be usable in a deployment managed by kadeploy, files it contains must be free of any leading characters like / or ./.

Avoiding leading characters on archive’s files is done by launching the archive creation directly from the root filesystem remount point and specifying all the top files and directories to include in it.

Being site-neutral

When a system archive is deployed on Grid'5000, resulting system becomes site-specific because of system archive related postinstall and DHCP client generated configuration. So files like /etc/hosts or /etc/inittab contains one site’s flavour.

To create an archive that is as far as possible site-neutral, tgz-g5k excludes some site-specific files from the archive content or replaces them by their neutral counterpart. The /usr/share/tgz-g5k/insipid directory contains the neutral files data tree used during archive creation.

Options

-h, --help
   Show summary of options.
-v, --version
   Show version of program.

Examples

tgz-g5k > /tmp/myimage.tgz
tgz-g5k /tmp/myimage.tgz
ssh root@node tgz-g5k > myimage.tgz
tgz-g5k frontend:images/myimage.tgz
tgz-g5k mylogin@frontend:images/myimage.tgz

Installation/Upgrade

Debian/Ubuntu

On debian/ubuntu, add the following line in the sources.list file :

deb http://apt.nancy.grid5000.fr/debian sid main

And install it by :

apt-get update
apt-get install tgz-g5k

If you just do an upgrade, tgz-g5k should be upgraded automatically.

Other Distributions

Take the tarball (for example with wget). Before that make sure you have configure the http proxy; you can take a look at Web_proxy_client

wget https://gforge.inria.fr/frs/download.php/31726/tgz-g5k_1.0.9.tar.gz

Untar the tarball:

tar xvzf tgz-g5k_1.0.9.tar.gz

Put your distribution on the second line of the Makefile.(DISTRIB=) Build and install tgz-g5k:

make
make install

See also

Personal tools
Namespaces

Variants
Actions
Public Portal
Users Portal
Admin portal
Wiki special pages
Toolbox