diff options
author | Ben Howard <ben.howard@canonical.com> | 2013-09-19 16:49:50 -0600 |
---|---|---|
committer | Ben Howard <ben.howard@canonical.com> | 2013-09-19 16:49:50 -0600 |
commit | d1bad8880c2219b9d7a648169bbe7a0a27c03be2 (patch) | |
tree | 3080345395538f215cea2708982acbc408ead6ba /doc | |
parent | 23f7b8a39bb197db557bdcf851639ea4111b7786 (diff) | |
download | vyos-cloud-init-d1bad8880c2219b9d7a648169bbe7a0a27c03be2.tar.gz vyos-cloud-init-d1bad8880c2219b9d7a648169bbe7a0a27c03be2.zip |
Fixes for the MP.
Changed cc_disk_setup to handle the file systems as a label, no longer
passing "log" around.
Tidied up the documentation to reflect the changes and made grammer,
spelling and improved the content a little.
Added disk_setup to the default modules list.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/cloud-config-disk-setup.txt | 100 | ||||
-rw-r--r-- | doc/sources/smartos/README.rst | 27 |
2 files changed, 87 insertions, 40 deletions
diff --git a/doc/examples/cloud-config-disk-setup.txt b/doc/examples/cloud-config-disk-setup.txt index 518936d1..db2c52a7 100644 --- a/doc/examples/cloud-config-disk-setup.txt +++ b/doc/examples/cloud-config-disk-setup.txt @@ -1,24 +1,63 @@ -Cloud-init supports the creation of simple partition tables and filesystems +Cloud-init supports the creation of simple partition tables and file systems on devices. -default disk definitions ------------------------- +Default disk definitions for AWS +-------------------------------- +(Not implemented yet, but provided for future documentation) disk_setup: ephmeral0: type: 'mbr' layout: True overwrite: False + fs_setup: - ephemeral0: - filesystem: 'ext3' - device: 'ephemeral0' - partition: 'auto' + - label: None, + filesystem: ext3 + device: ephemeral0 + partition: auto + +Default disk definitions for Windows Azure +------------------------------------------ +(Not implemented yet due to conflict with WALinuxAgent in Ubuntu) + +disk_setup: + /dev/sdb: + type: mbr + layout: True + overwrite: False + +fs_setup: + - label: ephemeral0 + filesystem: ext3 + device: ephemeral0 + partition: any + + +Default disk definitions for SmartOS +------------------------------------ + +ephemeral_disk: /dev/vdb +disk_setup: + /dev/vdb: + type: mbr + layout: True + overwrite: False + +fs_setup: + - label: ephemeral0 + filesystem: ext3 + device: /dev/vdb + partition: 1 + +Cavaut for SmartOS: if ephemeral disk is not defined, then the disk will + not be automatically added to the mounts. + The default definition is used to make sure that the ephemeral storage is setup properly. -"disk_setup": disk parititioning +"disk_setup": disk partitioning -------------------------------- The disk_setup directive instructs Cloud-init to partition a disk. The format is: @@ -36,7 +75,7 @@ The disk_setup directive instructs Cloud-init to partition a disk. The format is overwrite: True The format is a list of dicts of dicts. The first value is the name of the -device and the subsiquent values define how to create and layout the partition. +device and the subsequent values define how to create and layout the partition. The general format is: disk_setup: @@ -113,28 +152,29 @@ fs_setup: Setup the file system fs_setup describes the how the file systems are supposed to look. fs_setup: - ephemeral0: - filesystem: 'ext3' - device: 'ephemeral0' - partition: 'auto' - mylabl2: - filesystem: 'ext4' - device: '/dev/xvda1' - special: - cmd: mkfs -t %(FILESYSTEM)s -L %(LABEL)s %(DEVICE)s - filesystem: 'btrfs' - device: '/dev/xvdh' + - label: ephemeral0 + filesystem: 'ext3' + device: 'ephemeral0' + partition: 'auto' + - label: mylabl2 + filesystem: 'ext4' + device: '/dev/xvda1' + - special: + cmd: mkfs -t %(FILESYSTEM)s -L %(LABEL)s %(DEVICE)s + filesystem: 'btrfs' + device: '/dev/xvdh' The general format is: fs_setup: - <LABEL>: - filesystem: <FS_TYPE> - device: <DEVICE> - partition: <PART_VALUE> - overwrite: <OVERWRITE> + - label: <LABEL> + filesystem: <FS_TYPE> + device: <DEVICE> + partition: <PART_VALUE> + overwrite: <OVERWRITE> Where: - <LABEL>: The file system label to be used. + <LABEL>: The file system label to be used. If set to None, no label is + used. <FS_TYPE>: The file system type. It is assumed that the there will be a "mkfs.<FS_TYPE>" that behaves likes "mkfs". On a standard @@ -166,13 +206,5 @@ Where: "false": If an existing file system exists, skip the creation. - "force": Recreate the file system, even it already exists - - Behavior Caveat: The default behavior is to _check_ if the file system exists. If a file system matches the specification, then the operation is a no-op. - - For 'ephemeralX' or 'swap' labeled filesystems, the operation will be a - no-op if a file system of the same type is present, regardless of the label. - This is to accommodate Clouds like EC2 that present a blank file system with - out a label. diff --git a/doc/sources/smartos/README.rst b/doc/sources/smartos/README.rst index fd4e496d..e2d3312e 100644 --- a/doc/sources/smartos/README.rst +++ b/doc/sources/smartos/README.rst @@ -5,11 +5,13 @@ SmartOS Datasource This datasource finds metadata and user-data from the SmartOS virtualization platform (i.e. Joyent). +Please see http://smartos.org/ for information about SmartOS. + SmartOS Platform ---------------- -The SmartOS virtualization platform meta-data to the instance via the second -serial console. On Linux, this is /dev/ttyS1. The data is a provided via a -simple protocol, where something queries for the userdata, where the console +The SmartOS virtualization platform uses meta-data to the instance via the +second serial console. On Linux, this is /dev/ttyS1. The data is a provided +via a simple protocol: something queries for the data, the console responds responds with the status and if "SUCCESS" returns until a single ".\n". New versions of the SmartOS tooling will include support for base64 encoded data. @@ -18,7 +20,7 @@ Userdata -------- In SmartOS parlance, user-data is a actually meta-data. This userdata can be -provided a key-value pairs. +provided as key-value pairs. Cloud-init supports reading the traditional meta-data fields supported by the SmartOS tools. These are: @@ -36,13 +38,13 @@ user-script SmartOS traditionally supports sending over a user-script for execution at the rc.local level. Cloud-init supports running user-scripts as if they were cloud-init user-data. In this sense, anything with a shell interpreter -directive will run +directive will run. user-data and user-script ------------------------- In the event that a user defines the meta-data key of "user-data" it will -always supercede any user-script data. This is for consistency. +always supersede any user-script data. This is for consistency. base64 ------ @@ -70,3 +72,16 @@ or not to base64 decode something: * no_base64_decode: This is a configuration setting (i.e. /etc/cloud/cloud.cfg.d) that sets which values should not be base64 decoded. + +ephemeral_disk: +--------------- + +In order to instruct Cloud-init which disk to auto-mount. By default, +SmartOS only supports a single ephemeral disk. + +The default SmartOS configuration will prepare the ephemeral disk and format +it for you. SmartOS does not, by default, prepare the ephemeral disk for you. + +If you change ephemeral_disk, you should also consider changing +the default disk formatting parameters. See +doc/examples/cloud-config-disk-setup.txt for information on using this. |