summaryrefslogtreecommitdiff
path: root/doc/rtd/topics/datasources/nocloud.rst
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2017-03-29 22:03:04 -0500
committerScott Moser <smoser@ubuntu.com>2017-05-03 21:13:28 -0400
commit99faf3ece1badc566e7e75e769ff374250196197 (patch)
tree5ff87201abe5d3dbc7bdffbe63b55aae1780d66c /doc/rtd/topics/datasources/nocloud.rst
parent653fda98a56c63d11d65ef08c4991d0425fc3f91 (diff)
downloadvyos-cloud-init-99faf3ece1badc566e7e75e769ff374250196197.tar.gz
vyos-cloud-init-99faf3ece1badc566e7e75e769ff374250196197.zip
doc: document network configuration defaults policy and formats.
Add documentation for cloud-init networking configuration formats, default behavior, policy and other specific details about how network config is consumed and utilized.
Diffstat (limited to 'doc/rtd/topics/datasources/nocloud.rst')
-rw-r--r--doc/rtd/topics/datasources/nocloud.rst39
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/rtd/topics/datasources/nocloud.rst b/doc/rtd/topics/datasources/nocloud.rst
index b9ab5f11..0159e853 100644
--- a/doc/rtd/topics/datasources/nocloud.rst
+++ b/doc/rtd/topics/datasources/nocloud.rst
@@ -1,3 +1,5 @@
+.. _datasource_nocloud:
+
NoCloud
=======
@@ -70,6 +72,43 @@ Example metadata:
gateway 192.168.1.254
hostname: myhost
+
+Network configuration can also be provided to cloud-init in either
+:ref:`network_config_v1` or :ref:`network_config_v2` by providing that
+yaml formatted data in a file named ``network-config``. If found,
+this file will override a ``network-interfaces`` file.
+
+See an example below. Note specifically that this file does not
+have a top level ``network`` key as it it is already assumed to
+be network configuration based on the filename.
+
+.. code:: yaml
+
+ version: 1
+ config:
+ - type: physical
+ name: interface0
+ mac_address: "52:54:00:12:34:00"
+ subnets:
+ - type: static
+ address: 192.168.1.10
+ netmask: 255.255.255.0
+ gateway: 192.168.1.254
+
+
+.. code:: yaml
+
+ version: 2
+ ethernets:
+ interface0:
+ match:
+ mac_address: "52:54:00:12:34:00"
+ set-name: interface0
+ addresses:
+ - 192.168.1.10/255.255.255.0
+ gateway4: 192.168.1.254
+
+
.. _iso9660: https://en.wikipedia.org/wiki/ISO_9660
.. _vfat: https://en.wikipedia.org/wiki/File_Allocation_Table
.. vi: textwidth=78