ComputeMode on top of Debian Squeeze: using kameleon
To install automatically a server into a Virtual appliance, we will use the "Kameleon" software: http://wiki-oar.imag.fr/index.php/Kameleon Kameleon is a very simple tool to create appliances, vm or cd images.
Installation of the kameleon and extra softwares 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 # apt-get install schroot
Configuration of the environment
# mkdir $HOME/Desktop/kameleon # cd $HOME/Desktop/kameleon && wget http://computemode.imag.fr/files/debian/squeeze/kameleon-recipe-cmserver64.tar.gz # tar zxvf kameleon-recipe-cmserver64.tar.gz # rm kameleon-recipe-cmserver64.tar.gz
You have to change a variable:
# vi recipes/computemode.yaml
and change the line:
# working_dir: "/THE/PATH/TO/YOUR/KAMELEON/DIRECTORY"
to your kameleon directory path, for example the $HOME/Desktop/kameleon directory.
You have now the basics configuration files to create your new appliance:
- The "config" directory contains files to be copied into the appliance, for example you and add into config/etc/ssh/ your ssh_host_* key files
- The "recipes" directory contains the main recipe to build the appliance
- The "steps" directory contains files used by the receipe 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 appliance
Now that you have configured your environment, you can build your new system. In the recipes/computemode.yaml file, you can choose what format of disk should be created: save_as_vdi for virtualbox, save_as_vmdk vor vmware...
# sudo kameleon computemode
and be patient.
Finishing the installation
To finish your installation you have to follow those steps:
- Create a new virtual machine using the disk in /var/tmp/kameleon/
- Launch the appliance and use the login/password: root/icatis
- After the login the cmaskconfig script is launched: answer the questions, configure your network and reboot your system
- You can execute a web browser and try to connect to http://127.0.0.1/ to see the result or from the outside to the http://172.28.255.253 address
Note: you should take a look to the /etc/network/interface file before your reboot to be sure that your server is correctly configured.