improve readme to mirror recent changes
authorPaul Tonelli <paul.tonelli@logilab.fr>
Fri, 31 May 2013 10:32:35 +0200
changeset 127 c1280b12b455
parent 126 fc1f2d232ad5
child 128 91b237a7720f
improve readme to mirror recent changes
readme.rst
--- a/readme.rst	Mon Apr 22 10:13:42 2013 +0200
+++ b/readme.rst	Fri May 31 10:32:35 2013 +0200
@@ -107,9 +107,10 @@
 
 minion: must be copied to /etc/salt, provides a masterless configuration for salt
 
-ami_pre: state folder (contains a few sls files) applied before the creation of variation
 
-ami_creator.sls: state file to have a correct ami-builder environment
+ami_creator.sls: state file containing all operations to create the new image 
+
+ami_pre: state folder (contains a few sls files) applied before the creation of variation
 
 ami_post: state folder applied after the creation of variation for
 cleanup
@@ -135,46 +136,29 @@
 (doing it twice is necessary to load new state/modules from the hg repository). Next,
 
 ::
-  salt-call state.sls ami_pre
-
-downloads and mounts an image and creates all the necessary files inside.
-
-::
   salt-call state.sls ami_creator
 
-updates the chroot, install salt and run your state file. Finally
-
-::
-  salt-call state.sls ami_post
-
-extracts your image kernel and ramdisk and unmount and resize as necessary
-
-::
-  salt-call vm_create.upload to glance
-
-if the correct userdata is available, it also uploads the kernel, ramdisk and image
-to glance using the glance python client. Uploading to amazon ec2 is not yet functionnal
+includes all the operations done in the image. The operations can be grouped in three steps:
 
-TODO
-====
-
-    1. add an amazon ec2 client to :
-
-        a. create and mount an EBS volume
-
-        b. copy the contente of the img file to this volume
-
-        c. unmount and detach the volume 
-
-        d. take a snapshot of the volume
-
-        e. register the snapshot as an ami in amazon
-
-    2. include the bootstrap code as a variation sls file
+    1. preparation (ami_pre): download the image, uncompress it, resize the fs,
+       mount it, modify the relevant files to work in a chroot
+    2. update the image, download and execute the variation files from the mercurial variation URL
+    3. postprocessing (ami_post): unmount, resize and upload the image either
+       to amazon or to openstack depending on user_data
 
 Bootstrapping an ami_creator machine
 =====================================
 
+This should only be used if no machine is available. If an ami_creator image is
+already available, juste launch it with the necessary user data:
+
+    1. ami.type: ubuntu
+    2. a correct source/md5sum for an ubuntu image
+    3. use the server repository as variation address.
+    4. provide your correct credentials
+
+This should create and upload an up to date custom AMI image
+
 The first step is to add the salt ppa to install it:
 
 .. sourcecode:: bash
@@ -206,6 +190,9 @@
 Manual upload to openstack (glance)
 ===================================
 
+This procedure should not be necessary, the openstack client is functionnal and
+will be run, provided you include the relevant user data.
+
 After the end of the creation process (nothing is mounted in /mnt/variation and
 you can see a .img, a kernel and a ramdisk in /mnt/output), you can upload your
 image to glance manually, provided you have credentials as a openrc.sh file
@@ -247,6 +234,9 @@
 Manual upload to ec2
 ====================
 
+This procedure should not be necessary, the amazon ec2 client is functionnal and
+will be run, provided you include the relevant user data.
+
 How to upload the ami you created on amazon manually (from_):
 
 1. Create an EBS volume of the minimal size to host the disk image