[docs] cosmetic fixes
authorArthur Lutz <arthur.lutz@logilab.fr>
Thu, 27 Jun 2013 11:13:02 +0200
changeset 161 54aa6205c9a4
parent 160 7570a911464d
child 162 e53cbed31fd3
[docs] cosmetic fixes
docs/how-it-works.rst
docs/how-to-build-an-ami.rst
docs/index.rst
docs/main-files.rst
--- a/docs/how-it-works.rst	Mon Jun 10 15:55:37 2013 +0200
+++ b/docs/how-it-works.rst	Thu Jun 27 11:13:02 2013 +0200
@@ -2,24 +2,30 @@
 How it works
 ============
 
-All the operations are currently done in /etc/rc.local. The content of the file
+All the operations are currently done in `/etc/rc.local`. The content of the file
 is explained in the following lines.
 
-The first step parses the user-data related to our ami
+The first step is to parse the user-data related to our ami
 
 .. code-block:: bash
 
   /usr/bin/env python /etc/salt/srv/others/ec2_ami_parser.py
 
+By default this script loads from the user_data supplied to your virtual machine 
+through OpenStack or Amazon. You can *manually* extract user_data from a config 
+file by passing it as argument.
+
 The next step updates the salt states, if necessary by getting the necessary
-files from the hg repository
+files from the mercurial (hg) repository
 
 .. code-block:: bash
 
   salt-call state.highstate
   salt-call state.highstate
 
-(doing it twice is necessary to load new state/modules from the hg repository). Next,
+*(doing it twice is necessary so far to load new state/modules from the hg repository)*.
+
+Next,
 
 .. code-block:: bash
 
@@ -27,9 +33,9 @@
 
 includes all the operations done in the image. The operations can be grouped in three steps:
 
-    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
+    1. preparation (`ami_pre`): downloads the image, uncompresses it, resizes the filesystem,
+       mounts it, and modify the relevant files to work in a chroot
+    2. updates the image, downloads and executes 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
 
--- a/docs/how-to-build-an-ami.rst	Mon Jun 10 15:55:37 2013 +0200
+++ b/docs/how-to-build-an-ami.rst	Thu Jun 27 11:13:02 2013 +0200
@@ -1,9 +1,9 @@
 How to build an AMI
 ===================
 
-Prerequisite : having an AMI builder image on AWS or OpenStack
+*Prerequisite* : having an AMI builder image on AWS or OpenStack
 
-Creating an AMI is as simple as instanciating the ami-creator image in
+Creating an AMI is as simple as instanciating the salt-creator image in
 your cloud infrastructure with proper user-data content.
 
 What will be installed and configured in the built AMI image will
@@ -32,55 +32,11 @@
    do not put anything, what will be used will be the latest revision
    from the default repo).
 
-   Warning : the file needs to un-indented (remove whitespaces at beginning of lines) ::
-
-     ====== START =======
-     #salt-grains #interpreter flag
-     ### necessary unless you want the standard image ###
-     ami.hg_address_variation: http://hg.logilab.org/users/ptonelli/salt-ami-cloud-builder/variation
-     ami.hg_rev_variation: 9ed741a55f17 #optionnal
-     ami.name: my_variation
-     ami.type: ubuntu #or debian
-
-     ami.source_address: http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64.tar.gz
-     ami.source_hash: md5=1d72ed9c56abb899be02e7cae0822f1d
-
-     ### optionnal if your image uses existing kernel/ramdisk id in openstack ###
-     kernel_id:a5b900bd-c009-40b2-a763-32b32996b1ee
-     initrd_id:b953e40a-2605-402b-8663-c8556a5899f2
-
-     ### optionnal (ami_creation code update) ###
-     ami.hg_address_server: http://hg.logilab.org/master/salt-ami-cloud-builder/
+   Warning : the file needs to un-indented (remove whitespaces at beginning of lines) 
 
-     ### optionnal (necessary to upload to openstack) ###
-     keystone.user: username
-     keystone.password: password
-     keystone.tenant: tenant
-     keystone.tenant_id: 00000000000000000000000000000000
-     keystone.auth_url: 'http://control.example.com:5000/v2.0'
-     keystone.insecure: False   #(optional)
-
-     ### optionnal (necessary to upload to amazon aws) ###
-     ### remove the BEGIN and END statements found in the files ###
-     ### do not forget the ' ' at each newline for ConfigParser ###
-     aws.region: eu-west-1
-     aws.private_key: 0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-     aws.certificate: 0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-
-     ====== END ========
+.. include:: ../user_data.cfg.sample
+  :literal:
 
 3. you can then connect to your instance and wait until everything in ``/mnt``
    is unmounted. Upload to glance (openstack) or amazon aws is automatic if you
-   provided the correct user data. 
+   provided the correct user data.  test
--- a/docs/index.rst	Mon Jun 10 15:55:37 2013 +0200
+++ b/docs/index.rst	Thu Jun 27 11:13:02 2013 +0200
@@ -6,6 +6,8 @@
 salt-ami-cloud-builder's documentation
 ======================================
 
+.. include:: ../README.rst
+
 Contents:
 
 .. toctree::
--- a/docs/main-files.rst	Mon Jun 10 15:55:37 2013 +0200
+++ b/docs/main-files.rst	Thu Jun 27 11:13:02 2013 +0200
@@ -2,12 +2,11 @@
 Main Files
 ----------
 
-minion: must be copied to /etc/salt, provides a masterless configuration for salt
+* `minion`: must be copied to /etc/salt, provides a masterless configuration for salt
 
-ami_builder.sls: state file regrouping all operations to create the new image 
+* `ami_builder.sls`: state file regrouping all operations to create the new image 
 
-ami_pre: state folder (contains a few sls files) applied before the creation of variation
+* `mi_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
+* `ami_post`: state folder applied after the creation of variation for cleanup