diff options
author | Roberto Bertó <roberto.berto@gmail.com> | 2024-03-17 14:08:57 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-17 14:08:57 -0300 |
commit | b82255f40736fef25fd59cd4073d2f8b8e4ba45c (patch) | |
tree | de20ea61c46f3103961521e7c1acf140d9f770da | |
parent | f08a70b59b74f78ddb5620d10c947557dbacef80 (diff) | |
download | vyos-documentation-b82255f40736fef25fd59cd4073d2f8b8e4ba45c.tar.gz vyos-documentation-b82255f40736fef25fd59cd4073d2f8b8e4ba45c.zip |
besides document that vyos_config_commands will do commit and save fixed 80 line len for linter
-rw-r--r-- | docs/automation/cloud-init.rst | 41 |
1 files 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 |