~harlowja/cloud-init/fix-auto-bool

« back to all changes in this revision

Viewing changes to doc/sources/altcloud/README.rst

  • Committer: harlowja
  • Date: 2013-02-05 07:10:36 UTC
  • mto: This revision was merged to the branch mainline in revision 780.
  • Revision ID: harlowja@virtualbox.rhel-20130205071036-2tbfe1urzjyfg08a
Add initial docs about datasources.

Start moving the current README for
datasources to a RST format and include
those files in the rtd site.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
The datasource altcloud will be used to pick up user data on `RHEVm`_ and `vSphere`_.
 
2
 
 
3
RHEVm
 
4
~~~~~~
 
5
 
 
6
For `RHEVm`_ v3.0 the userdata is injected into the VM using floppy
 
7
injection via the `RHEVm`_ dashboard "Custom Properties". 
 
8
 
 
9
The format of the Custom Properties entry must be:
 
10
 
 
11
::
 
12
    
 
13
    floppyinject=user-data.txt:<base64 encoded data>
 
14
 
 
15
For example to pass a simple bash script:
 
16
 
 
17
::
 
18
    
 
19
    % cat simple_script.bash
 
20
    #!/bin/bash
 
21
    echo "Hello Joe!" >> /tmp/JJV_Joe_out.txt
 
22
 
 
23
    % base64 < simple_script.bash
 
24
    IyEvYmluL2Jhc2gKZWNobyAiSGVsbG8gSm9lISIgPj4gL3RtcC9KSlZfSm9lX291dC50eHQK
 
25
 
 
26
To pass this example script to cloud-init running in a  `RHEVm`_ v3.0 VM
 
27
set the "Custom Properties" when creating the RHEMv v3.0 VM to:
 
28
 
 
29
::
 
30
 
 
31
    floppyinject=user-data.txt:IyEvYmluL2Jhc2gKZWNobyAiSGVsbG8gSm9lISIgPj4gL3RtcC9KSlZfSm9lX291dC50eHQK
 
32
 
 
33
**NOTE:** The prefix with file name must be: ``floppyinject=user-data.txt:``
 
34
 
 
35
It is also possible to launch a `RHEVm`_ v3.0 VM and pass optional user
 
36
data to it using the Delta Cloud. 
 
37
 
 
38
For more information on Delta Cloud see: http://deltacloud.apache.org
 
39
 
 
40
vSphere
 
41
~~~~~~~~
 
42
 
 
43
For VMWare's `vSphere`_ the userdata is injected into the VM as an ISO
 
44
via the cdrom. This can be done using the `vSphere`_ dashboard 
 
45
by connecting an ISO image to the CD/DVD drive.
 
46
 
 
47
To pass this example script to cloud-init running in a `vSphere`_ VM
 
48
set the CD/DVD drive when creating the vSphere VM to point to an
 
49
ISO on the data store. 
 
50
 
 
51
**Note:** The ISO must contain the user data.
 
52
 
 
53
For example, to pass the same ``simple_script.bash`` to vSphere:
 
54
 
 
55
Create the ISO
 
56
-----------------
 
57
 
 
58
::
 
59
    
 
60
    % mkdir my-iso
 
61
 
 
62
NOTE: The file name on the ISO must be: ``user-data.txt``
 
63
 
 
64
::
 
65
    
 
66
    % cp simple_scirpt.bash my-iso/user-data.txt
 
67
    % genisoimage -o user-data.iso -r my-iso
 
68
 
 
69
Verify the ISO
 
70
-----------------
 
71
 
 
72
::
 
73
    
 
74
    % sudo mkdir /media/vsphere_iso
 
75
    % sudo mount -o loop JoeV_CI_02.iso /media/vsphere_iso
 
76
    % cat /media/vsphere_iso/user-data.txt
 
77
    % sudo umount /media/vsphere_iso
 
78
 
 
79
Then, launch the `vSphere`_ VM the ISO user-data.iso attached as a CDROM.
 
80
 
 
81
It is also possible to launch a `vSphere`_ VM and pass optional user
 
82
data to it using the Delta Cloud. 
 
83
 
 
84
For more information on Delta Cloud see: http://deltacloud.apache.org
 
85
 
 
86
.. _RHEVm: https://www.redhat.com/virtualization/rhev/desktop/rhevm/
 
87
.. _vSphere: https://www.vmware.com/products/datacenter-virtualization/vsphere/overview.html