HowTo Build Images: using kameleon
This page describes the steps to build your own images to boot on with an example: the Debian Squeeze 32 or 64bits system.
To build automatically a computemode node, we will use the "Kameleon" software: http://wiki-oar.imag.fr/index.php/Kameleon
Kameleon is a very simple tool to create appliances, vm, cd images or archives.
Contents |
Download computemode node
- You can download and configure a pre-built node:
for a Debian Squeeze 32bit mode node:
wget http://computemode.imag.fr/files/cm-node-squeeze-i386.tar.gz
for a Debian Squeeze 64bit mode node:
wget http://computemode.imag.fr/files/cm-node-squeeze-amd64.tar.gz
You have to untar the new archive:
# tar cm-debian-squeeze32.tgz -C /
or:
# tar cm-debian-squeeze64.tgz -C /
and to finish the installation, just execute the post-install script:
# cd /cm/debian && sh ./post-build.sh
Build your own computemode nodes
Installation of the kameleon software and extra packages on your local computer
# cat << EOF > /etc/apt/sources.list.d/kameleon.list deb http://oar-ftp.imag.fr/kameleon/debian squeeze main EOF # curl http://oar-ftp.imag.fr/kameleon/debian/oar-archive-keyring.asc | sudo apt-key add - # apt-get update # apt-get install kameleon rubygems # gem install session
Configuration of the environment
# mkdir $HOME/Desktop/kameleon # cd $HOME/Desktop/kameleon && wget http://computemode.imag.fr/files/debian/squeeze/kameleon-recipe-node64.tar.gz # tar zxvf kameleon-recipe-node64.tar.gz # rm kameleon-recipe-node64.tar.gz
You can customize your node by editing the recipe file:
# vi recipes/build-node.yaml
and change some variables:
# The path of your new image on your computemode server: image_path: "/cm/debian" # The directory on the kameleon environment to build your new image: build_image_path: "/cm/debian-build" # The name of the new initrd and new kernel to include into the tar archive: initrd_name: "debiaufs" kernel_name: "debkaufs" # The computemode files server to retrieve some configuration files: computemode_files_server: "computemode.imag.fr" # The tar.gz file name to store the new image: archive_name: cm-node
You have now the basics configuration files to create your new computemode node:
- The "recipes" directory contains the main recipe to build the node
- The "steps" directory contains files used by the recipe and commands to be executed
You can edit all those files and make your own recipe, change variables from the recipe files...If you want more informations, please read this: http://wiki-oar.imag.fr/index.php/Kameleon
Build the node
Now that you have configured your environment, you can build your new system.
# sudo kameleon build-node
and be patient.
Finishing the installation
To finish your installation you have to copy the archive containing the node into your computemode server and untar it:
# scp /var/tmp/kameleon/<BUILD_DATE>/cm-node.tar.gz cmserver:/ # ssh root@cmserver # cd / # tar zxvf ./cm-node.tar.gz -C /
and finally, execute the post-build script to configure keys and access for SSH:
# cd /cm/debian/ # sh ./post-build.sh
How to change the 64bit mode recipe to build a 32bit mode node
To build a 32bit mode system using the 64bit mode recipe, you have to edit the recipe file and change some variables:
# vi recipe/build-node.yaml
Change:
# arch: amd64
to
# arch: i386
and:
# kernel_arch: "amd64"
to:
# kernel_arch: "686"