HowTo Build Images: using kameleon

From ComputeMode
Jump to: navigation, search

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: Kameleon is a very simple tool to create appliances, vm, cd images or archives.


Download computemode node

  • You can download and configure a pre-built node:

for a Debian Squeeze 32bit mode node:


for a Debian Squeeze 64bit mode node:


You have to untar the new archive:

# tar cm-debian-squeeze32.tgz -C /


# tar cm-debian-squeeze64.tgz -C /

and to finish the installation, just execute the post-install script:

# cd /cm/debian && 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 squeeze main
# curl | 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
# 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: ""
# 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:

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 ./

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


# arch: amd64


# arch: i386


# kernel_arch: "amd64"


# kernel_arch: "686"
Personal tools

user portal
developer portal
wiki stuff