summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/altcloud/README65
-rw-r--r--doc/examples/cloud-config-datasources.txt67
-rw-r--r--doc/examples/cloud-config-write-files.txt33
-rw-r--r--doc/examples/cloud-config.txt9
4 files changed, 105 insertions, 69 deletions
diff --git a/doc/altcloud/README b/doc/altcloud/README
new file mode 100644
index 00000000..87d7949a
--- /dev/null
+++ b/doc/altcloud/README
@@ -0,0 +1,65 @@
+Data souce AltCloud will be used to pick up user data on
+RHEVm and vSphere.
+
+RHEVm:
+======
+For REHVm v3.0 the userdata is injected into the VM using floppy
+injection via the RHEVm dashboard "Custom Properties". The format
+of the Custom Properties entry must be:
+"floppyinject=user-data.txt:<base64 encoded data>"
+
+e.g.: To pass a simple bash script
+
+% cat simple_script.bash
+#!/bin/bash
+echo "Hello Joe!" >> /tmp/JJV_Joe_out.txt
+
+% base64 < simple_script.bash
+IyEvYmluL2Jhc2gKZWNobyAiSGVsbG8gSm9lISIgPj4gL3RtcC9KSlZfSm9lX291dC50eHQK
+
+To pass this example script to cloud-init running in a RHEVm v3.0 VM
+set the "Custom Properties" when creating the RHEMv v3.0 VM to:
+floppyinject=user-data.txt:IyEvYmluL2Jhc2gKZWNobyAiSGVsbG8gSm9lISIgPj4gL3RtcC9KSlZfSm9lX291dC50eHQK
+
+NOTE: The prefix with file name must be: "floppyinject=user-data.txt:"
+
+It is also possible to launch a RHEVm v3.0 VM and pass optional user
+data to it using the Delta Cloud.
+For more inforation on Delta Cloud see: http://deltacloud.apache.org
+
+vSphere:
+========
+For VMWare's vSphere the userdata is injected into the VM an ISO
+via the cdrom. This can be done using the vSphere dashboard
+by connecting an ISO image to the CD/DVD drive.
+
+To pass this example script to cloud-init running in a vSphere VM
+set the CD/DVD drive when creating the vSphere VM to point to an
+ISO on the data store.
+
+The ISO must contain the user data:
+
+For example, to pass the same simple_script.bash to vSphere:
+
+Create the ISO:
+===============
+% mkdir my-iso
+
+NOTE: The file name on the ISO must be: "user-data.txt"
+% cp simple_scirpt.bash my-iso/user-data.txt
+
+% genisoimage -o user-data.iso -r my-iso
+
+Verify the ISO:
+===============
+% sudo mkdir /media/vsphere_iso
+% sudo mount -o loop JoeV_CI_02.iso /media/vsphere_iso
+% cat /media/vsphere_iso/user-data.txt
+% sudo umount /media/vsphere_iso
+
+Then, launch the vSphere VM the ISO user-data.iso attached as a CDrom.
+
+It is also possible to launch a vSphere VM and pass optional user
+data to it using the Delta Cloud.
+
+For more inforation on Delta Cloud see: http://deltacloud.apache.org
diff --git a/doc/examples/cloud-config-datasources.txt b/doc/examples/cloud-config-datasources.txt
index 102c3dd7..d10dde05 100644
--- a/doc/examples/cloud-config-datasources.txt
+++ b/doc/examples/cloud-config-datasources.txt
@@ -14,73 +14,6 @@ datasource:
- http://169.254.169.254:80
- http://instance-data:8773
- AltCloud:
- Data souce AltCloud will be used to pick up user data on
- RHEVm and vSphere.
-
- RHEVm:
- ======
- For REHVm v3.0 the userdata is injected into the VM using floppy
- injection via the RHEVm dashboard "Custom Properties". The format
- of the Custom Properties entry must be:
- "floppyinject=user-data.txt:<base64 encoded data>"
-
- e.g.: To pass a simple bash script
-
- % cat simple_script.bash
- #!/bin/bash
- echo "Hello Joe!" >> /tmp/JJV_Joe_out.txt
-
- % cat simple_script.bash | base64
- IyEvYmluL2Jhc2gKZWNobyAiSGVsbG8gSm9lISIgPj4gL3RtcC9KSlZfSm9lX291dC50eHQK
-
- To pass this example script to cloud-init running in a RHEVm v3.0 VM
- set the "Custom Properties" when creating the RHEMv v3.0 VM to:
- floppyinject=user-data.txt:IyEvYmluL2Jhc2gKZWNobyAiSGVsbG8gSm9lISIgPj4gL3RtcC9KSlZfSm9lX291dC50eHQK
-
- NOTE: The prefix with file name must be: "floppyinject=user-data.txt:"
-
- It is also possible to launch a RHEVm v3.0 VM and pass optional user
- data to it using the Delta Cloud.
- For more inforation on Delta Cloud see: http://deltacloud.apache.org
-
- vSphere:
- ========
- For VMWare's vSphere the userdata is injected into the VM an ISO
- via the cdrom. This can be done using the vSphere dashboard
- by connecting an ISO image to the CD/DVD drive.
-
- To pass this example script to cloud-init running in a vSphere VM
- set the CD/DVD drive when creating the vSphere VM to point to an
- ISO on the data store.
-
- The ISO must contain the user data:
-
- For example, to pass the same simple_script.bash to vSphere:
-
- Create the ISO:
- ===============
- % mkdir my-iso
-
- NOTE: The file name on the ISO must be: "user-data.txt"
- % cp simple_scirpt.bash my-iso/user-data.txt
-
- % genisoimage -o user-data.iso -r my-iso
-
- Verify the ISO:
- ===============
- % sudo mkdir /media/vsphere_iso
- % sudo mount -o loop JoeV_CI_02.iso /media/vsphere_iso
- % cat /media/vsphere_iso/user-data.txt
- % sudo umount /media/vsphere_iso
-
- Then, launch the vSphere VM the ISO user-data.iso attached as a CDrom.
-
- It is also possible to launch a vSphere VM and pass optional user
- data to it using the Delta Cloud.
-
- For more inforation on Delta Cloud see: http://deltacloud.apache.org
-
MAAS:
timeout : 50
max_wait : 120
diff --git a/doc/examples/cloud-config-write-files.txt b/doc/examples/cloud-config-write-files.txt
new file mode 100644
index 00000000..9c4e3998
--- /dev/null
+++ b/doc/examples/cloud-config-write-files.txt
@@ -0,0 +1,33 @@
+#cloud-config
+# vim: syntax=yaml
+#
+# This is the configuration syntax that the write_files module
+# will know how to understand. encoding can be given b64 or gzip or (gz+b64).
+# The content will be decoded accordingly and then written to the path that is
+# provided.
+#
+# Note: Content strings here are truncated for example purposes.
+write_files:
+- encoding: b64
+ content: CiMgVGhpcyBmaWxlIGNvbnRyb2xzIHRoZSBzdGF0ZSBvZiBTRUxpbnV4...
+ owner: root:root
+ path: /etc/sysconfig/selinux
+ perms: '0644'
+- content: |
+ # My new /etc/sysconfig/samba file
+
+ SMBDOPTIONS="-D"
+ path: /etc/sysconfig/samba
+- content: !!binary |
+ f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAwARAAAAAAABAAAAAAAAAAJAVAAAAAAAAAAAAAEAAOAAI
+ AEAAHgAdAAYAAAAFAAAAQAAAAAAAAABAAEAAAAAAAEAAQAAAAAAAwAEAAAAAAADAAQAAAAAAAAgA
+ AAAAAAAAAwAAAAQAAAAAAgAAAAAAAAACQAAAAAAAAAJAAAAAAAAcAAAAAAAAABwAAAAAAAAAAQAA
+ ....
+ path: /bin/arch
+ perms: '0555'
+- encoding: gzip
+ content: !!binary |
+ H4sIAIDb/U8C/1NW1E/KzNMvzuBKTc7IV8hIzcnJVyjPL8pJ4QIA6N+MVxsAAAA=
+ path: /usr/bin/hello
+ perms: '0755'
+
diff --git a/doc/examples/cloud-config.txt b/doc/examples/cloud-config.txt
index 82055d09..1e6628d2 100644
--- a/doc/examples/cloud-config.txt
+++ b/doc/examples/cloud-config.txt
@@ -28,11 +28,14 @@ apt_upgrade: true
# then use the mirror provided by the DataSource found.
# In EC2, that means using <region>.ec2.archive.ubuntu.com
#
-# if no mirror is provided by the DataSource, then search
-# for dns names '<distro>-mirror' in each of
+# if no mirror is provided by the DataSource, and 'apt_mirror_search_dns' is
+# true, then search for dns names '<distro>-mirror' in each of
# - fqdn of this host per cloud metadata
# - localdomain
# - no domain (which would search domains listed in /etc/resolv.conf)
+# If there is a dns entry for <distro>-mirror, then it is assumed that there
+# is a distro mirror at http://<distro>-mirror.<domain>/<distro>
+#
# That gives the cloud provider the opportunity to set mirrors of a distro
# up and expose them only by creating dns entries.
#
@@ -42,6 +45,8 @@ apt_mirror_search:
- http://local-mirror.mydomain
- http://archive.ubuntu.com
+apt_mirror_search_dns: False
+
# apt_proxy (configure Acquire::HTTP::Proxy)
apt_proxy: http://my.apt.proxy:3128