Merge ~smoser/cloud-init:doc/cleanup-doc-errors into cloud-init:master

Proposed by Scott Moser
Status: Merged
Approved by: Chad Smith
Approved revision: c634476b987b25bc5ba32ce759821cab3a1473ce
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~smoser/cloud-init:doc/cleanup-doc-errors
Merge into: cloud-init:master
Diff against target: 117 lines (+22/-41)
2 files modified
doc/rtd/topics/datasources.rst (+1/-1)
doc/rtd/topics/datasources/azure.rst (+21/-40)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
cloud-init Commiters Pending
Review via email: mp+361467@code.launchpad.net

Commit message

doc: clean up some datasource documentation.

The change to datasources.rst here is obvious typo fix.
The change to azure is to reduce the two 'Customization' sections
to a single and clean up some other duplicate text.

Description of the change

see commit message

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:c634476b987b25bc5ba32ce759821cab3a1473ce
https://jenkins.ubuntu.com/server/job/cloud-init-ci/509/
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:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/509/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/doc/rtd/topics/datasources.rst b/doc/rtd/topics/datasources.rst
2index e34f145..5abbaef 100644
3--- a/doc/rtd/topics/datasources.rst
4+++ b/doc/rtd/topics/datasources.rst
5@@ -18,7 +18,7 @@ single way to access the different cloud systems methods to provide this data
6 through the typical usage of subclasses.
7
8 Any metadata processed by cloud-init's datasources is persisted as
9-``/run/cloud0-init/instance-data.json``. Cloud-init provides tooling
10+``/run/cloud-init/instance-data.json``. Cloud-init provides tooling
11 to quickly introspect some of that data. See :ref:`instance_metadata` for
12 more information.
13
14diff --git a/doc/rtd/topics/datasources/azure.rst b/doc/rtd/topics/datasources/azure.rst
15index f73c369..720a475 100644
16--- a/doc/rtd/topics/datasources/azure.rst
17+++ b/doc/rtd/topics/datasources/azure.rst
18@@ -23,18 +23,18 @@ information in json format to /run/cloud-init/dhclient.hook/<interface>.json.
19 In order for cloud-init to leverage this method to find the endpoint, the
20 cloud.cfg file must contain:
21
22-datasource:
23- Azure:
24- set_hostname: False
25- agent_command: __builtin__
26+.. sourcecode:: yaml
27+
28+ datasource:
29+ Azure:
30+ set_hostname: False
31+ agent_command: __builtin__
32
33 If those files are not available, the fallback is to check the leases file
34 for the endpoint server (again option 245).
35
36 You can define the path to the lease file with the 'dhclient_lease_file'
37-configuration. The default value is /var/lib/dhcp/dhclient.eth0.leases.
38-
39- dhclient_lease_file: /var/lib/dhcp/dhclient.eth0.leases
40+configuration.
41
42 walinuxagent
43 ------------
44@@ -60,7 +60,7 @@ in order to use waagent.conf with cloud-init, the following settings are recomme
45 Configuration
46 -------------
47 The following configuration can be set for the datasource in system
48-configuration (in `/etc/cloud/cloud.cfg` or `/etc/cloud/cloud.cfg.d/`).
49+configuration (in ``/etc/cloud/cloud.cfg`` or ``/etc/cloud/cloud.cfg.d/``).
50
51 The settings that may be configured are:
52
53@@ -76,13 +76,25 @@ The settings that may be configured are:
54 * **disk_aliases**: A dictionary defining which device paths should be
55 interpreted as ephemeral images. See cc_disk_setup module for more info.
56 * **hostname_bounce**: A dictionary Azure hostname bounce behavior to react to
57- metadata changes.
58+ metadata changes. The '``hostname_bounce: command``' entry can be either
59+ the literal string 'builtin' or a command to execute. The command will be
60+ invoked after the hostname is set, and will have the 'interface' in its
61+ environment. If ``set_hostname`` is not true, then ``hostname_bounce``
62+ will be ignored. An example might be:
63+
64+ ``command: ["sh", "-c", "killall dhclient; dhclient $interface"]``
65+
66 * **hostname_bounce**: A dictionary Azure hostname bounce behavior to react to
67 metadata changes. Azure will throttle ifup/down in some cases after metadata
68 has been updated to inform dhcp server about updated hostnames.
69 * **set_hostname**: Boolean set to True when we want Azure to set the hostname
70 based on metadata.
71
72+Configuration for the datasource can also be read from a
73+``dscfg`` entry in the ``LinuxProvisioningConfigurationSet``. Content in
74+dscfg node is expected to be base64 encoded yaml content, and it will be
75+merged into the 'datasource: Azure' entry.
76+
77 An example configuration with the default values is provided below:
78
79 .. sourcecode:: yaml
80@@ -143,37 +155,6 @@ Example:
81 </LinuxProvisioningConfigurationSet>
82 </wa:ProvisioningSection>
83
84-Configuration
85--------------
86-Configuration for the datasource can be read from the system config's or set
87-via the `dscfg` entry in the `LinuxProvisioningConfigurationSet`. Content in
88-dscfg node is expected to be base64 encoded yaml content, and it will be
89-merged into the 'datasource: Azure' entry.
90-
91-The '``hostname_bounce: command``' entry can be either the literal string
92-'builtin' or a command to execute. The command will be invoked after the
93-hostname is set, and will have the 'interface' in its environment. If
94-``set_hostname`` is not true, then ``hostname_bounce`` will be ignored.
95-
96-An example might be:
97- command: ["sh", "-c", "killall dhclient; dhclient $interface"]
98-
99-.. code:: yaml
100-
101- datasource:
102- agent_command
103- Azure:
104- agent_command: [service, walinuxagent, start]
105- set_hostname: True
106- hostname_bounce:
107- # the name of the interface to bounce
108- interface: eth0
109- # policy can be 'on', 'off' or 'force'
110- policy: on
111- # the method 'bounce' command.
112- command: "builtin"
113- hostname_command: "hostname"
114-
115 hostname
116 --------
117 When the user launches an instance, they provide a hostname for that instance.

Subscribers

People subscribed via source and target branches