From 3ba04e1a799b2fde708e65f57645c5cfc5b52f3c Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Mon, 8 Dec 2025 23:12:41 +0000 Subject: [PATCH 1/3] doc(examples): remove datasource configuration --- doc/examples/cloud-config-datasources.txt | 68 -------------------- doc/rtd/reference/base_config_reference.rst | 71 +++++++++++++++++++-- doc/rtd/reference/examples.rst | 7 -- 3 files changed, 67 insertions(+), 79 deletions(-) delete mode 100644 doc/examples/cloud-config-datasources.txt diff --git a/doc/examples/cloud-config-datasources.txt b/doc/examples/cloud-config-datasources.txt deleted file mode 100644 index ce75d8e7314..00000000000 --- a/doc/examples/cloud-config-datasources.txt +++ /dev/null @@ -1,68 +0,0 @@ -#cloud-config - -# Documentation on data sources configuration options -datasource: - # Ec2 - Ec2: - # timeout: the timeout value for a request at metadata service - timeout : 50 - # The length in seconds to wait before giving up on the metadata - # service. The actual total wait could be up to - # len(resolvable_metadata_urls)*timeout - max_wait : 240 - - #metadata_url: a list of URLs to check for metadata services - metadata_urls: - - http://169.254.169.254:80 - - http://instance-data:8773 - - MAAS: - timeout : 50 - max_wait : 120 - - # there are no default values for metadata_url or oauth credentials - # If no credentials are present, non-authed attempts will be made. - metadata_url: http://mass-host.localdomain/source - consumer_key: Xh234sdkljf - token_key: kjfhgb3n - token_secret: 24uysdfx1w4 - - NoCloud: - # default seedfrom is None - # if found, then it should contain a url with: - # /user-data and /meta-data - # seedfrom: http://my.example.com/i-abcde/ - seedfrom: None - - # fs_label: the label on filesystems to be searched for NoCloud source - fs_label: cidata - - # these are optional, but allow you to basically provide a datasource - # right here - user-data: | - # This is the user-data verbatim - meta-data: | - instance-id: i-87018aed - local-hostname: myhost.internal - - SmartOS: - # For KVM guests: - # Smart OS datasource works over a serial console interacting with - # a server on the other end. By default, the second serial console is the - # device. SmartOS also uses a serial timeout of 60 seconds. - serial_device: /dev/ttyS1 - serial_timeout: 60 - - # For LX-Brand Zones guests: - # Smart OS datasource works over a socket interacting with - # the host on the other end. By default, the socket file is in - # the native .zoncontrol directory. - metadata_sockfile: /native/.zonecontrol/metadata.sock - - # a list of keys that will not be base64 decoded even if base64_all - no_base64_decode: ['root_authorized_keys', 'motd_sys_info', - 'iptables_disable'] - # a plaintext, comma delimited list of keys whose values are b64 encoded - base64_keys: [] - # a boolean indicating that all keys not in 'no_base64_decode' are encoded - base64_all: False diff --git a/doc/rtd/reference/base_config_reference.rst b/doc/rtd/reference/base_config_reference.rst index 9266fcf932f..2240e261c18 100644 --- a/doc/rtd/reference/base_config_reference.rst +++ b/doc/rtd/reference/base_config_reference.rst @@ -90,14 +90,77 @@ Datasource keys Many datasources allow configuration of the datasource for use in querying the datasource for meta-data using the ``datasource`` key. This configuration is datasource dependent and can be found under -each datasource's respective :ref:`documentation`. It will -generally take the form of: +each datasource's respective :ref:`documentation`. Example: .. code-block:: yaml + # Documentation on data sources configuration options datasource: - : - ... + # Ec2 + Ec2: + # timeout: the timeout value for a request at metadata service + timeout: 50 + # The length in seconds to wait before giving up on the metadata + # service. The actual total wait could be up to + # len(resolvable_metadata_urls)*timeout + max_wait: 240 + + #metadata_url: a list of URLs to check for metadata services + metadata_urls: + - http://169.254.169.254:80 + - http://instance-data:8773 + + MAAS: + timeout: 50 + max_wait: 120 + + # there are no default values for metadata_url or oauth credentials + # If no credentials are present, non-authed attempts will be made. + metadata_url: http://mass-host.localdomain/source + consumer_key: Xh234sdkljf + token_key: kjfhgb3n + token_secret: 24uysdfx1w4 + + NoCloud: + # default seedfrom is None + # if found, then it should contain a url with: + # /user-data and /meta-data + # seedfrom: http://my.example.com/i-abcde/ + seedfrom: None + + # fs_label: the label on filesystems to be searched for NoCloud source + fs_label: cidata + + # these are optional, but allow you to basically provide a datasource + # right here + user-data: | + # This is the user-data verbatim + meta-data: | + instance-id: i-87018aed + local-hostname: myhost.internal + + SmartOS: + # For KVM guests: + # Smart OS datasource works over a serial console interacting with + # a server on the other end. By default, the second serial console is the + # device. SmartOS also uses a serial timeout of 60 seconds. + serial_device: /dev/ttyS1 + serial_timeout: 60 + + # For LX-Brand Zones guests: + # Smart OS datasource works over a socket interacting with + # the host on the other end. By default, the socket file is in + # the native .zoncontrol directory. + metadata_sockfile: /native/.zonecontrol/metadata.sock + + # a list of keys that will not be base64 decoded even if base64_all + no_base64_decode: ['root_authorized_keys', 'motd_sys_info', + 'iptables_disable'] + # a plaintext, comma delimited list of keys whose values are b64 encoded + base64_keys: [] + # a boolean indicating that all keys not in 'no_base64_decode' are encoded + base64_all: False + System info keys ---------------- diff --git a/doc/rtd/reference/examples.rst b/doc/rtd/reference/examples.rst index 26f47c87194..1036ba259ed 100644 --- a/doc/rtd/reference/examples.rst +++ b/doc/rtd/reference/examples.rst @@ -138,13 +138,6 @@ Disk setup :language: yaml :linenos: -Configure data sources -====================== - -.. literalinclude:: ../../examples/cloud-config-datasources.txt - :language: yaml - :linenos: - Create partitions and filesystems ================================= From 4a1cff519de6b160558423a63cd63bd6ccfc6494 Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Mon, 8 Dec 2025 23:17:10 +0000 Subject: [PATCH 2/3] tweaks --- doc/rtd/reference/base_config_reference.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/rtd/reference/base_config_reference.rst b/doc/rtd/reference/base_config_reference.rst index 2240e261c18..8ebbcf2b477 100644 --- a/doc/rtd/reference/base_config_reference.rst +++ b/doc/rtd/reference/base_config_reference.rst @@ -94,7 +94,6 @@ each datasource's respective :ref:`documentation`. Example: .. code-block:: yaml - # Documentation on data sources configuration options datasource: # Ec2 Ec2: @@ -105,7 +104,7 @@ each datasource's respective :ref:`documentation`. Example: # len(resolvable_metadata_urls)*timeout max_wait: 240 - #metadata_url: a list of URLs to check for metadata services + # metadata_url: a list of URLs to check for metadata services metadata_urls: - http://169.254.169.254:80 - http://instance-data:8773 @@ -131,8 +130,7 @@ each datasource's respective :ref:`documentation`. Example: # fs_label: the label on filesystems to be searched for NoCloud source fs_label: cidata - # these are optional, but allow you to basically provide a datasource - # right here + # these are optional, but allow you to provide configuration user-data: | # This is the user-data verbatim meta-data: | From f4638f6d2551c2263aba97a9bd010eab23b6428d Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Mon, 8 Dec 2025 16:36:48 -0700 Subject: [PATCH 3/3] minor review comment removal --- doc/rtd/reference/base_config_reference.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/rtd/reference/base_config_reference.rst b/doc/rtd/reference/base_config_reference.rst index 8ebbcf2b477..eaea9eb648a 100644 --- a/doc/rtd/reference/base_config_reference.rst +++ b/doc/rtd/reference/base_config_reference.rst @@ -95,7 +95,6 @@ each datasource's respective :ref:`documentation`. Example: .. code-block:: yaml datasource: - # Ec2 Ec2: # timeout: the timeout value for a request at metadata service timeout: 50