author Paul Tonelli <>
Tue, 05 Mar 2013 18:57:42 +0100
changeset 25 18936b962551
parent 9 b53834c4133f
child 39 03dddd352693
permissions -rw-r--r--
corrected errors in sizes, still need cleanup with same units


Automatically create variations of virtual machines depending
on configuration files availables in repository :


init-server.sls file to initialize ami-creator and create mounting machine
init-client.sls sample state file for variation of virtual machine (to be
modified for multiple variations)

Present state

- Resume Openstack image "ami image creation" (id: d4062f13-f26a-4a9a-a61c-613911b22c77) and log on it.
- Launch salt-call with the creation script.

  $ salt-call vm_create.create_flavor $image_name None


- Create a new instance of ``wheezy 64bits``, clone the repo listed at the top
  of this file and launch the bootstrap script:

  $ chmod +x
  $ ./ 



The salt module from glance does not work in debian as ``glanceclient`` package is only available in experimental and I did not manage to connect to openstack essex with it.


The salt module is working as intended. 

Optimal behavior of this project

3 levels of scripting:

Virtual Instance Launcher

(hooked to modifications of HG repository)

Ami Creator

An image available on openstack / ec2.

At boot, the user must supply a repository address in user data as
``variation_address`` this information is used by salt at boot to download the
correct revision of files.  it then execute salt-call
vm_create.create_variation which will create a complete ami file and upload it
to glance EC2

Chroot Image

this script should only be a salt state file, and must be run using
salt-highstate before packaging of the ami.