diff options
author | Jeff Loughridge <jeffl@konekti.us> | 2021-04-12 13:59:54 +0000 |
---|---|---|
committer | Jeff Loughridge <jeffl@konekti.us> | 2021-04-12 13:59:54 +0000 |
commit | 7f481a08a4f812169bd4921a029df3728eff5c64 (patch) | |
tree | 7ee0cf8f9aacdfaa3016a10e27ea593d0b986248 /docs/automation | |
parent | 37fa83deecb4121ee9a354c08a5addea65f240bf (diff) | |
download | vyos-documentation-7f481a08a4f812169bd4921a029df3728eff5c64.tar.gz vyos-documentation-7f481a08a4f812169bd4921a029df3728eff5c64.zip |
Enhance cloud-init documentation
Diffstat (limited to 'docs/automation')
-rw-r--r-- | docs/automation/cloud-init.rst | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/docs/automation/cloud-init.rst b/docs/automation/cloud-init.rst index f59c1a7b..761a96e3 100644 --- a/docs/automation/cloud-init.rst +++ b/docs/automation/cloud-init.rst @@ -5,17 +5,38 @@ VyOS cloud-init ############### Cloud instances of VyOS are initialized using the industry-standard cloud-init. -Via cloud-init, users can execute shell commands and configure the router. +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. -The initialization is guided by a set of instructions--known as user -data--provided by the user at launch time. VyOS implements a user-data -format called cloud-config. +************** +Config Sources +************** + +VyOS support three type of config sources. + +.. stop_vyoslinter + +* Metadata - Metadata is sourced by the cloud platform or hypervisor. In some clouds, there is implemented as an HTTP endpoint at http://169.254.169.254. + +* Network configuration - Ths config source informs the system about the network. + +* User-data - User-data is specified by the user. This config source offers the most flexibility and will be the focus of this documentation. + +.. start_vyoslinter + + +********* +User-data +********* Major cloud providers offer a means of providing user-data at the time of instance launch. Typically the user includes user-data as plain text and the cloud provider's platform base64 encodes the user-data before injecting it into the instance. +VyOS implements a user-data format called cloud-config. + ************************ cloud-config file format @@ -25,7 +46,7 @@ cloud-config file format A cloud-config document is written in YAML. The file must begin with "#cloud-config". The key used to designate a VyOS configuration is "vyos_config_commands". What follows is VyOS configuration using -the "set-style" syntax. +the "set-style" syntax. Both "set" and "delete" commands are supported. Commands requirements: @@ -50,6 +71,23 @@ Here is an example cloud-config. - set system host-name 'vyos-prod-ashburn' - set system ntp server 1.pool.ntp.org - set system ntp server 2.pool.ntp.org + - delete interfaces ethernet eth1 address 'dhcp' + - set interfaces ethernet eth1 address '172.31.7.247/20' + - set protocols static route '172.31.0.0/16' next-hop '100.64.16.1' + +************************* +System Defaults/Fallbacks +************************* + +These are the VyOS defaults and fallbacks. + +* SSH is configured on port 22 +* vyos/vyos credentials if no SSH public key exists in metadata +* DHCP on first Ethernet interface if no network configuration is provided + + +All of these can be overridden using configuration in user-data. + *************** Troubleshooting |