From f08a70b59b74f78ddb5620d10c947557dbacef80 Mon Sep 17 00:00:00 2001 From: Roberto Bertó Date: Sun, 17 Mar 2024 14:00:58 -0300 Subject: added that vyos_config_commands commit and save --- docs/automation/cloud-init.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/automation/cloud-init.rst b/docs/automation/cloud-init.rst index bbc8967c..ae22a914 100644 --- a/docs/automation/cloud-init.rst +++ b/docs/automation/cloud-init.rst @@ -88,6 +88,9 @@ proper commands list by copying it from another router. The configuration specified in the cloud-config document overwrites default configuration values and values configured via Metadata. +After the ``vyos_config_commands`` are executed, cloud-init will automatically +perform a ``commit`` and ``save`` operation. + Here is an example cloud-config that appends configuration at the time of first boot. -- cgit v1.2.3 From b82255f40736fef25fd59cd4073d2f8b8e4ba45c Mon Sep 17 00:00:00 2001 From: Roberto Bertó Date: Sun, 17 Mar 2024 14:08:57 -0300 Subject: besides document that vyos_config_commands will do commit and save fixed 80 line len for linter --- docs/automation/cloud-init.rst | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/docs/automation/cloud-init.rst b/docs/automation/cloud-init.rst index ae22a914..d6a8799c 100644 --- a/docs/automation/cloud-init.rst +++ b/docs/automation/cloud-init.rst @@ -8,8 +8,8 @@ VyOS cloud-init Cloud and virtualized instances of VyOS are initialized using the industry-standard cloud-init. Via cloud-init, the system performs tasks such as -injecting SSH keys and configuring the network. In addition, the user can supply -a custom configuration at the time of instance launch. +injecting SSH keys and configuring the network. In addition, the user can +supply a custom configuration at the time of instance launch. ************** Config Sources @@ -25,9 +25,9 @@ VyOS support three types of config sources. network settings like IP addresses, routes, DNS. Available only in several cloud and virtualization platforms. -* User-data - User-data is specified by the user. This config source offers the - ability to insert any CLI configuration commands into the configuration before - the first boot. +* User-data - User-data is specified by the user. This config source offers + the ability to insert any CLI configuration commands into the configuration + before the first boot. ********* User-data @@ -39,8 +39,8 @@ depending on cloud provider. Also, it can be compressed using gzip, which makes sense with a long configuration commands list, because of the hard limit to ~16384 bytes for the whole user-data. -The easiest way to configure the system via user-data is the Cloud-config syntax -described below. +The easiest way to configure the system via user-data is the Cloud-config +syntax described below. ******************** Cloud-config modules @@ -50,11 +50,12 @@ In VyOS, by default, enables only two modules: * ``write_files`` - this module allows to insert any files into the filesystem before the first boot, for example, pre-generated encryption keys, - certificates, or even a whole ``config.boot`` file. The format is described in the cloudinit documentation `Cloud-init-write_files`_. + certificates, or even a whole ``config.boot`` file. The format is described + in the cloudinit documentation `Cloud-init-write_files`_. -* ``vyos_userdata`` - the module accepts a list of CLI configuration commands in - a ``vyos_config_commands`` section, which gives an easy way to configure the - system during deployment. +* ``vyos_userdata`` - the module accepts a list of CLI configuration commands + in a ``vyos_config_commands`` section, which gives an easy way to configure + the system during deployment. ************************ cloud-config file format @@ -62,8 +63,8 @@ cloud-config file format A cloud-config document is written in YAML. The file must begin with ``#cloud-config`` line. The only supported top-level keys are -``vyos_config_commands`` and ``write_files``. The use of these keys is described -in the following two sections. +``vyos_config_commands`` and ``write_files``. The use of these keys is +described in the following two sections. ************************ @@ -81,15 +82,15 @@ Commands requirements: * If command ends in a value, it must be inside single quotes. * A single-quote symbol is not allowed inside command or value. -The commands list produced by the ``show configuration commands`` command on a -VyOS router should comply with all the requirements, so it is easy to get a -proper commands list by copying it from another router. +The commands list produced by the ``show configuration commands`` command +on a VyOS router should comply with all the requirements, so it is easy +to get a proper commands list by copying it from another router. The configuration specified in the cloud-config document overwrites default configuration values and values configured via Metadata. -After the ``vyos_config_commands`` are executed, cloud-init will automatically -perform a ``commit`` and ``save`` operation. +After the ``vyos_config_commands`` are executed, cloud-init will +automatically perform a ``commit`` and ``save`` operation. Here is an example cloud-config that appends configuration at the time of first boot. @@ -230,8 +231,8 @@ valid YAML. Online resources such as https://www.yamllint.com/ provide a simple tool for validating YAML. cloud-init logs to /var/log/cloud-init.log. This file can be helpful in -determining why the configuration varies from what you expect. You can fetch the -most important data filtering output for ``vyos`` keyword: +determining why the configuration varies from what you expect. You can fetch +the most important data filtering output for ``vyos`` keyword: .. code-block:: none -- cgit v1.2.3 From f2b262ae1b9b12cb22991528939aed0a00efd966 Mon Sep 17 00:00:00 2001 From: Roberto Bertó Date: Sun, 17 Mar 2024 14:14:42 -0300 Subject: besides document that vyos_config_commands will do commit and save fixed 80 line len for linter --- docs/automation/cloud-init.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/automation/cloud-init.rst b/docs/automation/cloud-init.rst index d6a8799c..63a5eff6 100644 --- a/docs/automation/cloud-init.rst +++ b/docs/automation/cloud-init.rst @@ -218,9 +218,8 @@ the method with KVM to attach the ISO as a CD drive follows. --noautoconsole -For more information on the NoCloud data source, visit its `page -`_ -in the cloud-init documentation. +For more information on the NoCloud data source, visit its +page `_nocloud`_ in the cloud-init documentation. *************** Troubleshooting @@ -432,5 +431,5 @@ References .. _cloud-init-docs: https://docs.vyos.io/en/equuleus/automation/cloud-init.html?highlight=cloud-init#vyos-cloud-init .. _Cloud-init-Support: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_cloud_init .. _Cloud-init-write_files: https://cloudinit.readthedocs.io/en/latest/topics/examples.html#writing-out-arbitrary-files - +.. _nocloud: https://cloudinit.readthedocs.io/en/latest/reference/datasources/nocloud.html .. start_vyoslinter -- cgit v1.2.3 From a958b2fca0559f1ec4b752a69dc83cfc5d37f0ab Mon Sep 17 00:00:00 2001 From: Roberto Bertó Date: Sun, 17 Mar 2024 14:22:24 -0300 Subject: fixed small typo on rst link --- docs/automation/cloud-init.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/automation/cloud-init.rst b/docs/automation/cloud-init.rst index 63a5eff6..0b9ee207 100644 --- a/docs/automation/cloud-init.rst +++ b/docs/automation/cloud-init.rst @@ -219,7 +219,7 @@ the method with KVM to attach the ISO as a CD drive follows. For more information on the NoCloud data source, visit its -page `_nocloud`_ in the cloud-init documentation. +page `nocloud`_ in the cloud-init documentation. *************** Troubleshooting -- cgit v1.2.3