improved readme :
authorPaul Tonelli <paul.tonelli@logilab.fr>
Wed, 13 Mar 2013 18:22:17 +0100
changeset 76 b8194fea7323
parent 75 aaa6740c7950
child 77 921005892859
improved readme : - added information about editing variation.sls - added information about how to use another repository - improved information about how the ami-creator works
readme.txt
--- a/readme.txt	Wed Mar 13 17:46:20 2013 +0100
+++ b/readme.txt	Wed Mar 13 18:22:17 2013 +0100
@@ -10,11 +10,21 @@
 Present state
 =============
 
-The first step is to launch an instance of "ami-creation" on openstack. Use at
-least 20Gb of disk
+
+The first step is to edit/commit/push the file "variation.sls" so that a:
+
+salt-call state.sls variation.sls 
+
+will create the machine you want.
+
+You can also clone the repository and commit to another hg repo at the
+condition that this repository can be reached by http / https.
+
+Then, launch an instance of "ami-creation" on openstack. Use at
+least 5Gb of disk (add more if your sls file requires more).
 
 In the userdata, copy something like (if you do not put anything, what will be
-used will be the latest version from repo):
+used will be the latest revision from the default repo):
 
 ====== START =======
 
@@ -37,6 +47,7 @@
 
 ====== END ========
 
+The kernel_id and initrd_id are used to specify the 
 
 you can add an ip to your instance, ssh to the machine and wait until
 everything in /mnt is unmounted. you can then upload what you want to glance
@@ -79,34 +90,44 @@
 in /etc/init.d/ec2-run-ami
 --------------------------
 
-Add the content of userdata as salt-grains (version and address from repo)
+If the userdata is not a script and is not compressed content, Add the content
+of userdata as salt-grains (version and address from repo...)
 
 in /etc/rc.local
 ----------------
 
-salt-call state.highstate
-salt-call state.highstate
+  salt-call state.highstate
+  salt-call state.highstate
 
 (doing it twice is necessary to load new states)
 
-salt-call state.sls ami_creator_pre
+  salt-call vm_create.create_variation 
+
+which contains : 
+
+  salt-call state.sls ami_creator_pre
 
 which mounts a debian image and creates all the necessary files inside. Then
 update the chroot:
 
-salt-call vm_create.update_image /mnt/variation
+  salt-call vm_create.update_image /mnt/variation
 
 and run your state file (if necessary, modify /etc/salt/srv/variation.sls which
 will be executed inside):
 
-salt-call vm_create.variate_image /mnt/variation
+  salt-call vm_create.variate_image /mnt/variation
 
 which runs your variation inside the chroot. Finally run
 
-salt-call state.sls ami_creator_post
+  salt-call state.sls ami_creator_post
 
 which will extract your image kernel and ramdisk and unmount and resize as necessary
 
+  salt-call vm_create.upload to glance
+
+if the correct userdata is available, this sends the kernel, ramdisk and image
+to glance using the glance python client.
+
 glance
 ------