Merge ~powersj/cloud-init:docs/whitespace_spelling into cloud-init:master
- Git
- lp:~powersj/cloud-init
- docs/whitespace_spelling
- Merge into master
Proposed by
Joshua Powers
Status: | Merged |
---|---|
Approved by: | Dan Watkins |
Approved revision: | b16a3abc6524904dd74613180b6d5e88e2332e68 |
Merge reported by: | Server Team CI bot |
Merged at revision: | not available |
Proposed branch: | ~powersj/cloud-init:docs/whitespace_spelling |
Merge into: | cloud-init:master |
Diff against target: |
857 lines (+175/-131) 17 files modified
doc/rtd/topics/datasources/altcloud.rst (+12/-11) doc/rtd/topics/datasources/azure.rst (+2/-1) doc/rtd/topics/datasources/cloudstack.rst (+1/-1) doc/rtd/topics/datasources/configdrive.rst (+8/-8) doc/rtd/topics/datasources/digitalocean.rst (+4/-2) doc/rtd/topics/datasources/ec2.rst (+6/-5) doc/rtd/topics/datasources/exoscale.rst (+6/-6) doc/rtd/topics/datasources/nocloud.rst (+8/-8) doc/rtd/topics/datasources/opennebula.rst (+15/-15) doc/rtd/topics/datasources/openstack.rst (+2/-1) doc/rtd/topics/datasources/smartos.rst (+7/-5) doc/rtd/topics/debugging.rst (+7/-7) doc/rtd/topics/dir_layout.rst (+22/-17) doc/rtd/topics/examples.rst (+1/-1) doc/rtd/topics/format.rst (+53/-28) doc/rtd/topics/merging.rst (+12/-6) doc/rtd/topics/network-config-format-v2.rst (+9/-9) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dan Watkins | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Review via email: mp+372104@code.launchpad.net |
Commit message
docs: fix whitespace, spelling, and line length
Description of the change
To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote : | # |
review:
Approve
(continuous-integration)
Revision history for this message
Dan Watkins (oddbloke) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/doc/rtd/topics/datasources/altcloud.rst b/doc/rtd/topics/datasources/altcloud.rst | |||
2 | index eeb197f..9d7e3de 100644 | |||
3 | --- a/doc/rtd/topics/datasources/altcloud.rst | |||
4 | +++ b/doc/rtd/topics/datasources/altcloud.rst | |||
5 | @@ -3,24 +3,25 @@ | |||
6 | 3 | Alt Cloud | 3 | Alt Cloud |
7 | 4 | ========= | 4 | ========= |
8 | 5 | 5 | ||
10 | 6 | The datasource altcloud will be used to pick up user data on `RHEVm`_ and `vSphere`_. | 6 | The datasource altcloud will be used to pick up user data on `RHEVm`_ and |
11 | 7 | `vSphere`_. | ||
12 | 7 | 8 | ||
13 | 8 | RHEVm | 9 | RHEVm |
14 | 9 | ----- | 10 | ----- |
15 | 10 | 11 | ||
16 | 11 | For `RHEVm`_ v3.0 the userdata is injected into the VM using floppy | 12 | For `RHEVm`_ v3.0 the userdata is injected into the VM using floppy |
18 | 12 | injection via the `RHEVm`_ dashboard "Custom Properties". | 13 | injection via the `RHEVm`_ dashboard "Custom Properties". |
19 | 13 | 14 | ||
20 | 14 | The format of the Custom Properties entry must be: | 15 | The format of the Custom Properties entry must be: |
21 | 15 | 16 | ||
22 | 16 | :: | 17 | :: |
24 | 17 | 18 | ||
25 | 18 | floppyinject=user-data.txt:<base64 encoded data> | 19 | floppyinject=user-data.txt:<base64 encoded data> |
26 | 19 | 20 | ||
27 | 20 | For example to pass a simple bash script: | 21 | For example to pass a simple bash script: |
28 | 21 | 22 | ||
29 | 22 | .. sourcecode:: sh | 23 | .. sourcecode:: sh |
31 | 23 | 24 | ||
32 | 24 | % cat simple_script.bash | 25 | % cat simple_script.bash |
33 | 25 | #!/bin/bash | 26 | #!/bin/bash |
34 | 26 | echo "Hello Joe!" >> /tmp/JJV_Joe_out.txt | 27 | echo "Hello Joe!" >> /tmp/JJV_Joe_out.txt |
35 | @@ -38,7 +39,7 @@ set the "Custom Properties" when creating the RHEMv v3.0 VM to: | |||
36 | 38 | **NOTE:** The prefix with file name must be: ``floppyinject=user-data.txt:`` | 39 | **NOTE:** The prefix with file name must be: ``floppyinject=user-data.txt:`` |
37 | 39 | 40 | ||
38 | 40 | It is also possible to launch a `RHEVm`_ v3.0 VM and pass optional user | 41 | It is also possible to launch a `RHEVm`_ v3.0 VM and pass optional user |
40 | 41 | data to it using the Delta Cloud. | 42 | data to it using the Delta Cloud. |
41 | 42 | 43 | ||
42 | 43 | For more information on Delta Cloud see: http://deltacloud.apache.org | 44 | For more information on Delta Cloud see: http://deltacloud.apache.org |
43 | 44 | 45 | ||
44 | @@ -46,12 +47,12 @@ vSphere | |||
45 | 46 | ------- | 47 | ------- |
46 | 47 | 48 | ||
47 | 48 | For VMWare's `vSphere`_ the userdata is injected into the VM as an ISO | 49 | For VMWare's `vSphere`_ the userdata is injected into the VM as an ISO |
49 | 49 | via the cdrom. This can be done using the `vSphere`_ dashboard | 50 | via the cdrom. This can be done using the `vSphere`_ dashboard |
50 | 50 | by connecting an ISO image to the CD/DVD drive. | 51 | by connecting an ISO image to the CD/DVD drive. |
51 | 51 | 52 | ||
52 | 52 | To pass this example script to cloud-init running in a `vSphere`_ VM | 53 | To pass this example script to cloud-init running in a `vSphere`_ VM |
53 | 53 | set the CD/DVD drive when creating the vSphere VM to point to an | 54 | set the CD/DVD drive when creating the vSphere VM to point to an |
55 | 54 | ISO on the data store. | 55 | ISO on the data store. |
56 | 55 | 56 | ||
57 | 56 | **Note:** The ISO must contain the user data. | 57 | **Note:** The ISO must contain the user data. |
58 | 57 | 58 | ||
59 | @@ -61,13 +62,13 @@ Create the ISO | |||
60 | 61 | ^^^^^^^^^^^^^^ | 62 | ^^^^^^^^^^^^^^ |
61 | 62 | 63 | ||
62 | 63 | .. sourcecode:: sh | 64 | .. sourcecode:: sh |
64 | 64 | 65 | ||
65 | 65 | % mkdir my-iso | 66 | % mkdir my-iso |
66 | 66 | 67 | ||
67 | 67 | NOTE: The file name on the ISO must be: ``user-data.txt`` | 68 | NOTE: The file name on the ISO must be: ``user-data.txt`` |
68 | 68 | 69 | ||
69 | 69 | .. sourcecode:: sh | 70 | .. sourcecode:: sh |
71 | 70 | 71 | ||
72 | 71 | % cp simple_script.bash my-iso/user-data.txt | 72 | % cp simple_script.bash my-iso/user-data.txt |
73 | 72 | % genisoimage -o user-data.iso -r my-iso | 73 | % genisoimage -o user-data.iso -r my-iso |
74 | 73 | 74 | ||
75 | @@ -75,7 +76,7 @@ Verify the ISO | |||
76 | 75 | ^^^^^^^^^^^^^^ | 76 | ^^^^^^^^^^^^^^ |
77 | 76 | 77 | ||
78 | 77 | .. sourcecode:: sh | 78 | .. sourcecode:: sh |
80 | 78 | 79 | ||
81 | 79 | % sudo mkdir /media/vsphere_iso | 80 | % sudo mkdir /media/vsphere_iso |
82 | 80 | % sudo mount -o loop user-data.iso /media/vsphere_iso | 81 | % sudo mount -o loop user-data.iso /media/vsphere_iso |
83 | 81 | % cat /media/vsphere_iso/user-data.txt | 82 | % cat /media/vsphere_iso/user-data.txt |
84 | @@ -84,7 +85,7 @@ Verify the ISO | |||
85 | 84 | Then, launch the `vSphere`_ VM the ISO user-data.iso attached as a CDROM. | 85 | Then, launch the `vSphere`_ VM the ISO user-data.iso attached as a CDROM. |
86 | 85 | 86 | ||
87 | 86 | It is also possible to launch a `vSphere`_ VM and pass optional user | 87 | It is also possible to launch a `vSphere`_ VM and pass optional user |
89 | 87 | data to it using the Delta Cloud. | 88 | data to it using the Delta Cloud. |
90 | 88 | 89 | ||
91 | 89 | For more information on Delta Cloud see: http://deltacloud.apache.org | 90 | For more information on Delta Cloud see: http://deltacloud.apache.org |
92 | 90 | 91 | ||
93 | diff --git a/doc/rtd/topics/datasources/azure.rst b/doc/rtd/topics/datasources/azure.rst | |||
94 | index b41cddd..8328dfa 100644 | |||
95 | --- a/doc/rtd/topics/datasources/azure.rst | |||
96 | +++ b/doc/rtd/topics/datasources/azure.rst | |||
97 | @@ -82,7 +82,8 @@ The settings that may be configured are: | |||
98 | 82 | provided command to obtain metadata. | 82 | provided command to obtain metadata. |
99 | 83 | * **apply_network_config**: Boolean set to True to use network configuration | 83 | * **apply_network_config**: Boolean set to True to use network configuration |
100 | 84 | described by Azure's IMDS endpoint instead of fallback network config of | 84 | described by Azure's IMDS endpoint instead of fallback network config of |
102 | 85 | dhcp on eth0. Default is True. For Ubuntu 16.04 or earlier, default is False. | 85 | dhcp on eth0. Default is True. For Ubuntu 16.04 or earlier, default is |
103 | 86 | False. | ||
104 | 86 | * **data_dir**: Path used to read metadata files and write crawled data. | 87 | * **data_dir**: Path used to read metadata files and write crawled data. |
105 | 87 | * **dhclient_lease_file**: The fallback lease file to source when looking for | 88 | * **dhclient_lease_file**: The fallback lease file to source when looking for |
106 | 88 | custom DHCP option 245 from Azure fabric. | 89 | custom DHCP option 245 from Azure fabric. |
107 | diff --git a/doc/rtd/topics/datasources/cloudstack.rst b/doc/rtd/topics/datasources/cloudstack.rst | |||
108 | index a3101ed..95b9587 100644 | |||
109 | --- a/doc/rtd/topics/datasources/cloudstack.rst | |||
110 | +++ b/doc/rtd/topics/datasources/cloudstack.rst | |||
111 | @@ -7,7 +7,7 @@ CloudStack | |||
112 | 7 | sshkey thru the Virtual-Router. The datasource obtains the VR address via | 7 | sshkey thru the Virtual-Router. The datasource obtains the VR address via |
113 | 8 | dhcp lease information given to the instance. | 8 | dhcp lease information given to the instance. |
114 | 9 | For more details on meta-data and user-data, | 9 | For more details on meta-data and user-data, |
116 | 10 | refer the `CloudStack Administrator Guide`_. | 10 | refer the `CloudStack Administrator Guide`_. |
117 | 11 | 11 | ||
118 | 12 | URLs to access user-data and meta-data from the Virtual Machine. Here 10.1.1.1 | 12 | URLs to access user-data and meta-data from the Virtual Machine. Here 10.1.1.1 |
119 | 13 | is the Virtual Router IP: | 13 | is the Virtual Router IP: |
120 | diff --git a/doc/rtd/topics/datasources/configdrive.rst b/doc/rtd/topics/datasources/configdrive.rst | |||
121 | index f1a488a..f4c5a34 100644 | |||
122 | --- a/doc/rtd/topics/datasources/configdrive.rst | |||
123 | +++ b/doc/rtd/topics/datasources/configdrive.rst | |||
124 | @@ -64,7 +64,7 @@ The following criteria are required to as a config drive: | |||
125 | 64 | :: | 64 | :: |
126 | 65 | 65 | ||
127 | 66 | openstack/ | 66 | openstack/ |
129 | 67 | - 2012-08-10/ or latest/ | 67 | - 2012-08-10/ or latest/ |
130 | 68 | - meta_data.json | 68 | - meta_data.json |
131 | 69 | - user_data (not mandatory) | 69 | - user_data (not mandatory) |
132 | 70 | - content/ | 70 | - content/ |
133 | @@ -83,7 +83,7 @@ only) file in the following ways. | |||
134 | 83 | 83 | ||
135 | 84 | :: | 84 | :: |
136 | 85 | 85 | ||
138 | 86 | dsmode: | 86 | dsmode: |
139 | 87 | values: local, net, pass | 87 | values: local, net, pass |
140 | 88 | default: pass | 88 | default: pass |
141 | 89 | 89 | ||
142 | @@ -97,10 +97,10 @@ The difference between 'local' and 'net' is that local will not require | |||
143 | 97 | networking to be up before user-data actions (or boothooks) are run. | 97 | networking to be up before user-data actions (or boothooks) are run. |
144 | 98 | 98 | ||
145 | 99 | :: | 99 | :: |
147 | 100 | 100 | ||
148 | 101 | instance-id: | 101 | instance-id: |
149 | 102 | default: iid-dsconfigdrive | 102 | default: iid-dsconfigdrive |
151 | 103 | 103 | ||
152 | 104 | This is utilized as the metadata's instance-id. It should generally | 104 | This is utilized as the metadata's instance-id. It should generally |
153 | 105 | be unique, as it is what is used to determine "is this a new instance". | 105 | be unique, as it is what is used to determine "is this a new instance". |
154 | 106 | 106 | ||
155 | @@ -108,18 +108,18 @@ be unique, as it is what is used to determine "is this a new instance". | |||
156 | 108 | 108 | ||
157 | 109 | public-keys: | 109 | public-keys: |
158 | 110 | default: None | 110 | default: None |
160 | 111 | 111 | ||
161 | 112 | If present, these keys will be used as the public keys for the | 112 | If present, these keys will be used as the public keys for the |
162 | 113 | instance. This value overrides the content in authorized_keys. | 113 | instance. This value overrides the content in authorized_keys. |
163 | 114 | 114 | ||
164 | 115 | Note: it is likely preferable to provide keys via user-data | 115 | Note: it is likely preferable to provide keys via user-data |
165 | 116 | 116 | ||
166 | 117 | :: | 117 | :: |
168 | 118 | 118 | ||
169 | 119 | user-data: | 119 | user-data: |
170 | 120 | default: None | 120 | default: None |
173 | 121 | 121 | ||
174 | 122 | This provides cloud-init user-data. See :ref:`examples <yaml_examples>` for | 122 | This provides cloud-init user-data. See :ref:`examples <yaml_examples>` for |
175 | 123 | what all can be present here. | 123 | what all can be present here. |
176 | 124 | 124 | ||
177 | 125 | .. _OpenStack: http://www.openstack.org/ | 125 | .. _OpenStack: http://www.openstack.org/ |
178 | diff --git a/doc/rtd/topics/datasources/digitalocean.rst b/doc/rtd/topics/datasources/digitalocean.rst | |||
179 | index 938ede8..88f1e5f 100644 | |||
180 | --- a/doc/rtd/topics/datasources/digitalocean.rst | |||
181 | +++ b/doc/rtd/topics/datasources/digitalocean.rst | |||
182 | @@ -20,8 +20,10 @@ DigitalOcean's datasource can be configured as follows: | |||
183 | 20 | retries: 3 | 20 | retries: 3 |
184 | 21 | timeout: 2 | 21 | timeout: 2 |
185 | 22 | 22 | ||
188 | 23 | - *retries*: Determines the number of times to attempt to connect to the metadata service | 23 | - *retries*: Determines the number of times to attempt to connect to the |
189 | 24 | - *timeout*: Determines the timeout in seconds to wait for a response from the metadata service | 24 | metadata service |
190 | 25 | - *timeout*: Determines the timeout in seconds to wait for a response from the | ||
191 | 26 | metadata service | ||
192 | 25 | 27 | ||
193 | 26 | .. _DigitalOcean: http://digitalocean.com/ | 28 | .. _DigitalOcean: http://digitalocean.com/ |
194 | 27 | .. _metadata service: https://developers.digitalocean.com/metadata/ | 29 | .. _metadata service: https://developers.digitalocean.com/metadata/ |
195 | diff --git a/doc/rtd/topics/datasources/ec2.rst b/doc/rtd/topics/datasources/ec2.rst | |||
196 | index 76beca9..a90f377 100644 | |||
197 | --- a/doc/rtd/topics/datasources/ec2.rst | |||
198 | +++ b/doc/rtd/topics/datasources/ec2.rst | |||
199 | @@ -13,7 +13,7 @@ instance metadata. | |||
200 | 13 | Metadata is accessible via the following URL: | 13 | Metadata is accessible via the following URL: |
201 | 14 | 14 | ||
202 | 15 | :: | 15 | :: |
204 | 16 | 16 | ||
205 | 17 | GET http://169.254.169.254/2009-04-04/meta-data/ | 17 | GET http://169.254.169.254/2009-04-04/meta-data/ |
206 | 18 | ami-id | 18 | ami-id |
207 | 19 | ami-launch-index | 19 | ami-launch-index |
208 | @@ -34,19 +34,20 @@ Metadata is accessible via the following URL: | |||
209 | 34 | Userdata is accessible via the following URL: | 34 | Userdata is accessible via the following URL: |
210 | 35 | 35 | ||
211 | 36 | :: | 36 | :: |
213 | 37 | 37 | ||
214 | 38 | GET http://169.254.169.254/2009-04-04/user-data | 38 | GET http://169.254.169.254/2009-04-04/user-data |
215 | 39 | 1234,fred,reboot,true | 4512,jimbo, | 173,,, | 39 | 1234,fred,reboot,true | 4512,jimbo, | 173,,, |
216 | 40 | 40 | ||
217 | 41 | Note that there are multiple versions of this data provided, cloud-init | 41 | Note that there are multiple versions of this data provided, cloud-init |
218 | 42 | by default uses **2009-04-04** but newer versions can be supported with | 42 | by default uses **2009-04-04** but newer versions can be supported with |
219 | 43 | relative ease (newer versions have more data exposed, while maintaining | 43 | relative ease (newer versions have more data exposed, while maintaining |
221 | 44 | backward compatibility with the previous versions). | 44 | backward compatibility with the previous versions). |
222 | 45 | 45 | ||
224 | 46 | To see which versions are supported from your cloud provider use the following URL: | 46 | To see which versions are supported from your cloud provider use the following |
225 | 47 | URL: | ||
226 | 47 | 48 | ||
227 | 48 | :: | 49 | :: |
229 | 49 | 50 | ||
230 | 50 | GET http://169.254.169.254/ | 51 | GET http://169.254.169.254/ |
231 | 51 | 1.0 | 52 | 1.0 |
232 | 52 | 2007-01-19 | 53 | 2007-01-19 |
233 | diff --git a/doc/rtd/topics/datasources/exoscale.rst b/doc/rtd/topics/datasources/exoscale.rst | |||
234 | index 27aec9c..9074edc 100644 | |||
235 | --- a/doc/rtd/topics/datasources/exoscale.rst | |||
236 | +++ b/doc/rtd/topics/datasources/exoscale.rst | |||
237 | @@ -26,8 +26,8 @@ In the password server case, the following rules apply in order to enable the | |||
238 | 26 | "restore instance password" functionality: | 26 | "restore instance password" functionality: |
239 | 27 | 27 | ||
240 | 28 | * If a password is returned by the password server, it is then marked "saved" | 28 | * If a password is returned by the password server, it is then marked "saved" |
243 | 29 | by the cloud-init datasource. Subsequent boots will skip setting the password | 29 | by the cloud-init datasource. Subsequent boots will skip setting the |
244 | 30 | (the password server will return "saved_password"). | 30 | password (the password server will return "saved_password"). |
245 | 31 | * When the instance password is reset (via the Exoscale UI), the password | 31 | * When the instance password is reset (via the Exoscale UI), the password |
246 | 32 | server will return the non-empty password at next boot, therefore causing | 32 | server will return the non-empty password at next boot, therefore causing |
247 | 33 | cloud-init to reset the instance's password. | 33 | cloud-init to reset the instance's password. |
248 | @@ -38,15 +38,15 @@ Configuration | |||
249 | 38 | Users of this datasource are discouraged from changing the default settings | 38 | Users of this datasource are discouraged from changing the default settings |
250 | 39 | unless instructed to by Exoscale support. | 39 | unless instructed to by Exoscale support. |
251 | 40 | 40 | ||
254 | 41 | The following settings are available and can be set for the datasource in system | 41 | The following settings are available and can be set for the datasource in |
255 | 42 | configuration (in `/etc/cloud/cloud.cfg.d/`). | 42 | system configuration (in `/etc/cloud/cloud.cfg.d/`). |
256 | 43 | 43 | ||
257 | 44 | The settings available are: | 44 | The settings available are: |
258 | 45 | 45 | ||
259 | 46 | * **metadata_url**: The URL for the metadata service (defaults to | 46 | * **metadata_url**: The URL for the metadata service (defaults to |
260 | 47 | ``http://169.254.169.254``) | 47 | ``http://169.254.169.254``) |
263 | 48 | * **api_version**: The API version path on which to query the instance metadata | 48 | * **api_version**: The API version path on which to query the instance |
264 | 49 | (defaults to ``1.0``) | 49 | metadata (defaults to ``1.0``) |
265 | 50 | * **password_server_port**: The port (on the metadata server) on which the | 50 | * **password_server_port**: The port (on the metadata server) on which the |
266 | 51 | password server listens (defaults to ``8080``). | 51 | password server listens (defaults to ``8080``). |
267 | 52 | * **timeout**: the timeout value provided to urlopen for each individual http | 52 | * **timeout**: the timeout value provided to urlopen for each individual http |
268 | diff --git a/doc/rtd/topics/datasources/nocloud.rst b/doc/rtd/topics/datasources/nocloud.rst | |||
269 | index 1c5cf96..bc96f7f 100644 | |||
270 | --- a/doc/rtd/topics/datasources/nocloud.rst | |||
271 | +++ b/doc/rtd/topics/datasources/nocloud.rst | |||
272 | @@ -57,24 +57,24 @@ Given a disk ubuntu 12.04 cloud image in 'disk.img', you can create a | |||
273 | 57 | sufficient disk by following the example below. | 57 | sufficient disk by following the example below. |
274 | 58 | 58 | ||
275 | 59 | :: | 59 | :: |
277 | 60 | 60 | ||
278 | 61 | ## create user-data and meta-data files that will be used | 61 | ## create user-data and meta-data files that will be used |
279 | 62 | ## to modify image on first boot | 62 | ## to modify image on first boot |
280 | 63 | $ { echo instance-id: iid-local01; echo local-hostname: cloudimg; } > meta-data | 63 | $ { echo instance-id: iid-local01; echo local-hostname: cloudimg; } > meta-data |
282 | 64 | 64 | ||
283 | 65 | $ printf "#cloud-config\npassword: passw0rd\nchpasswd: { expire: False }\nssh_pwauth: True\n" > user-data | 65 | $ printf "#cloud-config\npassword: passw0rd\nchpasswd: { expire: False }\nssh_pwauth: True\n" > user-data |
285 | 66 | 66 | ||
286 | 67 | ## create a disk to attach with some user-data and meta-data | 67 | ## create a disk to attach with some user-data and meta-data |
287 | 68 | $ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data | 68 | $ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data |
289 | 69 | 69 | ||
290 | 70 | ## alternatively, create a vfat filesystem with same files | 70 | ## alternatively, create a vfat filesystem with same files |
291 | 71 | ## $ truncate --size 2M seed.img | 71 | ## $ truncate --size 2M seed.img |
292 | 72 | ## $ mkfs.vfat -n cidata seed.img | 72 | ## $ mkfs.vfat -n cidata seed.img |
293 | 73 | ## $ mcopy -oi seed.img user-data meta-data :: | 73 | ## $ mcopy -oi seed.img user-data meta-data :: |
295 | 74 | 74 | ||
296 | 75 | ## create a new qcow image to boot, backed by your original image | 75 | ## create a new qcow image to boot, backed by your original image |
297 | 76 | $ qemu-img create -f qcow2 -b disk.img boot-disk.img | 76 | $ qemu-img create -f qcow2 -b disk.img boot-disk.img |
299 | 77 | 77 | ||
300 | 78 | ## boot the image and login as 'ubuntu' with password 'passw0rd' | 78 | ## boot the image and login as 'ubuntu' with password 'passw0rd' |
301 | 79 | ## note, passw0rd was set as password through the user-data above, | 79 | ## note, passw0rd was set as password through the user-data above, |
302 | 80 | ## there is no password set on these images. | 80 | ## there is no password set on these images. |
303 | @@ -88,12 +88,12 @@ to determine if this is "first boot". So if you are making updates to | |||
304 | 88 | user-data you will also have to change that, or start the disk fresh. | 88 | user-data you will also have to change that, or start the disk fresh. |
305 | 89 | 89 | ||
306 | 90 | Also, you can inject an ``/etc/network/interfaces`` file by providing the | 90 | Also, you can inject an ``/etc/network/interfaces`` file by providing the |
308 | 91 | content for that file in the ``network-interfaces`` field of metadata. | 91 | content for that file in the ``network-interfaces`` field of metadata. |
309 | 92 | 92 | ||
310 | 93 | Example metadata: | 93 | Example metadata: |
311 | 94 | 94 | ||
312 | 95 | :: | 95 | :: |
314 | 96 | 96 | ||
315 | 97 | instance-id: iid-abcdefg | 97 | instance-id: iid-abcdefg |
316 | 98 | network-interfaces: | | 98 | network-interfaces: | |
317 | 99 | iface eth0 inet static | 99 | iface eth0 inet static |
318 | diff --git a/doc/rtd/topics/datasources/opennebula.rst b/doc/rtd/topics/datasources/opennebula.rst | |||
319 | index 7c0367c..8e7c255 100644 | |||
320 | --- a/doc/rtd/topics/datasources/opennebula.rst | |||
321 | +++ b/doc/rtd/topics/datasources/opennebula.rst | |||
322 | @@ -21,7 +21,7 @@ Datasource configuration | |||
323 | 21 | Datasource accepts following configuration options. | 21 | Datasource accepts following configuration options. |
324 | 22 | 22 | ||
325 | 23 | :: | 23 | :: |
327 | 24 | 24 | ||
328 | 25 | dsmode: | 25 | dsmode: |
329 | 26 | values: local, net, disabled | 26 | values: local, net, disabled |
330 | 27 | default: net | 27 | default: net |
331 | @@ -30,7 +30,7 @@ Tells if this datasource will be processed in 'local' (pre-networking) or | |||
332 | 30 | 'net' (post-networking) stage or even completely 'disabled'. | 30 | 'net' (post-networking) stage or even completely 'disabled'. |
333 | 31 | 31 | ||
334 | 32 | :: | 32 | :: |
336 | 33 | 33 | ||
337 | 34 | parseuser: | 34 | parseuser: |
338 | 35 | default: nobody | 35 | default: nobody |
339 | 36 | 36 | ||
340 | @@ -46,7 +46,7 @@ The following criteria are required: | |||
341 | 46 | or have a *filesystem* label of **CONTEXT** or **CDROM** | 46 | or have a *filesystem* label of **CONTEXT** or **CDROM** |
342 | 47 | 2. Must contain file *context.sh* with contextualization variables. | 47 | 2. Must contain file *context.sh* with contextualization variables. |
343 | 48 | File is generated by OpenNebula, it has a KEY='VALUE' format and | 48 | File is generated by OpenNebula, it has a KEY='VALUE' format and |
345 | 49 | can be easily read by bash | 49 | can be easily read by bash |
346 | 50 | 50 | ||
347 | 51 | Contextualization variables | 51 | Contextualization variables |
348 | 52 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 52 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
349 | @@ -57,7 +57,7 @@ the OpenNebula documentation. Where multiple similar variables are | |||
350 | 57 | specified, only first found is taken. | 57 | specified, only first found is taken. |
351 | 58 | 58 | ||
352 | 59 | :: | 59 | :: |
354 | 60 | 60 | ||
355 | 61 | DSMODE | 61 | DSMODE |
356 | 62 | 62 | ||
357 | 63 | Datasource mode configuration override. Values: local, net, disabled. | 63 | Datasource mode configuration override. Values: local, net, disabled. |
358 | @@ -75,30 +75,30 @@ Datasource mode configuration override. Values: local, net, disabled. | |||
359 | 75 | Static `network configuration`_. | 75 | Static `network configuration`_. |
360 | 76 | 76 | ||
361 | 77 | :: | 77 | :: |
363 | 78 | 78 | ||
364 | 79 | HOSTNAME | 79 | HOSTNAME |
365 | 80 | 80 | ||
366 | 81 | Instance hostname. | 81 | Instance hostname. |
367 | 82 | 82 | ||
368 | 83 | :: | 83 | :: |
370 | 84 | 84 | ||
371 | 85 | PUBLIC_IP | 85 | PUBLIC_IP |
372 | 86 | IP_PUBLIC | 86 | IP_PUBLIC |
373 | 87 | ETH0_IP | 87 | ETH0_IP |
374 | 88 | 88 | ||
375 | 89 | If no hostname has been specified, cloud-init will try to create hostname | 89 | If no hostname has been specified, cloud-init will try to create hostname |
377 | 90 | from instance's IP address in 'local' dsmode. In 'net' dsmode, cloud-init | 90 | from instance's IP address in 'local' dsmode. In 'net' dsmode, cloud-init |
378 | 91 | tries to resolve one of its IP addresses to get hostname. | 91 | tries to resolve one of its IP addresses to get hostname. |
379 | 92 | 92 | ||
380 | 93 | :: | 93 | :: |
382 | 94 | 94 | ||
383 | 95 | SSH_KEY | 95 | SSH_KEY |
384 | 96 | SSH_PUBLIC_KEY | 96 | SSH_PUBLIC_KEY |
385 | 97 | 97 | ||
386 | 98 | One or multiple SSH keys (separated by newlines) can be specified. | 98 | One or multiple SSH keys (separated by newlines) can be specified. |
387 | 99 | 99 | ||
388 | 100 | :: | 100 | :: |
390 | 101 | 101 | ||
391 | 102 | USER_DATA | 102 | USER_DATA |
392 | 103 | USERDATA | 103 | USERDATA |
393 | 104 | 104 | ||
394 | @@ -111,7 +111,7 @@ This example cloud-init configuration (*cloud.cfg*) enables | |||
395 | 111 | OpenNebula datasource only in 'net' mode. | 111 | OpenNebula datasource only in 'net' mode. |
396 | 112 | 112 | ||
397 | 113 | :: | 113 | :: |
399 | 114 | 114 | ||
400 | 115 | disable_ec2_metadata: True | 115 | disable_ec2_metadata: True |
401 | 116 | datasource_list: ['OpenNebula'] | 116 | datasource_list: ['OpenNebula'] |
402 | 117 | datasource: | 117 | datasource: |
403 | @@ -123,17 +123,17 @@ Example VM's context section | |||
404 | 123 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 123 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
405 | 124 | 124 | ||
406 | 125 | :: | 125 | :: |
408 | 126 | 126 | ||
409 | 127 | CONTEXT=[ | 127 | CONTEXT=[ |
410 | 128 | PUBLIC_IP="$NIC[IP]", | 128 | PUBLIC_IP="$NIC[IP]", |
413 | 129 | SSH_KEY="$USER[SSH_KEY] | 129 | SSH_KEY="$USER[SSH_KEY] |
414 | 130 | $USER[SSH_KEY1] | 130 | $USER[SSH_KEY1] |
415 | 131 | $USER[SSH_KEY2] ", | 131 | $USER[SSH_KEY2] ", |
416 | 132 | USER_DATA="#cloud-config | 132 | USER_DATA="#cloud-config |
417 | 133 | # see https://help.ubuntu.com/community/CloudInit | 133 | # see https://help.ubuntu.com/community/CloudInit |
419 | 134 | 134 | ||
420 | 135 | packages: [] | 135 | packages: [] |
422 | 136 | 136 | ||
423 | 137 | mounts: | 137 | mounts: |
424 | 138 | - [vdc,none,swap,sw,0,0] | 138 | - [vdc,none,swap,sw,0,0] |
425 | 139 | runcmd: | 139 | runcmd: |
426 | diff --git a/doc/rtd/topics/datasources/openstack.rst b/doc/rtd/topics/datasources/openstack.rst | |||
427 | index 421da08..8ce2a53 100644 | |||
428 | --- a/doc/rtd/topics/datasources/openstack.rst | |||
429 | +++ b/doc/rtd/topics/datasources/openstack.rst | |||
430 | @@ -78,6 +78,7 @@ upgrade packages and install ``htop`` on all instances: | |||
431 | 78 | {"cloud-init": "#cloud-config\npackage_upgrade: True\npackages:\n - htop"} | 78 | {"cloud-init": "#cloud-config\npackage_upgrade: True\npackages:\n - htop"} |
432 | 79 | 79 | ||
433 | 80 | For more general information about how cloud-init handles vendor data, | 80 | For more general information about how cloud-init handles vendor data, |
435 | 81 | including how it can be disabled by users on instances, see :doc:`/topics/vendordata`. | 81 | including how it can be disabled by users on instances, see |
436 | 82 | :doc:`/topics/vendordata`. | ||
437 | 82 | 83 | ||
438 | 83 | .. vi: textwidth=78 | 84 | .. vi: textwidth=78 |
439 | diff --git a/doc/rtd/topics/datasources/smartos.rst b/doc/rtd/topics/datasources/smartos.rst | |||
440 | index cb9a128..be11dfb 100644 | |||
441 | --- a/doc/rtd/topics/datasources/smartos.rst | |||
442 | +++ b/doc/rtd/topics/datasources/smartos.rst | |||
443 | @@ -15,7 +15,8 @@ second serial console. On Linux, this is /dev/ttyS1. The data is a provided | |||
444 | 15 | via a simple protocol: something queries for the data, the console responds | 15 | via a simple protocol: something queries for the data, the console responds |
445 | 16 | responds with the status and if "SUCCESS" returns until a single ".\n". | 16 | responds with the status and if "SUCCESS" returns until a single ".\n". |
446 | 17 | 17 | ||
448 | 18 | New versions of the SmartOS tooling will include support for base64 encoded data. | 18 | New versions of the SmartOS tooling will include support for base64 encoded |
449 | 19 | data. | ||
450 | 19 | 20 | ||
451 | 20 | Meta-data channels | 21 | Meta-data channels |
452 | 21 | ------------------ | 22 | ------------------ |
453 | @@ -27,7 +28,7 @@ channels of SmartOS. | |||
454 | 27 | 28 | ||
455 | 28 | - per the spec, user-data is for consumption by the end-user, not | 29 | - per the spec, user-data is for consumption by the end-user, not |
456 | 29 | provisioning tools | 30 | provisioning tools |
458 | 30 | - cloud-init entirely ignores this channel other than writting it to disk | 31 | - cloud-init entirely ignores this channel other than writing it to disk |
459 | 31 | - removal of the meta-data key means that /var/db/user-data gets removed | 32 | - removal of the meta-data key means that /var/db/user-data gets removed |
460 | 32 | - a backup of previous meta-data is maintained as | 33 | - a backup of previous meta-data is maintained as |
461 | 33 | /var/db/user-data.<timestamp>. <timestamp> is the epoch time when | 34 | /var/db/user-data.<timestamp>. <timestamp> is the epoch time when |
462 | @@ -42,8 +43,9 @@ channels of SmartOS. | |||
463 | 42 | - <timestamp> is the epoch time when cloud-init ran. | 43 | - <timestamp> is the epoch time when cloud-init ran. |
464 | 43 | - when the 'user-script' meta-data key goes missing, the user-script is | 44 | - when the 'user-script' meta-data key goes missing, the user-script is |
465 | 44 | removed from the file system, although a backup is maintained. | 45 | removed from the file system, although a backup is maintained. |
468 | 45 | - if the script is not shebanged (i.e. starts with #!<executable>), then | 46 | - if the script does not start with a shebang (i.e. starts with |
469 | 46 | or is not an executable, cloud-init will add a shebang of "#!/bin/bash" | 47 | #!<executable>), then or is not an executable, cloud-init will add a |
470 | 48 | shebang of "#!/bin/bash" | ||
471 | 47 | 49 | ||
472 | 48 | * cloud-init:user-data is treated like on other Clouds. | 50 | * cloud-init:user-data is treated like on other Clouds. |
473 | 49 | 51 | ||
474 | @@ -133,7 +135,7 @@ or not to base64 decode something: | |||
475 | 133 | * base64_all: Except for excluded keys, attempt to base64 decode | 135 | * base64_all: Except for excluded keys, attempt to base64 decode |
476 | 134 | the values. If the value fails to decode properly, it will be | 136 | the values. If the value fails to decode properly, it will be |
477 | 135 | returned in its text | 137 | returned in its text |
479 | 136 | * base64_keys: A comma deliminated list of which keys are base64 encoded. | 138 | * base64_keys: A comma delimited list of which keys are base64 encoded. |
480 | 137 | * b64-<key>: | 139 | * b64-<key>: |
481 | 138 | for any key, if there exists an entry in the metadata for 'b64-<key>' | 140 | for any key, if there exists an entry in the metadata for 'b64-<key>' |
482 | 139 | Then 'b64-<key>' is expected to be a plaintext boolean indicating whether | 141 | Then 'b64-<key>' is expected to be a plaintext boolean indicating whether |
483 | diff --git a/doc/rtd/topics/debugging.rst b/doc/rtd/topics/debugging.rst | |||
484 | index e13d915..afcf267 100644 | |||
485 | --- a/doc/rtd/topics/debugging.rst | |||
486 | +++ b/doc/rtd/topics/debugging.rst | |||
487 | @@ -68,18 +68,18 @@ subcommands default to reading /var/log/cloud-init.log. | |||
488 | 68 | 00.00100s (modules-final/config-rightscale_userdata) | 68 | 00.00100s (modules-final/config-rightscale_userdata) |
489 | 69 | ... | 69 | ... |
490 | 70 | 70 | ||
492 | 71 | * ``analyze boot`` Make subprocess calls to the kernel in order to get relevant | 71 | * ``analyze boot`` Make subprocess calls to the kernel in order to get relevant |
493 | 72 | pre-cloud-init timestamps, such as the kernel start, kernel finish boot, and cloud-init start. | 72 | pre-cloud-init timestamps, such as the kernel start, kernel finish boot, and cloud-init start. |
494 | 73 | 73 | ||
495 | 74 | .. code-block:: shell-session | 74 | .. code-block:: shell-session |
496 | 75 | 75 | ||
498 | 76 | $ cloud-init analyze boot | 76 | $ cloud-init analyze boot |
499 | 77 | -- Most Recent Boot Record -- | 77 | -- Most Recent Boot Record -- |
505 | 78 | Kernel Started at: 2019-06-13 15:59:55.809385 | 78 | Kernel Started at: 2019-06-13 15:59:55.809385 |
506 | 79 | Kernel ended boot at: 2019-06-13 16:00:00.944740 | 79 | Kernel ended boot at: 2019-06-13 16:00:00.944740 |
507 | 80 | Kernel time to boot (seconds): 5.135355 | 80 | Kernel time to boot (seconds): 5.135355 |
508 | 81 | Cloud-init start: 2019-06-13 16:00:05.738396 | 81 | Cloud-init start: 2019-06-13 16:00:05.738396 |
509 | 82 | Time between Kernel boot and Cloud-init start (seconds): 4.793656 | 82 | Time between Kernel boot and Cloud-init start (seconds): 4.793656 |
510 | 83 | 83 | ||
511 | 84 | 84 | ||
512 | 85 | Analyze quickstart - LXC | 85 | Analyze quickstart - LXC |
513 | diff --git a/doc/rtd/topics/dir_layout.rst b/doc/rtd/topics/dir_layout.rst | |||
514 | index 7a6265e..ebd63ae 100644 | |||
515 | --- a/doc/rtd/topics/dir_layout.rst | |||
516 | +++ b/doc/rtd/topics/dir_layout.rst | |||
517 | @@ -2,11 +2,12 @@ | |||
518 | 2 | Directory layout | 2 | Directory layout |
519 | 3 | **************** | 3 | **************** |
520 | 4 | 4 | ||
522 | 5 | Cloudinits's directory structure is somewhat different from a regular application:: | 5 | Cloud-init's directory structure is somewhat different from a regular |
523 | 6 | application:: | ||
524 | 6 | 7 | ||
525 | 7 | /var/lib/cloud/ | 8 | /var/lib/cloud/ |
526 | 8 | - data/ | 9 | - data/ |
528 | 9 | - instance-id | 10 | - instance-id |
529 | 10 | - previous-instance-id | 11 | - previous-instance-id |
530 | 11 | - datasource | 12 | - datasource |
531 | 12 | - previous-datasource | 13 | - previous-datasource |
532 | @@ -35,38 +36,41 @@ Cloudinits's directory structure is somewhat different from a regular applicatio | |||
533 | 35 | 36 | ||
534 | 36 | The main directory containing the cloud-init specific subdirectories. | 37 | The main directory containing the cloud-init specific subdirectories. |
535 | 37 | It is typically located at ``/var/lib`` but there are certain configuration | 38 | It is typically located at ``/var/lib`` but there are certain configuration |
537 | 38 | scenarios where this can be altered. | 39 | scenarios where this can be altered. |
538 | 39 | 40 | ||
539 | 40 | TBD, describe this overriding more. | 41 | TBD, describe this overriding more. |
540 | 41 | 42 | ||
541 | 42 | ``data/`` | 43 | ``data/`` |
542 | 43 | 44 | ||
546 | 44 | Contains information related to instance ids, datasources and hostnames of the previous | 45 | Contains information related to instance ids, datasources and hostnames of |
547 | 45 | and current instance if they are different. These can be examined as needed to | 46 | the previous and current instance if they are different. These can be |
548 | 46 | determine any information related to a previous boot (if applicable). | 47 | examined as needed to determine any information related to a previous boot |
549 | 48 | (if applicable). | ||
550 | 47 | 49 | ||
551 | 48 | ``handlers/`` | 50 | ``handlers/`` |
552 | 49 | 51 | ||
556 | 50 | Custom ``part-handlers`` code is written out here. Files that end up here are written | 52 | Custom ``part-handlers`` code is written out here. Files that end up here are |
557 | 51 | out with in the scheme of ``part-handler-XYZ`` where ``XYZ`` is the handler number (the | 53 | written out with in the scheme of ``part-handler-XYZ`` where ``XYZ`` is the |
558 | 52 | first handler found starts at 0). | 54 | handler number (the first handler found starts at 0). |
559 | 53 | 55 | ||
560 | 54 | 56 | ||
561 | 55 | ``instance`` | 57 | ``instance`` |
562 | 56 | 58 | ||
565 | 57 | A symlink to the current ``instances/`` subdirectory that points to the currently | 59 | A symlink to the current ``instances/`` subdirectory that points to the |
566 | 58 | active instance (which is active is dependent on the datasource loaded). | 60 | currently active instance (which is active is dependent on the datasource |
567 | 61 | loaded). | ||
568 | 59 | 62 | ||
569 | 60 | ``instances/`` | 63 | ``instances/`` |
570 | 61 | 64 | ||
574 | 62 | All instances that were created using this image end up with instance identifier | 65 | All instances that were created using this image end up with instance |
575 | 63 | subdirectories (and corresponding data for each instance). The currently active | 66 | identifier subdirectories (and corresponding data for each instance). The |
576 | 64 | instance will be symlinked the ``instance`` symlink file defined previously. | 67 | currently active instance will be symlinked the ``instance`` symlink file |
577 | 68 | defined previously. | ||
578 | 65 | 69 | ||
579 | 66 | ``scripts/`` | 70 | ``scripts/`` |
580 | 67 | 71 | ||
583 | 68 | Scripts that are downloaded/created by the corresponding ``part-handler`` will end up | 72 | Scripts that are downloaded/created by the corresponding ``part-handler`` |
584 | 69 | in one of these subdirectories. | 73 | will end up in one of these subdirectories. |
585 | 70 | 74 | ||
586 | 71 | ``seed/`` | 75 | ``seed/`` |
587 | 72 | 76 | ||
588 | @@ -77,6 +81,7 @@ Cloudinits's directory structure is somewhat different from a regular applicatio | |||
589 | 77 | Cloud-init has a concept of a module semaphore, which basically consists | 81 | Cloud-init has a concept of a module semaphore, which basically consists |
590 | 78 | of the module name and its frequency. These files are used to ensure a module | 82 | of the module name and its frequency. These files are used to ensure a module |
591 | 79 | is only ran `per-once`, `per-instance`, `per-always`. This folder contains | 83 | is only ran `per-once`, `per-instance`, `per-always`. This folder contains |
593 | 80 | semaphore `files` which are only supposed to run `per-once` (not tied to the instance id). | 84 | semaphore `files` which are only supposed to run `per-once` (not tied to the |
594 | 85 | instance id). | ||
595 | 81 | 86 | ||
596 | 82 | .. vi: textwidth=78 | 87 | .. vi: textwidth=78 |
597 | diff --git a/doc/rtd/topics/examples.rst b/doc/rtd/topics/examples.rst | |||
598 | index c30d226..62b8ee4 100644 | |||
599 | --- a/doc/rtd/topics/examples.rst | |||
600 | +++ b/doc/rtd/topics/examples.rst | |||
601 | @@ -134,7 +134,7 @@ Configure instances ssh-keys | |||
602 | 134 | .. literalinclude:: ../../examples/cloud-config-ssh-keys.txt | 134 | .. literalinclude:: ../../examples/cloud-config-ssh-keys.txt |
603 | 135 | :language: yaml | 135 | :language: yaml |
604 | 136 | :linenos: | 136 | :linenos: |
606 | 137 | 137 | ||
607 | 138 | Additional apt configuration | 138 | Additional apt configuration |
608 | 139 | ============================ | 139 | ============================ |
609 | 140 | 140 | ||
610 | diff --git a/doc/rtd/topics/format.rst b/doc/rtd/topics/format.rst | |||
611 | index 74d1fee..7605040 100644 | |||
612 | --- a/doc/rtd/topics/format.rst | |||
613 | +++ b/doc/rtd/topics/format.rst | |||
614 | @@ -4,22 +4,24 @@ | |||
615 | 4 | User-Data Formats | 4 | User-Data Formats |
616 | 5 | ***************** | 5 | ***************** |
617 | 6 | 6 | ||
619 | 7 | User data that will be acted upon by cloud-init must be in one of the following types. | 7 | User data that will be acted upon by cloud-init must be in one of the following |
620 | 8 | types. | ||
621 | 8 | 9 | ||
622 | 9 | Gzip Compressed Content | 10 | Gzip Compressed Content |
623 | 10 | ======================= | 11 | ======================= |
624 | 11 | 12 | ||
625 | 12 | Content found to be gzip compressed will be uncompressed. | 13 | Content found to be gzip compressed will be uncompressed. |
627 | 13 | The uncompressed data will then be used as if it were not compressed. | 14 | The uncompressed data will then be used as if it were not compressed. |
628 | 14 | This is typically useful because user-data is limited to ~16384 [#]_ bytes. | 15 | This is typically useful because user-data is limited to ~16384 [#]_ bytes. |
629 | 15 | 16 | ||
630 | 16 | Mime Multi Part Archive | 17 | Mime Multi Part Archive |
631 | 17 | ======================= | 18 | ======================= |
632 | 18 | 19 | ||
634 | 19 | This list of rules is applied to each part of this multi-part file. | 20 | This list of rules is applied to each part of this multi-part file. |
635 | 20 | Using a mime-multi part file, the user can specify more than one type of data. | 21 | Using a mime-multi part file, the user can specify more than one type of data. |
636 | 21 | 22 | ||
638 | 22 | For example, both a user data script and a cloud-config type could be specified. | 23 | For example, both a user data script and a cloud-config type could be |
639 | 24 | specified. | ||
640 | 23 | 25 | ||
641 | 24 | Supported content-types: | 26 | Supported content-types: |
642 | 25 | 27 | ||
643 | @@ -66,7 +68,8 @@ User-Data Script | |||
644 | 66 | 68 | ||
645 | 67 | Typically used by those who just want to execute a shell script. | 69 | Typically used by those who just want to execute a shell script. |
646 | 68 | 70 | ||
648 | 69 | Begins with: ``#!`` or ``Content-Type: text/x-shellscript`` when using a MIME archive. | 71 | Begins with: ``#!`` or ``Content-Type: text/x-shellscript`` when using a MIME |
649 | 72 | archive. | ||
650 | 70 | 73 | ||
651 | 71 | .. note:: | 74 | .. note:: |
652 | 72 | New in cloud-init v. 18.4: User-data scripts can also render cloud instance | 75 | New in cloud-init v. 18.4: User-data scripts can also render cloud instance |
653 | @@ -83,25 +86,27 @@ Example | |||
654 | 83 | #!/bin/sh | 86 | #!/bin/sh |
655 | 84 | echo "Hello World. The time is now $(date -R)!" | tee /root/output.txt | 87 | echo "Hello World. The time is now $(date -R)!" | tee /root/output.txt |
656 | 85 | 88 | ||
658 | 86 | $ euca-run-instances --key mykey --user-data-file myscript.sh ami-a07d95c9 | 89 | $ euca-run-instances --key mykey --user-data-file myscript.sh ami-a07d95c9 |
659 | 87 | 90 | ||
660 | 88 | Include File | 91 | Include File |
661 | 89 | ============ | 92 | ============ |
662 | 90 | 93 | ||
663 | 91 | This content is a ``include`` file. | 94 | This content is a ``include`` file. |
664 | 92 | 95 | ||
669 | 93 | The file contains a list of urls, one per line. | 96 | The file contains a list of urls, one per line. Each of the URLs will be read, |
670 | 94 | Each of the URLs will be read, and their content will be passed through this same set of rules. | 97 | and their content will be passed through this same set of rules. Ie, the |
671 | 95 | Ie, the content read from the URL can be gzipped, mime-multi-part, or plain text. | 98 | content read from the URL can be gzipped, mime-multi-part, or plain text. If |
672 | 96 | If an error occurs reading a file the remaining files will not be read. | 99 | an error occurs reading a file the remaining files will not be read. |
673 | 97 | 100 | ||
675 | 98 | Begins with: ``#include`` or ``Content-Type: text/x-include-url`` when using a MIME archive. | 101 | Begins with: ``#include`` or ``Content-Type: text/x-include-url`` when using |
676 | 102 | a MIME archive. | ||
677 | 99 | 103 | ||
678 | 100 | Cloud Config Data | 104 | Cloud Config Data |
679 | 101 | ================= | 105 | ================= |
680 | 102 | 106 | ||
683 | 103 | Cloud-config is the simplest way to accomplish some things | 107 | Cloud-config is the simplest way to accomplish some things via user-data. Using |
684 | 104 | via user-data. Using cloud-config syntax, the user can specify certain things in a human friendly format. | 108 | cloud-config syntax, the user can specify certain things in a human friendly |
685 | 109 | format. | ||
686 | 105 | 110 | ||
687 | 106 | These things include: | 111 | These things include: |
688 | 107 | 112 | ||
689 | @@ -114,9 +119,11 @@ These things include: | |||
690 | 114 | .. note:: | 119 | .. note:: |
691 | 115 | This file must be valid yaml syntax. | 120 | This file must be valid yaml syntax. |
692 | 116 | 121 | ||
694 | 117 | See the :ref:`yaml_examples` section for a commented set of examples of supported cloud config formats. | 122 | See the :ref:`yaml_examples` section for a commented set of examples of |
695 | 123 | supported cloud config formats. | ||
696 | 118 | 124 | ||
698 | 119 | Begins with: ``#cloud-config`` or ``Content-Type: text/cloud-config`` when using a MIME archive. | 125 | Begins with: ``#cloud-config`` or ``Content-Type: text/cloud-config`` when |
699 | 126 | using a MIME archive. | ||
700 | 120 | 127 | ||
701 | 121 | .. note:: | 128 | .. note:: |
702 | 122 | New in cloud-init v. 18.4: Cloud config dta can also render cloud instance | 129 | New in cloud-init v. 18.4: Cloud config dta can also render cloud instance |
703 | @@ -126,25 +133,41 @@ Begins with: ``#cloud-config`` or ``Content-Type: text/cloud-config`` when using | |||
704 | 126 | Upstart Job | 133 | Upstart Job |
705 | 127 | =========== | 134 | =========== |
706 | 128 | 135 | ||
708 | 129 | Content is placed into a file in ``/etc/init``, and will be consumed by upstart as any other upstart job. | 136 | Content is placed into a file in ``/etc/init``, and will be consumed by upstart |
709 | 137 | as any other upstart job. | ||
710 | 130 | 138 | ||
712 | 131 | Begins with: ``#upstart-job`` or ``Content-Type: text/upstart-job`` when using a MIME archive. | 139 | Begins with: ``#upstart-job`` or ``Content-Type: text/upstart-job`` when using |
713 | 140 | a MIME archive. | ||
714 | 132 | 141 | ||
715 | 133 | Cloud Boothook | 142 | Cloud Boothook |
716 | 134 | ============== | 143 | ============== |
717 | 135 | 144 | ||
721 | 136 | This content is ``boothook`` data. It is stored in a file under ``/var/lib/cloud`` and then executed immediately. | 145 | This content is ``boothook`` data. It is stored in a file under |
722 | 137 | This is the earliest ``hook`` available. Note, that there is no mechanism provided for running only once. The boothook must take care of this itself. | 146 | ``/var/lib/cloud`` and then executed immediately. This is the earliest ``hook`` |
723 | 138 | It is provided with the instance id in the environment variable ``INSTANCE_ID``. This could be made use of to provide a 'once-per-instance' type of functionality. | 147 | available. Note, that there is no mechanism provided for running only once. The |
724 | 148 | boothook must take care of this itself. | ||
725 | 139 | 149 | ||
727 | 140 | Begins with: ``#cloud-boothook`` or ``Content-Type: text/cloud-boothook`` when using a MIME archive. | 150 | It is provided with the instance id in the environment variable |
728 | 151 | ``INSTANCE_ID``. This could be made use of to provide a 'once-per-instance' | ||
729 | 152 | type of functionality. | ||
730 | 153 | |||
731 | 154 | Begins with: ``#cloud-boothook`` or ``Content-Type: text/cloud-boothook`` when | ||
732 | 155 | using a MIME archive. | ||
733 | 141 | 156 | ||
734 | 142 | Part Handler | 157 | Part Handler |
735 | 143 | ============ | 158 | ============ |
736 | 144 | 159 | ||
740 | 145 | This is a ``part-handler``: It contains custom code for either supporting new mime-types in multi-part user data, or overriding the existing handlers for supported mime-types. It will be written to a file in ``/var/lib/cloud/data`` based on its filename (which is generated). | 160 | This is a ``part-handler``: It contains custom code for either supporting new |
741 | 146 | This must be python code that contains a ``list_types`` function and a ``handle_part`` function. | 161 | mime-types in multi-part user data, or overriding the existing handlers for |
742 | 147 | Once the section is read the ``list_types`` method will be called. It must return a list of mime-types that this part-handler handles. Because mime parts are processed in order, a ``part-handler`` part must precede any parts with mime-types it is expected to handle in the same user data. | 162 | supported mime-types. It will be written to a file in ``/var/lib/cloud/data`` |
743 | 163 | based on its filename (which is generated). | ||
744 | 164 | |||
745 | 165 | This must be python code that contains a ``list_types`` function and a | ||
746 | 166 | ``handle_part`` function. Once the section is read the ``list_types`` method | ||
747 | 167 | will be called. It must return a list of mime-types that this part-handler | ||
748 | 168 | handles. Because mime parts are processed in order, a ``part-handler`` part | ||
749 | 169 | must precede any parts with mime-types it is expected to handle in the same | ||
750 | 170 | user data. | ||
751 | 148 | 171 | ||
752 | 149 | The ``handle_part`` function must be defined like: | 172 | The ``handle_part`` function must be defined like: |
753 | 150 | 173 | ||
754 | @@ -156,11 +179,13 @@ The ``handle_part`` function must be defined like: | |||
755 | 156 | # filename = the filename of the part (or a generated filename if none is present in mime data) | 179 | # filename = the filename of the part (or a generated filename if none is present in mime data) |
756 | 157 | # payload = the parts' content | 180 | # payload = the parts' content |
757 | 158 | 181 | ||
761 | 159 | Cloud-init will then call the ``handle_part`` function once before it handles any parts, once per part received, and once after all parts have been handled. | 182 | Cloud-init will then call the ``handle_part`` function once before it handles |
762 | 160 | The ``'__begin__'`` and ``'__end__'`` sentinels allow the part handler to do initialization or teardown before or after | 183 | any parts, once per part received, and once after all parts have been handled. |
763 | 161 | receiving any parts. | 184 | The ``'__begin__'`` and ``'__end__'`` sentinels allow the part handler to do |
764 | 185 | initialization or teardown before or after receiving any parts. | ||
765 | 162 | 186 | ||
767 | 163 | Begins with: ``#part-handler`` or ``Content-Type: text/part-handler`` when using a MIME archive. | 187 | Begins with: ``#part-handler`` or ``Content-Type: text/part-handler`` when |
768 | 188 | using a MIME archive. | ||
769 | 164 | 189 | ||
770 | 165 | Example | 190 | Example |
771 | 166 | ------- | 191 | ------- |
772 | diff --git a/doc/rtd/topics/merging.rst b/doc/rtd/topics/merging.rst | |||
773 | index 5f7ca18..2b5e5da 100644 | |||
774 | --- a/doc/rtd/topics/merging.rst | |||
775 | +++ b/doc/rtd/topics/merging.rst | |||
776 | @@ -68,8 +68,10 @@ Cloud-init provides merging for the following built-in types: | |||
777 | 68 | The ``Dict`` merger has the following options which control what is done with | 68 | The ``Dict`` merger has the following options which control what is done with |
778 | 69 | values contained within the config. | 69 | values contained within the config. |
779 | 70 | 70 | ||
782 | 71 | - ``allow_delete``: Existing values not present in the new value can be deleted, defaults to False | 71 | - ``allow_delete``: Existing values not present in the new value can be |
783 | 72 | - ``no_replace``: Do not replace an existing value if one is already present, enabled by default. | 72 | deleted, defaults to False |
784 | 73 | - ``no_replace``: Do not replace an existing value if one is already present, | ||
785 | 74 | enabled by default. | ||
786 | 73 | - ``replace``: Overwrite existing values with new ones. | 75 | - ``replace``: Overwrite existing values with new ones. |
787 | 74 | 76 | ||
788 | 75 | The ``List`` merger has the following options which control what is done with | 77 | The ``List`` merger has the following options which control what is done with |
789 | @@ -77,7 +79,8 @@ the values contained within the config. | |||
790 | 77 | 79 | ||
791 | 78 | - ``append``: Add new value to the end of the list, defaults to False. | 80 | - ``append``: Add new value to the end of the list, defaults to False. |
792 | 79 | - ``prepend``: Add new values to the start of the list, defaults to False. | 81 | - ``prepend``: Add new values to the start of the list, defaults to False. |
794 | 80 | - ``no_replace``: Do not replace an existing value if one is already present, enabled by default. | 82 | - ``no_replace``: Do not replace an existing value if one is already present, |
795 | 83 | enabled by default. | ||
796 | 81 | - ``replace``: Overwrite existing values with new ones. | 84 | - ``replace``: Overwrite existing values with new ones. |
797 | 82 | 85 | ||
798 | 83 | The ``Str`` merger has the following options which control what is done with | 86 | The ``Str`` merger has the following options which control what is done with |
799 | @@ -88,10 +91,13 @@ the values contained within the config. | |||
800 | 88 | Common options for all merge types which control how recursive merging is | 91 | Common options for all merge types which control how recursive merging is |
801 | 89 | done on other types. | 92 | done on other types. |
802 | 90 | 93 | ||
805 | 91 | - ``recurse_dict``: If True merge the new values of the dictionary, defaults to True. | 94 | - ``recurse_dict``: If True merge the new values of the dictionary, defaults to |
806 | 92 | - ``recurse_list``: If True merge the new values of the list, defaults to False. | 95 | True. |
807 | 96 | - ``recurse_list``: If True merge the new values of the list, defaults to | ||
808 | 97 | False. | ||
809 | 93 | - ``recurse_array``: Alias for ``recurse_list``. | 98 | - ``recurse_array``: Alias for ``recurse_list``. |
811 | 94 | - ``recurse_str``: If True merge the new values of the string, defaults to False. | 99 | - ``recurse_str``: If True merge the new values of the string, defaults to |
812 | 100 | False. | ||
813 | 95 | 101 | ||
814 | 96 | 102 | ||
815 | 97 | Customizability | 103 | Customizability |
816 | diff --git a/doc/rtd/topics/network-config-format-v2.rst b/doc/rtd/topics/network-config-format-v2.rst | |||
817 | index 50f5fa6..7f85755 100644 | |||
818 | --- a/doc/rtd/topics/network-config-format-v2.rst | |||
819 | +++ b/doc/rtd/topics/network-config-format-v2.rst | |||
820 | @@ -54,11 +54,11 @@ Physical devices | |||
821 | 54 | 54 | ||
822 | 55 | : (Examples: ethernet, wifi) These can dynamically come and go between | 55 | : (Examples: ethernet, wifi) These can dynamically come and go between |
823 | 56 | reboots and even during runtime (hotplugging). In the generic case, they | 56 | reboots and even during runtime (hotplugging). In the generic case, they |
829 | 57 | can be selected by ``match:`` rules on desired properties, such as name/name | 57 | can be selected by ``match:`` rules on desired properties, such as |
830 | 58 | pattern, MAC address, driver, or device paths. In general these will match | 58 | name/name pattern, MAC address, driver, or device paths. In general these |
831 | 59 | any number of devices (unless they refer to properties which are unique | 59 | will match any number of devices (unless they refer to properties which are |
832 | 60 | such as the full path or MAC address), so without further knowledge about | 60 | unique such as the full path or MAC address), so without further knowledge |
833 | 61 | the hardware these will always be considered as a group. | 61 | about the hardware these will always be considered as a group. |
834 | 62 | 62 | ||
835 | 63 | It is valid to specify no match rules at all, in which case the ID field is | 63 | It is valid to specify no match rules at all, in which case the ID field is |
836 | 64 | simply the interface name to be matched. This is mostly useful if you want | 64 | simply the interface name to be matched. This is mostly useful if you want |
837 | @@ -228,8 +228,8 @@ Example: :: | |||
838 | 228 | 228 | ||
839 | 229 | **parameters**: *<(mapping)>* | 229 | **parameters**: *<(mapping)>* |
840 | 230 | 230 | ||
843 | 231 | Customization parameters for special bonding options. Time values are specified | 231 | Customization parameters for special bonding options. Time values are |
844 | 232 | in seconds unless otherwise specified. | 232 | specified in seconds unless otherwise specified. |
845 | 233 | 233 | ||
846 | 234 | **mode**: *<(scalar)>* | 234 | **mode**: *<(scalar)>* |
847 | 235 | 235 | ||
848 | @@ -367,8 +367,8 @@ Example: :: | |||
849 | 367 | 367 | ||
850 | 368 | **parameters**: <*(mapping)>* | 368 | **parameters**: <*(mapping)>* |
851 | 369 | 369 | ||
854 | 370 | Customization parameters for special bridging options. Time values are specified | 370 | Customization parameters for special bridging options. Time values are |
855 | 371 | in seconds unless otherwise specified. | 371 | specified in seconds unless otherwise specified. |
856 | 372 | 372 | ||
857 | 373 | **ageing-time**: <*(scalar)>* | 373 | **ageing-time**: <*(scalar)>* |
858 | 374 | 374 |
PASSED: Continuous integration, rev:b16a3abc652 4904dd74613180b 6d5e88e2332e68 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 1100/
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 1100//rebuild
https:/