Merge lp:~raharper/curtin/trunk.documentation-update into lp:~curtin-dev/curtin/trunk

Proposed by Scott Moser
Status: Merged
Merged at revision: 423
Proposed branch: lp:~raharper/curtin/trunk.documentation-update
Merge into: lp:~curtin-dev/curtin/trunk
Diff against target: 2930 lines (+2351/-313)
16 files modified
Makefile (+3/-1)
curtin/__init__.py (+2/-0)
doc/conf.py (+21/-4)
doc/devel/README-vmtest.txt (+0/-221)
doc/devel/README.txt (+0/-55)
doc/index.rst (+6/-0)
doc/topics/apt_source.rst (+26/-20)
doc/topics/config.rst (+551/-0)
doc/topics/development.rst (+68/-0)
doc/topics/integration-testing.rst (+245/-0)
doc/topics/networking.rst (+522/-0)
doc/topics/overview.rst (+7/-7)
doc/topics/reporting.rst (+3/-3)
doc/topics/storage.rst (+894/-0)
setup.py (+2/-2)
tox.ini (+1/-0)
To merge this branch: bzr merge lp:~raharper/curtin/trunk.documentation-update
Reviewer Review Type Date Requested Status
curtin developers Pending
Review via email: mp+295223@code.launchpad.net
To post a comment you must log in.
389. By Ryan Harper

Flesh out some more networking; Pull in an previous version of storage documentation.

390. By Ryan Harper

fix indentation warnings.

391. By Ryan Harper

Move curtin VERSION into module; use in setup.py, and doc building.

392. By Ryan Harper

doc: Content update to storage.rst.

393. By Ryan Harper

doc: use rtd theme

394. By Ryan Harper

Apply some common formatting to list elements that are keys in dictionaries. Remove redundent lvm entry.

395. By Ryan Harper

Clear up network configuration types and subnet keys.

396. By Ryan Harper

Change net/storage table of contents to include the syntax formatting

397. By Ryan Harper

aspell -c overview.rst

398. By Ryan Harper

aspell -c networking.rst

399. By Ryan Harper

aspell -c development.rst

400. By Ryan Harper

aspell -c integration-testing.rst

401. By Ryan Harper

aspell -c reporting.rst

402. By Ryan Harper

aspell -c storage.rst

403. By Ryan Harper

Add curtin top-level config documentation.

404. By Ryan Harper

Fixes suggested by smoser.

405. By Ryan Harper

Fix swap multiplier values

406. By Ryan Harper

drop mention of device in route config

407. By Ryan Harper

merge with trunk

408. By Ryan Harper

cleanup make docs after merge

409. By Ryan Harper

merge from trunk

410. By Ryan Harper

merge from trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile'
--- Makefile 2016-07-26 13:30:35 +0000
+++ Makefile 2016-08-29 23:08:04 +0000
@@ -49,5 +49,7 @@
49sync-images:49sync-images:
50 @$(CWD)/tools/vmtest-sync-images50 @$(CWD)/tools/vmtest-sync-images
5151
52clean:
53 rm -rf doc/_build
5254
53.PHONY: all test pyflakes pyflakes3 pep8 build55.PHONY: all clean test pyflakes pyflakes3 pep8 build
5456
=== modified file 'curtin/__init__.py'
--- curtin/__init__.py 2016-07-15 17:20:36 +0000
+++ curtin/__init__.py 2016-08-29 23:08:04 +0000
@@ -37,4 +37,6 @@
37 'APT_CONFIG_V1',37 'APT_CONFIG_V1',
38]38]
3939
40__version__ = "0.1.0"
41
40# vi: ts=4 expandtab syntax=python42# vi: ts=4 expandtab syntax=python
4143
=== modified file 'doc/conf.py'
--- doc/conf.py 2015-08-27 18:24:31 +0000
+++ doc/conf.py 2016-08-29 23:08:04 +0000
@@ -13,6 +13,11 @@
1313
14import sys, os14import sys, os
1515
16# Fix path so we can import curtin.__version__
17sys.path.insert(1, os.path.realpath(os.path.join(
18 os.path.dirname(__file__), '..')))
19import curtin
20
16# If extensions (or modules to document with autodoc) are in another directory,21# If extensions (or modules to document with autodoc) are in another directory,
17# add these directories to sys.path here. If the directory is relative to the22# add these directories to sys.path here. If the directory is relative to the
18# documentation root, use os.path.abspath to make it absolute, like shown here.23# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -41,16 +46,16 @@
4146
42# General information about the project.47# General information about the project.
43project = u'curtin'48project = u'curtin'
44copyright = u'2013, Scott Moser'49copyright = u'2016, Scott Moser, Ryan Harper'
4550
46# The version info for the project you're documenting, acts as replacement for51# The version info for the project you're documenting, acts as replacement for
47# |version| and |release|, also used in various other places throughout the52# |version| and |release|, also used in various other places throughout the
48# built documents.53# built documents.
49#54#
50# The short X.Y version.55# The short X.Y version.
51version = '0.3'56version = curtin.__version__
52# The full version, including alpha/beta/rc tags.57# The full version, including alpha/beta/rc tags.
53release = '0.3'58release = version
5459
55# The language for content autogenerated by Sphinx. Refer to documentation60# The language for content autogenerated by Sphinx. Refer to documentation
56# for a list of supported languages.61# for a list of supported languages.
@@ -93,6 +98,18 @@
93# a list of builtin themes.98# a list of builtin themes.
94html_theme = 'classic'99html_theme = 'classic'
95100
101# on_rtd is whether we are on readthedocs.org, this line of code grabbed from
102# docs.readthedocs.org
103on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
104
105if not on_rtd: # only import and set the theme if we're building docs locally
106 import sphinx_rtd_theme
107 html_theme = 'sphinx_rtd_theme'
108 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
109
110# otherwise, readthedocs.org uses their theme by default, so no need to specify
111# it
112
96# Theme options are theme-specific and customize the look and feel of a theme113# Theme options are theme-specific and customize the look and feel of a theme
97# further. For a list of options available for each theme, see the114# further. For a list of options available for each theme, see the
98# documentation.115# documentation.
@@ -120,7 +137,7 @@
120# Add any paths that contain custom static files (such as style sheets) here,137# Add any paths that contain custom static files (such as style sheets) here,
121# relative to this directory. They are copied after the builtin static files,138# relative to this directory. They are copied after the builtin static files,
122# so a file named "default.css" will overwrite the builtin "default.css".139# so a file named "default.css" will overwrite the builtin "default.css".
123html_static_path = ['static']140#html_static_path = ['static']
124141
125# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,142# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
126# using the given strftime format.143# using the given strftime format.
127144
=== removed file 'doc/devel/README-vmtest.txt'
--- doc/devel/README-vmtest.txt 2016-08-02 08:18:23 +0000
+++ doc/devel/README-vmtest.txt 1970-01-01 00:00:00 +0000
@@ -1,221 +0,0 @@
1== Background ==
2Curtin includes a mechanism called 'vmtest' that allows it to actually
3do installs and validate a number of configurations.
4
5The general flow of the vmtests is:
6 1. each test has an associated yaml config file for curtin in examples/tests
7 2. uses curtin-pack to create the user-data for cloud-init to trigger install
8 3. create and install a system using 'tools/launch'.
9 3.1 The install environment is booted from a maas ephemeral image.
10 3.2 kernel & initrd used are from maas images (not part of the image)
11 3.3 network by default is handled via user networking
12 3.4 It creates all empty disks required
13 3.5 cloud-init datasource is provided by launch
14 a) like: ds=nocloud-net;seedfrom=http://10.7.0.41:41518/
15 provided by python webserver start_http
16 b) via -drive file=/tmp/launch.8VOiOn/seed.img,if=virtio,media=cdrom
17 as a seed disk (if booted without external kernel)
18 3.6 dependencies and other preparations are installed at the beginning by
19 curtin inside the ephemeral image prior to configuring the target
20 4. power off the system.
21 5. configure a 'NoCloud' datasource seed image that provides scripts that
22 will run on first boot.
23 5.1 this will contain all our code to gather health data on the install
24 5.2 by cloud-init design this runs only once per instance, if you start
25 the system again this won't be called again
26 6. boot the installed system with 'tools/xkvm'.
27 6.1 reuses the disks that were installed/configured in the former steps
28 6.2 also adds an output disk
29 6.3 additionally the seed image for the data gathering is added
30 6.4 On this boot it will run the provided scripts, write their output to a
31 "data" disk and then shut itself down.
32 7. extract the data from the output disk
33 8. vmtest python code now verifies if the output is as expected.
34
35== Debugging ==
36At 3.1
37 - one can pull data out of the maas image with
38 sudo mount-image-callback your.img -- sh -c 'COMMAND'
39 e.g. sudo mount-image-callback your.img -- sh -c 'cp $MOUNTPOINT/boot/* .'
40At step 3.6 -> 4.
41 - tools/launch can be called in a way to give you console access
42 to do so just call tools/launch but drop the -serial=x parameter.
43 One might want to change "'power_state': {'mode': 'poweroff'}" to avoid
44 the auto reboot before getting control
45 Replace the directory usually seen in the launch calls with a clean fresh
46 directory
47 - In /curtin curtin and its config can be found
48 - if the system gets that far cloud-init will create a user ubuntu/passw0rd
49 - otherwise one can use a cloud-image from https://cloud-images.ubuntu.com/
50 and add a backdoor user via
51 bzr branch lp:~maas-maintainers/maas/backdoor-image backdoor-image
52 sudo ./backdoor-image -v --user=<USER> --password-auth --password=<PW> IMG
53At step 6 -> 7
54 - You might want to keep all the temporary images around.
55 To do so you can set CURTIN_VMTEST_KEEP_DATA_PASS=all:
56 export CURTIN_VMTEST_KEEP_DATA_PASS=all CURTIN_VMTEST_KEEP_DATA_FAIL=all
57 That will keep the /tmp/tmpXXXXX directories and all files in there for
58 further execution.
59At step 7
60 - You might want to take a look at the output disk yourself.
61 It is a normal qcow image, so one can use mount-image-callback as described
62 above
63 - to invoke xkvm on your own take the command you see in the output and
64 remove the "-serial ..." but add -nographic instead
65 For graphical console one can add --vnc 127.0.0.1:1
66
67== Setup ==
68In order to run vmtest you'll need some dependencies. To get them, you
69can run:
70 make vmtest-deps
71
72That will install all necessary dependencies.
73
74== Running ==
75Running tests is done most simply by:
76
77 make vmtest
78
79If you wish to all tests in test_network.py, do so with:
80 sudo PATH=$PWD/tools:$PATH nosetests3 tests/vmtests/test_network.py
81
82Or run a single test with:
83 sudo PATH=$PWD/tools:$PATH nosetests3 tests/vmtests/test_network.py:WilyTestBasic
84
85Note:
86 * currently, the tests have to run as root. The reason for this is that
87 the kernel and initramfs to boot are extracted from the maas ephemeral
88 image. This should be fixed at some point, and then 'make vmtest'
89
90 The tests themselves don't actually have to run as root, but the
91 test setup does.
92 * the 'tools' directory must be in your path.
93 * test will set apt: { proxy } in the guests to the value of
94 'apt_proxy' environment variable. If that is not set it will
95 look at the host's apt config and read 'Acquire::HTTP::Proxy'
96
97== Environment Variables ==
98Some environment variables affect the running of vmtest
99 * apt_proxy:
100 test will set apt_proxy in the guests to the value of 'apt_proxy'.
101 If that is not set it will look at the host's apt config and read
102 'Acquire::HTTP::Proxy'
103
104 * CURTIN_VMTEST_KEEP_DATA_PASS CURTIN_VMTEST_KEEP_DATA_FAIL:
105 default:
106 CURTIN_VMTEST_KEEP_DATA_PASS=none
107 CURTIN_VMTEST_KEEP_DATA_FAIL=all
108 These 2 variables determine what portions of the temporary
109 test data are kept.
110
111 The variables contain a comma ',' delimited list of directories
112 that should be kept in the case of pass or fail. Additionally,
113 the values 'all' and 'none' are accepted.
114
115 Each vmtest that runs has its own sub-directory under the top level
116 CURTIN_VMTEST_TOPDIR. In that directory are directories:
117 boot: inputs to the system boot (after install)
118 install: install phase related files
119 disks: the disks used for installation and boot
120 logs: install and boot logs
121 collect: data collected by the boot phase
122
123 * CURTIN_VMTEST_TOPDIR: default $TMPDIR/vmtest-<timestamp>
124 vmtest puts all test data under this value. By default, it creates
125 a directory in TMPDIR (/tmp) named with as "vmtest-<timestamp>"
126
127 If you set this value, you must ensure that the directory is either
128 non-existant or clean.
129
130 * CURTIN_VMTEST_LOG: default $TMPDIR/vmtest-<timestamp>.log
131 vmtest writes extended log information to this file.
132 The default puts the log along side the TOPDIR.
133
134 * CURTIN_VMTEST_IMAGE_SYNC: default false (boolean)
135 if set to true, each run will attempt a sync of images.
136 If you want to make sure images are always up to date, then set to true.
137
138 * CURTIN_VMTEST_BRIDGE: default 'user'
139 the network devices will be attached to this bridge. The default is
140 'user', which means to use qemu user mode networking. Set it to
141 'virbr0' or 'lxcbr0' to use those bridges and then be able to ssh
142 in directly.
143
144 * CURTIN_VMTEST_BOOT_TIMEOUT: default 300
145 timeout before giving up on the boot of the installed system.
146
147 * CURTIN_VMTEST_INSTALL_TIMEOUT: default 3000
148 timeout before giving up on installation.
149
150 * CURTIN_VMTEST_PARALLEL: default ''
151 only supported through ./tools/jenkins-runner .
152 -1 : then run one per core.
153 0 or '': then run with no parallel
154 >0 : run with N processes
155 this modifies the invocation of nosetets to add '--processes' and other
156 necessary nose arguments (--process-timeout)
157
158 * IMAGE_DIR: default /srv/images
159 vmtest keeps a mirror of maas ephemeral images in this directory.
160
161 * IMAGES_TO_KEEP: default 1
162 keep this number of images of each release in the IMAGE_DIR.
163
164Environment 'boolean' values:
165 For boolean environment variables the value is considered True
166 if it is any value other than case insensitive 'false', '' or "0"
167
168
169== Test Class Variables ==
170The base VMBaseClass defines several variables that help creating a new test
171easily. Among those the common ones are:
172
173Generic:
174- arch_skip
175 If a test is not supported on an architecture it can list the arch in this
176 variable to auto-skip the test if executed on that arch.
177- conf_file
178 The configuration that will be processed by this vmtest.
179- extra_kern_args
180 Extra arguments to the guest kernel on boot.
181
182Data Collection:
183- collect_scripts
184 The commands run when booting into the installed environment to collect the
185 data for the test to verify a proper execution.
186- boot_cloudconf
187 Extra cloud-init config content for the install phase.
188 This allows to gather content of the install phase if needed for test
189 verification.
190
191
192Disk Setup:
193- disk_block_size = 512
194- disk_driver = 'virtio-blk'
195 Used to set up the disks for the virtual environment used by the vmtest.
196 Will set the values used in extra_disks if not specified there.
197- extra_disks
198 A list of extra disks to be created for the testcase. The definition is
199 dpath:size:driver:block_size
200- multipath = False
201- multipath_num_paths = 2
202 Details for the (virtual) multipath setup
203- nvme_disks
204 a shortcut to provide extra disks with the nvme driver
205
206Timeouts:
207- boot_timeout
208- install_timeout
209 Usually set via CURTIN_VMTEST_BOOT_TIMEOUT/CURTIN_VMTEST_INSTALL_TIMEOUT
210 (see above) environment var, but can be overwritten by a testcase if needed.
211
212Checks:
213- disk_to_check
214 A disk name that is verified to be existing after the installation.
215- fstab_expected
216
217Release:
218- release = None
219- krel = None
220 Those two define the distribution and kernel release to be tested and are
221 usually set by importing and inheriting from tests/vmtests/releases.py
2220
=== removed file 'doc/devel/README.txt'
--- doc/devel/README.txt 2015-03-04 13:30:53 +0000
+++ doc/devel/README.txt 1970-01-01 00:00:00 +0000
@@ -1,55 +0,0 @@
1## curtin development ##
2
3This document describes how to use kvm and ubuntu cloud images
4to develop curtin or test install configurations inside kvm.
5
6## get some dependencies ##
7sudo apt-get -qy install kvm libvirt-bin cloud-utils bzr
8
9## get cloud image to boot (-disk1.img) and one to install (-root.tar.gz)
10mkdir -p ~/download
11DLDIR=$( cd ~/download && pwd )
12rel="trusty"
13arch=amd64
14burl="http://cloud-images.ubuntu.com/$rel/current/"
15for f in $rel-server-cloudimg-${arch}-root.tar.gz $rel-server-cloudimg-${arch}-disk1.img; do
16 wget "$burl/$f" -O $DLDIR/$f; done
17( cd $DLDIR && qemu-img convert -O qcow $rel-server-cloudimg-${arch}-disk1.img $rel-server-cloudimg-${arch}-disk1.qcow2)
18
19BOOTIMG="$DLDIR/$rel-server-cloudimg-${arch}-disk1.qcow2"
20ROOTTGZ="$DLDIR/$rel-server-cloudimg-${arch}-root.tar.gz"
21
22## get curtin
23mkdir -p ~/src
24bzr init-repo ~/src/curtin
25( cd ~/src/curtin && bzr branch lp:curtin trunk.dist )
26( cd ~/src/curtin && bzr branch trunk.dist trunk )
27
28## work with curtin
29cd ~/src/curtin/trunk
30# use 'launch' to launch a kvm instance with user data to pack
31# up local curtin and run it inside instance.
32./tools/launch $BOOTIMG --publish $ROOTTGZ -- curtin install "PUBURL/${ROOTTGZ##*/}"
33
34## notes about 'launch' ##
35 * launch has --help so you can see that for some info.
36 * '--publish' adds a web server at ${HTTP_PORT:-9923}
37 and puts the files you want available there. You can reference
38 this url in config or cmdline with 'PUBURL'. For example
39 '--publish foo.img' will put 'foo.img' at PUBURL/foo.img.
40 * launch sets 'ubuntu' user password to 'passw0rd'
41 * launch runs 'kvm -curses'
42 kvm -curses keyboard info:
43 'alt-2' to go to qemu console
44 * launch puts serial console to 'serial.log' (look there for stuff)
45 * when logged in
46 * you can look at /var/log/cloud-init-output.log
47 * archive should be extracted in /curtin
48 * shell archive should be in /var/lib/cloud/instance/scripts/part-002
49 * when logged in, and archive available at
50
51
52## other notes ##
53 * need to add '--install-deps' or something for curtin
54 cloud-image in 12.04 has no 'python3'
55 ideally 'curtin --install-deps install' would get the things it needs
560
=== modified file 'doc/index.rst'
--- doc/index.rst 2015-08-27 19:54:41 +0000
+++ doc/index.rst 2016-08-29 23:08:04 +0000
@@ -13,7 +13,13 @@
13 :maxdepth: 213 :maxdepth: 2
1414
15 topics/overview15 topics/overview
16 topics/config
17 topics/apt_source
18 topics/networking
19 topics/storage
16 topics/reporting20 topics/reporting
21 topics/development
22 topics/integration-testing
1723
1824
1925
2026
=== modified file 'doc/topics/apt_source.rst'
--- doc/topics/apt_source.rst 2016-08-02 07:53:52 +0000
+++ doc/topics/apt_source.rst 2016-08-29 23:08:04 +0000
@@ -9,7 +9,7 @@
9The feature has an optional target argument which - by default - is used to modify the environment that curtin currently installs (@TARGET_MOUNT_POINT).9The feature has an optional target argument which - by default - is used to modify the environment that curtin currently installs (@TARGET_MOUNT_POINT).
1010
11Features11Features
12--------12~~~~~~~~
1313
14* Add PGP keys to the APT trusted keyring14* Add PGP keys to the APT trusted keyring
1515
@@ -39,7 +39,7 @@
3939
4040
41Configuration41Configuration
42-------------42~~~~~~~~~~~~~
4343
44The general configuration of the apt feature is under an element called ``apt``.44The general configuration of the apt feature is under an element called ``apt``.
4545
@@ -53,7 +53,8 @@
53The key is the filename and will be prepended by /etc/apt/sources.list.d/ if it doesn't start with a ``/``.53The key is the filename and will be prepended by /etc/apt/sources.list.d/ if it doesn't start with a ``/``.
54There are certain cases - where no content is written into a source.list file where the filename will be ignored - yet it can still be used as index for merging.54There are certain cases - where no content is written into a source.list file where the filename will be ignored - yet it can still be used as index for merging.
5555
56The values inside the entries consist of the following optional entries::56The values inside the entries consist of the following optional entries
57
57* ``source``: a sources.list entry (some variable replacements apply)58* ``source``: a sources.list entry (some variable replacements apply)
5859
59* ``keyid``: providing a key to import via shortid or fingerprint60* ``keyid``: providing a key to import via shortid or fingerprint
@@ -62,7 +63,8 @@
6263
63* ``keyserver``: specify an alternate keyserver to pull keys from that were specified by keyid64* ``keyserver``: specify an alternate keyserver to pull keys from that were specified by keyid
6465
65The section "sources" is is a dictionary (unlike most block/net configs which are lists). This format allows merging between multiple input files than a list like::66The section "sources" is is a dictionary (unlike most block/net configs which are lists). This format allows merging between multiple input files than a list like ::
67
66 sources:68 sources:
67 s1: {'key': 'key1', 'source': 'source1'}69 s1: {'key': 'key1', 'source': 'source1'}
6870
@@ -101,8 +103,7 @@
101103
102 - make an example with a partial mirror that doesn't mirror the backports suite, so backports have to be disabled104 - make an example with a partial mirror that doesn't mirror the backports suite, so backports have to be disabled
103105
104That would be specified as106That would be specified as ::
105::
106107
107 apt:108 apt:
108 primary:109 primary:
@@ -125,26 +126,31 @@
125126
126127
127Common snippets128Common snippets
128---------------129~~~~~~~~~~~~~~~
129This is a collection of additional ideas people can use the feature for customizing their to-be-installed system.130This is a collection of additional ideas people can use the feature for customizing their to-be-installed system.
130131
131* enable proposed on installing132* enable proposed on installing
132 apt:133
133 sources:134::
134 proposed.list: deb $MIRROR $RELEASE-proposed main restricted universe multiverse135
136 apt:
137 sources:
138 proposed.list: deb $MIRROR $RELEASE-proposed main restricted universe multiverse
135139
136* Make debug symbols available140* Make debug symbols available
137 apt:141
138  sources:142::
139   ddebs.list: |143
140   deb http://ddebs.ubuntu.com $RELEASE main restricted universe multiverse144 apt:
141   deb http://ddebs.ubuntu.com $RELEASE-updates main restricted universe multiverse145 sources:
142  deb http://ddebs.ubuntu.com $RELEASE-security main restricted universe multiverse146 ddebs.list: |
143 deb http://ddebs.ubuntu.com $RELEASE-proposed main restricted universe multiverse147 deb http://ddebs.ubuntu.com $RELEASE main restricted universe multiverse
144148  deb http://ddebs.ubuntu.com $RELEASE-updates main restricted universe multiverse
149  deb http://ddebs.ubuntu.com $RELEASE-security main restricted universe multiverse
150 deb http://ddebs.ubuntu.com $RELEASE-proposed main restricted universe multiverse
145151
146Timing152Timing
147------153~~~~~~
148The feature is implemented at the stage of curthooks_commands, which runs just after curtin has extracted the image to the target.154The feature is implemented at the stage of curthooks_commands, which runs just after curtin has extracted the image to the target.
149Additionally it can be ran as standalong command "curtin -v --config <yourconfigfile> apt-config".155Additionally it can be ran as standalong command "curtin -v --config <yourconfigfile> apt-config".
150156
@@ -153,6 +159,6 @@
153159
154160
155Dependencies161Dependencies
156------------162~~~~~~~~~~~~
157Cloud-init might need to resolve dependencies and install packages in the ephemeral environment to run curtin.163Cloud-init might need to resolve dependencies and install packages in the ephemeral environment to run curtin.
158Therefore it is recommended to not only provide an apt configuration to curtin for the target, but also one to the install environment via cloud-init.164Therefore it is recommended to not only provide an apt configuration to curtin for the target, but also one to the install environment via cloud-init.
159165
=== added file 'doc/topics/config.rst'
--- doc/topics/config.rst 1970-01-01 00:00:00 +0000
+++ doc/topics/config.rst 2016-08-29 23:08:04 +0000
@@ -0,0 +1,551 @@
1====================
2Curtin Configuration
3====================
4
5Curtin exposes a number of configuration options for controlling Curtin
6behavior during installation.
7
8
9Configuration options
10---------------------
11Curtin's top level config keys are as follows:
12
13
14- apt_mirrors (``apt_mirrors``)
15- apt_proxy (``apt_proxy``)
16- block-meta (``block``)
17- debconf_selections (``debconf_selections``)
18- disable_overlayroot (``disable_overlayroot``)
19- grub (``grub``)
20- http_proxy (``http_proxy``)
21- install (``install``)
22- kernel (``kernel``)
23- kexec (``kexec``)
24- multipath (``multipath``)
25- network (``network``)
26- power_state (``power_state``)
27- reporting (``reporting``)
28- restore_dist_interfaces: (``restore_dist_interfaces``)
29- sources (``sources``)
30- stages (``stages``)
31- storage (``storage``)
32- swap (``swap``)
33- system_upgrade (``system_upgrade``)
34- write_files (``write_files``)
35
36
37apt_mirrors
38~~~~~~~~~~~
39Configure APT mirrors for ``ubuntu_archive`` and ``ubuntu_security``
40
41**ubuntu_archive**: *<http://local.archive/ubuntu>*
42
43**ubuntu_security**: *<http://local.archive/ubuntu>*
44
45If the target OS includes /etc/apt/sources.list, Curtin will replace
46the default values for each key set with the supplied mirror URL.
47
48**Example**::
49
50 apt_mirrors:
51 ubuntu_archive: http://local.archive/ubuntu
52 ubuntu_security: http://local.archive/ubuntu
53
54
55apt_proxy
56~~~~~~~~~
57Curtin will configure an APT HTTP proxy in the target OS
58
59**apt_proxy**: *<URL to APT proxy>*
60
61**Example**::
62
63 apt_proxy: http://squid.mirror:3267/
64
65
66block-meta
67~~~~~~~~~~
68Configure how Curtin selects and configures disks on the target
69system without providing a custom configuration (mode=simple).
70
71**devices**: *<List of block devices for use>*
72
73The ``devices`` parameter is a list of block device paths that Curtin may
74select from with choosing where to install the OS.
75
76**boot-partition**: *<dictionary of configuration>*
77
78The ``boot-partition`` parameter controls how to configure the boot partition
79with the following parameters:
80
81**enabled**: *<boolean>*
82
83Enabled will forcibly setup a partition on the target device for booting.
84
85**format**: *<['uefi', 'gpt', 'prep', 'mbr']>*
86
87Specify the partition format. Some formats, like ``uefi`` and ``prep``
88are restricted by platform characteristics.
89
90**fstype**: *<filesystem type: one of ['ext3', 'ext4'], defaults to 'ext4'>*
91
92Specify the filesystem format on the boot partition.
93
94**label**: *<filesystem label: defaults to 'boot'>*
95
96Specify the filesystem label on the boot partition.
97
98**Example**::
99
100 block-meta:
101 devices:
102 - /dev/sda
103 - /dev/sdb
104 boot-partition:
105 - enabled: True
106 format: gpt
107 fstype: ext4
108 label: my-boot-partition
109
110
111debconf_selections
112~~~~~~~~~~~~~~~~~~
113Curtin will update the target with debconf set-selection values. Users will
114need to be familiar with the package debconf options. Users can probe a
115packages' debconf settings by using ``debconf-get-selections``.
116
117**selection_name**: *<debconf-set-selections input>*
118
119``debconf-set-selections`` is in the form::
120
121 <packagename> <packagename/option-name> <type> <value>
122
123**Example**::
124
125 debconf_selections:
126 set1: |
127 cloud-init cloud-init/datasources multiselect MAAS
128 lxd lxd/bridge-name string lxdbr0
129 set2: lxd lxd/setup-bridge boolean true
130
131
132
133disable_overlayroot
134~~~~~~~~~~~~~~~~~~~
135Curtin disables overlayroot in the target by default.
136
137**disable_overlayroot**: *<boolean: default True>*
138
139**Example**::
140
141 disable_overlayroot: False
142
143
144grub
145~~~~
146Curtin configures grub as the target machine's boot loader. Users
147can control a few options to tailor how the system will boot after
148installation.
149
150**install_devices**: *<list of block device names to install grub>*
151
152Specify a list of devices onto which grub will attempt to install.
153
154**replace_linux_default**: *<boolean: default True>*
155
156Controls whether grub-install will update the Linux Default target
157value during installation.
158
159**update_nvram**: *<boolean: default False>*
160
161Certain platforms, like ``uefi`` and ``prep`` systems utilize
162NVRAM to hold boot configuration settings which control the order in
163which devices are booted. Curtin by default will not attempt to
164update the NVRAM settings to preserve the system configuration.
165Users may want to force NVRAM to be updated such that the next boot
166of the system will boot from the installed device.
167
168**Example**::
169
170 grub:
171 install_devices:
172 - /dev/sda1
173 replace_linux_default: False
174 update_nvram: True
175
176
177http_proxy
178~~~~~~~~~~
179Curtin will export ``http_proxy`` value into the installer environment.
180
181**http_proxy**: *<HTTP Proxy URL>*
182
183**Example**::
184
185 http_proxy: http://squid.proxy:3728/
186
187
188
189install
190~~~~~~~
191Configure Curtin's install options.
192
193**log_file**: *<path to write Curtin's install.log data>*
194
195Curtin logs install progress by default to /var/log/curtin/install.log
196
197**post_files**: *<List of files to read from host to include in reporting data>*
198
199Curtin by default will post the ``log_file`` value to any configured reporter.
200
201**save_install_config**: *<Path to save merged curtin configuration file>*
202
203Curtin will save the merged configuration data into the target OS at
204the path of ``save_install_config``. This defaults to /root/curtin-install-cfg.yaml
205
206**Example**::
207
208 install:
209 log_file: /tmp/install.log
210 post_files:
211 - /tmp/install.log
212 - /var/log/syslog
213 save_install_config: /root/myconf.yaml
214
215
216kernel
217~~~~~~
218Configure how Curtin selects which kernel to install into the target image.
219If ``kernel`` is not configured, Curtin will use the default mapping below
220and determine which ``package`` value by looking up the current release
221and current kernel version running.
222
223
224**fallback-package**: *<kernel package-name to be used as fallback>*
225
226Specify a kernel package name to be used if the default package is not
227available.
228
229**mapping**: *<Dictionary mapping Ubuntu release to HWE kernel names>*
230
231Default mapping for Releases to package names is as follows::
232
233 precise:
234 3.2.0:
235 3.5.0: -lts-quantal
236 3.8.0: -lts-raring
237 3.11.0: -lts-saucy
238 3.13.0: -lts-trusty
239 trusty:
240 3.13.0:
241 3.16.0: -lts-utopic
242 3.19.0: -lts-vivid
243 4.2.0: -lts-wily
244 4.4.0: -lts-xenial
245 xenial:
246 4.3.0:
247 4.4.0:
248
249
250**package**: *<Linux kernel package name>*
251
252Specify the exact package to install in the target OS.
253
254**Example**::
255
256 kernel:
257 fallback-package: linux-image-generic
258 package: linux-image-generic-lts-xenial
259 mapping:
260 - xenial:
261 - 4.4.0: -my-custom-kernel
262
263
264kexec
265~~~~~
266Curtin can use kexec to "reboot" into the target OS.
267
268**mode**: *<on>*
269
270Enable rebooting with kexec.
271
272**Example**::
273
274 kexec: on
275
276
277multipath
278~~~~~~~~~
279Curtin will detect and autoconfigure multipath by default to enable
280boot for systems with multipath. Curtin does not apply any advanced
281configuration or tuning, rather it uses distro defaults and provides
282enough configuration to enable booting.
283
284**mode**: *<['auto', ['disabled']>*
285
286Defaults to auto which will configure enough to enable booting on multipath
287devices. Disabled will prevent curtin from installing or configuring
288multipath.
289
290**overwrite_bindings**: *<boolean>*
291
292If ``overwrite_bindings`` is True then Curtin will generate new bindings
293file for multipath, overriding any existing binding in the target image.
294
295**Example**::
296
297 multipath:
298 mode: auto
299 overwrite_bindings: True
300
301
302network
303~~~~~~~
304Configure networking (see Networking section for details).
305
306**network_option_1**: *<option value>*
307
308**Example**::
309
310 network:
311 version: 1
312 config:
313 - type: physical
314 name: eth0
315 mac_address: "c0:d6:9f:2c:e8:80"
316 subnets:
317 - type: dhcp4
318
319
320power_state
321~~~~~~~~~~~
322Curtin can configure the target machine into a specific power state after
323completing an installation. Default is to do nothing.
324
325**delay**: *<Integer seconds to delay change in state>*
326
327Curtin will wait ``delay`` seconds before changing the power state.
328
329**mode**: *<New power state is one of: [halt, poweroff, reboot]>*
330
331Curtin will transition the node into one of the new states listed.
332
333``halt`` will stop a machine, but may not cut the power to the system.
334``poweroff`` will stop a machine and request it shut off the power.
335``reboot`` will perform a platform reset.
336
337**message**: *<message string>*
338
339The ``message`` string will be broadcast to system consoles prior to
340power state change.
341
342
343**Example**::
344
345 power_state:
346 mode: poweroff
347 delay: 5
348 message: Bye Bye
349
350
351reporting
352~~~~~~~~~
353Configure installation reporting (see Reporting section for details).
354
355**Example**::
356
357 reporting:
358 maas:
359 level: DEBUG
360 type: webhook
361 endpoint: http://localhost:8000/
362
363
364restore_dist_interfaces
365~~~~~~~~~~~~~~~~~~~~~~~
366Curtin can restore a copy of /etc/network/interfaces built in to cloud images.
367
368**restore_dist_interfaces**: *<boolean>*
369
370If True, then Curtin will restore the interfaces file into the target.
371
372
373**Example**::
374
375 restore_dist_interfaces: True
376
377
378sources
379~~~~~~~
380Specify the root image to install on to the target system. The URI also
381configures the method used to copy the image to the target system.
382
383**sources**: *<List of source URIs>*
384
385``source URI`` may be one of:
386
387- **dd-**: Use ``dd`` command to write image to target.
388- **cp://**: Use ``rsync`` command to copy source directory to target.
389- **file://**: Use ``tar`` command to extract source to target.
390- **http[s]://**: Use ``wget | tar`` commands to extract source to target.
391
392**Example Cloud-image**::
393
394 sources:
395 - https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-root.tar.gz
396
397**Example Custom DD image**::
398
399 sources:
400 - dd-img: https://localhost/raw_images/centos-6-3.img
401
402**Example Copy from booted environment**::
403
404 sources:
405 - cp:///
406
407
408**Example Copy from local tarball**::
409
410 sources:
411 - file:///tmp/root.tar.gz
412
413
414stages
415~~~~~~
416Curtin installation executes in stages. At each stage, Curtin will look for
417a list of commands to run at each stage by reading in from the Curtin config
418*<stage_name>_commands* which is a dictionary and each key contains a list
419of commands to run. Users may override the stages value to control
420what curtin stages execute. During each stage, the commands are executed
421in C Locale sort order. Users should name keys in a NN-XXX format where NN
422is a two-digit number to exercise control over execution order.
423
424The following stages are defined in Curtin and
425run by default.
426
427- **early**: *Preparing for Installation*
428
429This stage runs before any actions are taken for installation. By default
430this stage does nothing.
431
432- **partitioning**: *Select and partition disks for installation*
433
434This stage runs ``curtin block-meta simple`` by default.
435
436- **network**: *Probe and configure networking*
437
438This stage runs ``curtin net-meta auto`` by default.
439
440- **extract**: *Writing install sources to disk*
441
442This stage runs ``curtin extract`` by default.
443
444- **extract**: *Writing install sources to disk*
445
446This stage runs ``curtin extract`` by default.
447
448- **curthooks**: *Configuring installed system*
449
450This stage runs ``curtin curthooks`` by default.
451
452- **hooks**: *Finalizing installation*
453
454This stage runs ``curtin hook`` by default.
455
456- **late**: *Executing late commands*
457
458This stage runs after Curtin has completed the installation. By default
459this stage does nothing.
460
461**Example Custom Stages**::
462
463 # Skip the whole install and just run `mystage`
464 stages: ['early', 'late', 'mystage']
465 mystage_commands:
466 00-cmd: ['/usr/bin/foo']
467
468**Example Early and Late commands**::
469
470 early_commands:
471 99-cmd: ['echo', 'I ran last']
472 00-cmd: ['echo', 'I ran first']
473 late_commands:
474 50-cmd: ['curtin', 'in-target' '--', 'touch', '/etc/disable_overlayroot']
475
476
477swap
478~~~~
479Curtin can configure a swapfile on the filesystem in the target system.
480Size settings can be integer or string values with suffix. Curtin
481supports the following suffixes which multiply the value.
482
483- **B**: *1*
484- **K[B]**: *1 << 10*
485- **M[B]**: *1 << 20*
486- **G[B]**: *1 << 30*
487- **T[B]**: *1 << 40*
488
489Curtin will use a heuristic to configure the swapfile size if the ``size``
490parameter is not set to a specific value. The ``maxsize`` sets the upper
491bound of the heuristic calculation.
492
493**filename**: *<path to swap file>*
494
495Configure the filename of the swap file. Defaults to /swap.img
496
497**maxsize**: *<Size string>*
498
499Configure the max size of the swapfile, defaults to 8GB
500
501**size**: *<Size string>*
502
503Configure the exact size of the swapfile. Setting ``size`` to 0 will
504disable swap.
505
506**Example**::
507
508 swap:
509 filename: swap.img
510 size: None
511 maxsize: 4GB
512
513
514system_upgrade
515~~~~~~~~~~~~~~
516Control if Curtin runs `dist-upgrade` in target after install. Defaults to
517False.
518
519**enabled**: *<boolean>*
520
521**Example**::
522
523 system_upgrade:
524 enabled: False
525
526
527write_files
528~~~~~~~~~~~
529Curtin supports writing out arbitrary data to a file.
530``write_files`` accepts a dictionary of entries formatted as follows:
531
532**path**: *<path and filename to save content>*
533
534Specify the name and location of where to write the content.
535
536**permissions**: *<Unix permission string>*
537
538Specify the permissions mode as an integer or string of numbers.
539
540**content**: *<data>*
541
542Specify the content.
543
544**Example**::
545
546 write_files:
547 f1:
548 path: /file1
549 content: !!binary |
550 f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAwARAAAAAAABAAAAAAAAAAJAVAAAAAAA
551 f2: {path: /file2, content: "foobar", permissions: '0666'}
0552
=== added file 'doc/topics/development.rst'
--- doc/topics/development.rst 1970-01-01 00:00:00 +0000
+++ doc/topics/development.rst 2016-08-29 23:08:04 +0000
@@ -0,0 +1,68 @@
1=================
2Developing Curtin
3=================
4
5Curtin developers make use of cloud-images and kvm to help develop and test new
6curtin features.
7
8Install dependencies
9====================
10
11Install some virtualization and cloud packages to get started.::
12
13 sudo apt-get -qy install kvm libvirt-bin cloud-utils bzr
14
15
16Download cloud images
17=====================
18Curtin will use two cloud images (-disk1.img) is for booting,
19(-root.tar.gz) is used for installing.::
20
21 mkdir -p ~/download
22 DLDIR=$( cd ~/download && pwd )
23 rel="trusty"
24 arch=amd64
25 burl="http://cloud-images.ubuntu.com/$rel/current/"
26 for f in $rel-server-cloudimg-${arch}-root.tar.gz $rel-server-cloudimg-${arch}-disk1.img; do
27 wget "$burl/$f" -O $DLDIR/$f; done
28 ( cd $DLDIR && qemu-img convert -O qcow $rel-server-cloudimg-${arch}-disk1.img $rel-server-cloudimg-${arch}-disk1.qcow2)
29
30 export BOOTIMG="$DLDIR/$rel-server-cloudimg-${arch}-disk1.qcow2"
31 export ROOTTGZ="$DLDIR/$rel-server-cloudimg-${arch}-root.tar.gz"
32
33
34Getting the source
35==================
36Download curtin source from launchpad via `bzr` command.::
37
38 mkdir -p ~/src
39 bzr init-repo ~/src/curtin
40 ( cd ~/src/curtin && bzr branch lp:curtin trunk.dist )
41 ( cd ~/src/curtin && bzr branch trunk.dist trunk )
42
43Using curtin
44============
45Use `launch` to launch a kvm instance with user data to pack up
46local curtin and run it inside an instance.::
47
48 cd ~/src/curtin/trunk
49 ./tools/launch $BOOTIMG --publish $ROOTTGZ -- curtin install "PUBURL/${ROOTTGZ##*/}"
50
51
52Notes about 'launch'
53====================
54
55- launch has --help so you can see that for some info.
56- `--publish` adds a web server at ${HTTP_PORT:-$RANDOM_PORT}
57 and puts the files you want available there. You can reference
58 this url in config or cmdline with 'PUBURL'. For example
59 `--publish foo.img` will put `foo.img` at PUBURL/foo.img.
60- launch sets 'ubuntu' user password to 'passw0rd'
61- launch runs 'kvm -curses'
62 kvm -curses keyboard info:
63 'alt-2' to go to qemu console
64- launch puts serial console to 'serial.log' (look there for stuff)
65- when logged in
66 - you can look at /var/log/cloud-init-output.log
67 - archive should be extracted in /curtin
68 - shell archive should be in /var/lib/cloud/instance/scripts/part-002
069
=== added file 'doc/topics/integration-testing.rst'
--- doc/topics/integration-testing.rst 1970-01-01 00:00:00 +0000
+++ doc/topics/integration-testing.rst 2016-08-29 23:08:04 +0000
@@ -0,0 +1,245 @@
1===================
2Integration Testing
3===================
4
5Curtin includes an in-tree integration suite that runs hundreds of tests
6validating various forms of custom storage and network configurations across
7all of the supported Ubuntu LTS releases as well as some of the currently
8supported interim releases.
9
10Background
11==========
12
13Curtin includes a mechanism called 'vmtest' that allows it to actually
14do installs and validate a number of configurations.
15
16The general flow of the vmtests is:
17
18#. each test has an associated yaml config file for curtin in examples/tests
19#. uses curtin-pack to create the user-data for cloud-init to trigger install
20#. create and install a system using 'tools/launch'.
21
22 #. The install environment is booted from a maas ephemeral image.
23 #. kernel & initrd used are from maas images (not part of the image)
24 #. network by default is handled via user networking
25 #. It creates all empty disks required
26 #. cloud-init datasource is provided by launch
27
28 #. like: ds=nocloud-net;seedfrom=http://10.7.0.41:41518/
29 provided by python webserver start_http
30 #. via -drive file=/tmp/launch.8VOiOn/seed.img,if=virtio,media=cdrom
31 as a seed disk (if booted without external kernel)
32
33 #. dependencies and other preparations are installed at the beginning by
34 curtin inside the ephemeral image prior to configuring the target
35
36#. power off the system.
37#. configure a 'NoCloud' datasource seed image that provides scripts that
38 will run on first boot.
39
40 #. this will contain all our code to gather health data on the install
41 #. by cloud-init design this runs only once per instance, if you start
42 the system again this won't be called again
43
44#. boot the installed system with 'tools/xkvm'.
45
46 #. reuses the disks that were installed/configured in the former steps
47 #. also adds an output disk
48 #. additionally the seed image for the data gathering is added
49 #. On this boot it will run the provided scripts, write their output to a
50 "data" disk and then shut itself down.
51
52#. extract the data from the output disk
53#. vmtest python code now verifies if the output is as expected.
54
55Debugging
56=========
57
58At 3.1 one can pull data out of the maas image the command
59``mount-image-callback``. For example::
60
61 sudo mount-image-callback your.img -- sh -c 'cp $MOUNTPOINT/boot/* .'
62
63At step 3.6 through 4 ``tools/launch`` can be called in a way to give you
64console access. To do so just call tools/launch but drop the -serial=x
65parameter. One might want to change "'power_state': {'mode': 'poweroff'}" to
66avoid the auto reboot before getting control. Replace the directory usually
67seen in the launch calls with a clean fresh directory.
68
69In /curtin curtin and its config can be found. If the system gets that far
70cloud-init will create a user creds: ubuntu/passw0rd , otherwise one can use a
71cloud-image from https://cloud-images.ubuntu.com/ and add a backdoor user
72via::
73
74 bzr branch lp:~maas-maintainers/maas/backdoor-image backdoor-image
75 sudo ./backdoor-image -v --user=<USER> --password-auth --password=<PW> IMG
76
77At step 6 -> 7 you might want to keep all the temporary images around. To do
78so you can set ``CURTIN_VMTEST_KEEP_DATA_PASS=all`` in your environment. ::
79
80 export CURTIN_VMTEST_KEEP_DATA_PASS=all CURTIN_VMTEST_KEEP_DATA_FAIL=all
81
82That will keep the /tmp/tmpXXXXX directories and all files in there for further
83execution.
84
85At step 7 you might want to take a look at the output disk yourself. It is a
86normal qcow image, so one can use ``mount-image-callback`` as described above.
87
88To invoke xkvm on your own take the command you see in the output and remove
89the "-serial ..." but add ``-nographic`` instead For graphical console one can
90add ``--vnc 127.0.0.1:1``
91
92Setup
93=====
94
95In order to run vmtest you'll need some dependencies. To get them, you
96can run::
97
98 make vmtest-deps
99
100Running
101=======
102
103Running tests is done most simply by::
104
105 make vmtest
106
107If you wish to all tests in test_network.py, do so with::
108
109 nosetests3 tests/vmtests/test_network.py
110
111Or run a single test with::
112
113 nosetests3 tests/vmtests/test_network.py:WilyTestBasic
114
115
116Environment Variables
117=====================
118
119Some environment variables affect the running of vmtest
120
121- ``apt_proxy``:
122
123 test will set apt: { proxy } in the guests to the value of ``apt_proxy``
124 environment variable. If that is not set it will look at the host's apt
125 config and read ``Acquire::HTTP::Proxy``
126
127- ``CURTIN_VMTEST_KEEP_DATA_PASS``: Defaults to none.
128- ``CURTIN_VMTEST_KEEP_DATA_FAIL``: Defaults to all.
129
130 These 2 variables determine what portions of the temporary
131 test data are kept.
132
133 The variables contain a comma ',' delimited list of directories
134 that should be kept in the case of pass or fail. Additionally,
135 the values 'all' and 'none' are accepted.
136
137 Each vmtest that runs has its own sub-directory under the top level
138 ``CURTIN_VMTEST_TOPDIR``. In that directory are directories:
139
140 - ``boot``: inputs to the system boot (after install)
141 - ``install``: install phase related files
142 - ``disks``: the disks used for installation and boot
143 - ``logs``: install and boot logs
144 - ``collect``: data collected by the boot phase
145
146- ``CURTIN_VMTEST_TOPDIR``: default $TMPDIR/vmtest-<timestamp>
147
148 Vmtest puts all test data under this value. By default, it creates
149 a directory in TMPDIR (/tmp) named with as ``vmtest-<timestamp>``
150
151 If you set this value, you must ensure that the directory is either
152 non-existent or clean.
153
154- ``CURTIN_VMTEST_LOG``: default $TMPDIR/vmtest-<timestamp>.log
155
156 Vmtest writes extended log information to this file.
157 The default puts the log along side the TOPDIR.
158
159- ``CURTIN_VMTEST_IMAGE_SYNC``: default false (boolean)
160
161 If set to true, each run will attempt a sync of images.
162 If you want to make sure images are always up to date, then set to true.
163
164- ``CURTIN_VMTEST_BRIDGE``: ``user``
165
166 The network devices will be attached to this bridge. The default is
167 ``user``, which means to use qemu user mode networking. Set it to
168 ``virbr0`` or ``lxdbr0`` to use those bridges and then be able to ssh
169 in directly.
170
171- ``CURTIN_VMTEST_BOOT_TIMEOUT``: default 300
172
173 timeout before giving up on the boot of the installed system.
174
175- ``CURTIN_VMTEST_INSTALL_TIMEOUT``: default 3000
176
177 timeout before giving up on installation.
178
179- ``CURTIN_VMTEST_PARALLEL``: default ''
180
181 only supported through ./tools/jenkins-runner .
182
183 - ``-1``: then run one per core.
184 - ``0`` or ``''``: run with no parallel
185 - ``>0``: run with N processes
186
187 This modifies the invocation of nosetets to add '--processes' and other
188 necessary nose arguments (--process-timeout)
189
190- ``IMAGE_DIR``: default /srv/images
191
192 Vmtest keeps a mirror of maas ephemeral images in this directory.
193
194- ``IMAGES_TO_KEEP``: default 1
195
196 Controls the number of images of each release retained in the IMAGE_DIR.
197
198Environment 'boolean' values
199============================
200
201For boolean environment variables the value is considered True
202if it is any value other than case insensitive 'false', '' or "0".
203
204Test Class Variables
205====================
206
207The base VMBaseClass defines several variables that help creating a new test
208easily. Among those the common ones are:
209
210Generic:
211
212- ``arch_skip``:
213
214 If a test is not supported on an architecture it can list the arch in this
215 variable to auto-skip the test if executed on that arch.
216
217- ``conf_file``:
218
219 The configuration that will be processed by this vmtest.
220
221- ``extra_kern_args``:
222
223 Extra arguments to the guest kernel on boot.
224
225Data Collection:
226
227- ``collect_scripts``:
228
229 The commands run when booting into the installed environment to collect the
230 data for the test to verify a proper execution.
231
232- ``boot_cloudconf``:
233
234 Extra cloud-init config content for the install phase. This allows to gather
235 content of the install phase if needed for test verification.
236
237Disk Setup:
238
239- ``disk_block_size``:
240
241 Default block size ``512`` bytes.
242
243- ``disk_driver``:
244
245 Default block device driver is ``virtio-blk``.
0246
=== added file 'doc/topics/networking.rst'
--- doc/topics/networking.rst 1970-01-01 00:00:00 +0000
+++ doc/topics/networking.rst 2016-08-29 23:08:04 +0000
@@ -0,0 +1,522 @@
1==========
2Networking
3==========
4
5Curtin supports a user-configurable networking configuration format.
6This format lets users (including via MAAS) to customize their machines'
7networking interfaces by assigning subnet configuration, virtual device
8creation (bonds, bridges, vlans) routes and DNS configuration.
9
10Curtin accepts a YAML input under the top-level ``network`` key
11to indicate that a user would like to specify a custom networking
12configuration. Required elements of a network configuration are
13``config`` and ``version``. Currently curtin only supports
14network config version=1. ::
15
16 network:
17 version: 1
18 config: []
19
20Configuration Types
21-------------------
22Within the network ``config`` portion, users include a list of configuration
23types. The current list of support ``type`` values are as follows:
24
25- Physical (``physical``)
26- Bond (``bond``)
27- Bridge (``bridge``)
28- VLAN (``vlan``)
29- Nameserver (``nameserver``)
30- Route (``route``)
31
32Physical, Bond, Bridge and VLAN types may also include IP configuration under
33the key ``subnets``.
34
35- Subnet/IP (``subnets``)
36
37
38Physical
39~~~~~~~~
40The ``physical`` type configuration represents a "physical" network device,
41typically Ethernet-based. At least one of of these entries is required for
42external network connectivity. Type ``physical`` requires only one key:
43``name``. A ``physical`` device may contain some or all of the following keys:
44
45**name**: *<desired device name>*
46
47A devices name must be less than 15 characters. Names exceeding the maximum
48will be truncated. This is a limitation of the Linux kernel network-device
49structure.
50
51**mac_address**: *<MAC Address>*
52
53The MAC Address is a device unique identifier that most Ethernet-based network
54devices possess. Specifying a MAC Address is optional.
55
56
57.. note::
58
59 Curtin will emit a udev rule to provide a persistent mapping between a
60 device's ``name`` and the ``mac_address``.
61
62**mtu**: *<MTU SizeBytes>*
63
64The MTU key represents a device's Maximum Transmission Unit, the largest size
65packet or frame, specified in octets (eight-bit bytes), that can be sent in a
66packet- or frame-based network. Specifying ``mtu`` is optional.
67
68.. note::
69
70 The possible supported values of a device's MTU is not available at
71 configuration time. It's possible to specify a value too large or to
72 small for a device and may be ignored by the device.
73
74
75**Physical Example**::
76
77 network:
78 version: 1
79 config:
80 # Simple network adapter
81 - type: physical
82 name: interface0
83 mac_address: 00:11:22:33:44:55
84 # Second nic with Jumbo frames
85 - type: physical
86 name: jumbo0
87 mac_address: aa:11:22:33:44:55
88 mtu: 9000
89 # 10G pair
90 - type: physical
91 name: gbe0
92 mac_address: cd:11:22:33:44:00
93 - type: physical
94 name: gbe1
95 mac_address: cd:11:22:33:44:02
96
97Bond
98~~~~
99A ``bond`` type will configure a Linux software Bond with one or more network
100devices. A ``bond`` type requires the following keys:
101
102**name**: *<desired device name>*
103
104A devices name must be less than 15 characters. Names exceeding the maximum
105will be truncated. This is a limitation of the Linux kernel network-device
106structure.
107
108**mac_address**: *<MAC Address>*
109
110When specifying MAC Address on a bond this value will be assigned to the bond
111device and may be different than the MAC address of any of the underlying
112bond interfaces. Specifying a MAC Address is optional. If ``mac_address`` is
113not present, then the bond will use one of the MAC Address values from one of
114the bond interfaces.
115
116
117**bond_interfaces**: *<List of network device names>*
118
119The ``bond_interfaces`` key accepts a list of network device ``name`` values
120from the configuration. This list may be empty.
121
122**params**: *<Dictionary of key: value bonding parameter pairs>*
123
124The ``params`` key in a bond holds a dictionary of bonding parameters.
125This dictionary may be empty. For more details on what the various bonding
126parameters mean please read the Linux Kernel Bonding.txt.
127
128Valid ``params`` keys are:
129
130 - ``active_slave``: Set bond attribute
131 - ``ad_actor_key``: Set bond attribute
132 - ``ad_actor_sys_prio``: Set bond attribute
133 - ``ad_actor_system``: Set bond attribute
134 - ``ad_aggregator``: Set bond attribute
135 - ``ad_num_ports``: Set bond attribute
136 - ``ad_partner_key``: Set bond attribute
137 - ``ad_partner_mac``: Set bond attribute
138 - ``ad_select``: Set bond attribute
139 - ``ad_user_port_key``: Set bond attribute
140 - ``all_slaves_active``: Set bond attribute
141 - ``arp_all_targets``: Set bond attribute
142 - ``arp_interval``: Set bond attribute
143 - ``arp_ip_target``: Set bond attribute
144 - ``arp_validate``: Set bond attribute
145 - ``downdelay``: Set bond attribute
146 - ``fail_over_mac``: Set bond attribute
147 - ``lacp_rate``: Set bond attribute
148 - ``lp_interval``: Set bond attribute
149 - ``miimon``: Set bond attribute
150 - ``mii_status``: Set bond attribute
151 - ``min_links``: Set bond attribute
152 - ``mode``: Set bond attribute
153 - ``num_grat_arp``: Set bond attribute
154 - ``num_unsol_na``: Set bond attribute
155 - ``packets_per_slave``: Set bond attribute
156 - ``primary``: Set bond attribute
157 - ``primary_reselect``: Set bond attribute
158 - ``queue_id``: Set bond attribute
159 - ``resend_igmp``: Set bond attribute
160 - ``slaves``: Set bond attribute
161 - ``tlb_dynamic_lb``: Set bond attribute
162 - ``updelay``: Set bond attribute
163 - ``use_carrier``: Set bond attribute
164 - ``xmit_hash_policy``: Set bond attribute
165
166**Bond Example**::
167
168 network:
169 version: 1
170 config:
171 # Simple network adapter
172 - type: physical
173 name: interface0
174 mac_address: 00:11:22:33:44:55
175 # 10G pair
176 - type: physical
177 name: gbe0
178 mac_address: cd:11:22:33:44:00
179 - type: physical
180 name: gbe1
181 mac_address: cd:11:22:33:44:02
182 - type: bond
183 name: bond0
184 bond_interfaces:
185 - gbe0
186 - gbe1
187 params:
188 bond-mode: active-backup
189
190Bridge
191~~~~~~
192Type ``bridge`` requires the following keys:
193
194- ``name``: Set the name of the bridge.
195- ``bridge_interfaces``: Specify the ports of a bridge via their ``name``. This list may be empty.
196- ``params``: A list of bridge params. For more details, please read the bridge-utils-interfaces manpage.
197
198Valid keys are:
199
200 - ``bridge_ageing``: Set the bridge's ageing value.
201 - ``bridge_bridgeprio``: Set the bridge device network priority.
202 - ``bridge_fd``: Set the bridge's forward delay.
203 - ``bridge_hello``: Set the bridge's hello value.
204 - ``bridge_hw``: Set the bridge's MAC address.
205 - ``bridge_maxage``: Set the bridge's maxage value.
206 - ``bridge_maxwait``: Set how long network scripts should wait for the bridge to be up.
207 - ``bridge_pathcost``: Set the cost of a specific port on the bridge.
208 - ``bridge_portprio``: Set the priority of a specific port on the bridge.
209 - ``bridge_ports``: List of devices that are part of the bridge.
210 - ``bridge_stp``: Set spanning tree protocol on or off.
211 - ``bridge_waitport``: Set amount of time in seconds to wait on specific ports to become available.
212
213
214**Bridge Example**::
215
216 network:
217 version: 1
218 config:
219 # Simple network adapter
220 - type: physical
221 name: interface0
222 mac_address: 00:11:22:33:44:55
223 # Second nic with Jumbo frames
224 - type: physical
225 name: jumbo0
226 mac_address: aa:11:22:33:44:55
227 mtu: 9000
228 - type: bridge
229 name: br0
230 bridge_interfaces:
231 - jumbo0
232 params:
233 bridge_ageing: 250
234 bridge_bridgeprio: 22
235 bridge_fd: 1
236 bridge_hello: 1
237 bridge_maxage: 10
238 bridge_maxwait: 0
239 bridge_pathcost:
240 - jumbo0 75
241 bridge_pathprio:
242 - jumbo0 28
243 bridge_stp: 'off'
244 bridge_maxwait:
245 - jumbo0 0
246
247
248VLAN
249~~~~
250Type ``vlan`` requires the following keys:
251
252- ``name``: Set the name of the VLAN
253- ``vlan_link``: Specify the underlying link via its ``name``.
254- ``vlan_id``: Specify the VLAN numeric id.
255
256**VLAN Example**::
257
258 network:
259 version: 1
260 config:
261 # Physical interfaces.
262 - type: physical
263 name: eth0
264 mac_address: "c0:d6:9f:2c:e8:80"
265 # VLAN interface.
266 - type: vlan
267 name: eth0.101
268 vlan_link: eth0
269 vlan_id: 101
270 mtu: 1500
271
272Nameserver
273~~~~~~~~~~
274
275Users can specify a ``nameserver`` type. Nameserver dictionaries include
276the following keys:
277
278- ``address``: List of IPv4 or IPv6 address of nameservers.
279- ``search``: List of of hostnames to include in the resolv.conf search path.
280
281**Nameserver Example**::
282
283 network:
284 version: 1
285 config:
286 - type: physical
287 name: interface0
288 mac_address: 00:11:22:33:44:55
289 subnets:
290 - type: static
291 address: 192.168.23.14/27
292 gateway: 192.168.23.1
293 - type: nameserver:
294 address:
295 - 192.168.23.2
296 - 8.8.8.8
297 search:
298 - exemplary
299
300
301
302Route
303~~~~~
304
305Users can include static routing information as well. A ``route`` dictionary
306has the following keys:
307
308- ``destination``: IPv4 network address with CIDR netmask notation.
309- ``gateway``: IPv4 gateway address with CIDR netmask notation.
310- ``metric``: Integer which sets the network metric value for this route.
311
312**Route Example**::
313
314 network:
315 version: 1
316 config:
317 - type: physical
318 name: interface0
319 mac_address: 00:11:22:33:44:55
320 subnets:
321 - type: static
322 address: 192.168.23.14/24
323 gateway: 192.168.23.1
324 - type: route
325 destination: 192.168.24.0/24
326 gateway: 192.168.24.1
327 metric: 3
328
329Subnet/IP
330~~~~~~~~~
331
332For any network device (one of the Config Types) users can define a list of
333``subnets`` which contain ip configuration dictionaries. Multiple subnet
334entries will create interface alias allowing a single interface to use different
335ip configurations.
336
337Valid keys for for ``subnets`` include the following:
338
339- ``type``: Specify the subnet type.
340- ``control``: Specify manual, auto or hotplug. Indicates how the interface will be handled during boot.
341- ``address``: IPv4 or IPv6 address. It may include CIDR netmask notation.
342- ``netmask``: IPv4 subnet mask in dotted format or CIDR notation.
343- ``gateway``: IPv4 address of the default gateway for this subnet.
344- ``dns_nameserver``: Specify a list of IPv4 dns server IPs to end up in resolv.conf.
345- ``dns_search``: Specify a list of search paths to be included in resolv.conf.
346
347
348Subnet types are one of the following:
349
350- ``dhcp4``: Configure this interface with IPv4 dhcp.
351- ``dhcp``: Alias for ``dhcp4``
352- ``dhcp6``: Configure this interface with IPv6 dhcp.
353- ``static``: Configure this interface with a static IPv4.
354- ``static6``: Configure this interface with a static IPv6 .
355
356When making use of ``dhcp`` types, no additional configuration is needed in the
357subnet dictionary.
358
359
360**Subnet DHCP Example**::
361
362 network:
363 version: 1
364 config:
365 - type: physical
366 name: interface0
367 mac_address: 00:11:22:33:44:55
368 subnets:
369 - type: dhcp
370
371
372**Subnet Static Example**::
373
374 network:
375 version: 1
376 config:
377 - type: physical
378 name: interface0
379 mac_address: 00:11:22:33:44:55
380 subnets:
381 - type: static
382 address: 192.168.23.14/27
383 gateway: 192.168.23.1
384 dns_nameservers:
385 - 192.168.23.2
386 - 8.8.8.8
387 dns_search:
388 - exemplary.maas
389
390The following will result in an ``interface0`` using DHCP and ``interface0:1``
391using the static subnet configuration.
392
393**Multiple subnet Example**::
394
395 network:
396 version: 1
397 config:
398 - type: physical
399 name: interface0
400 mac_address: 00:11:22:33:44:55
401 subnets:
402 - type: dhcp
403 - type: static
404 address: 192.168.23.14/27
405 gateway: 192.168.23.1
406 dns_nameservers:
407 - 192.168.23.2
408 - 8.8.8.8
409 dns_search:
410 - exemplary
411
412
413Multi-layered configurations
414----------------------------
415
416Complex networking sometimes uses layers of configuration. The syntax allows
417users to build those layers one at a time. All of the virtual network devices
418supported allow specifying an underlying device by their ``name`` value.
419
420**Bonded VLAN Example**::
421
422 network:
423 version: 1
424 config:
425 # 10G pair
426 - type: physical
427 name: gbe0
428 mac_address: cd:11:22:33:44:00
429 - type: physical
430 name: gbe1
431 mac_address: cd:11:22:33:44:02
432 # Bond.
433 - type: bond
434 name: bond0
435 bond_interfaces:
436 - gbe0
437 - gbe1
438 params:
439 bond-mode: 802.3ad
440 bond-lacp-rate: fast
441 # A Bond VLAN.
442 - type: vlan
443 name: bond0.200
444 vlan_link: bond0
445 vlan_id: 200
446 subnets:
447 - type: dhcp4
448
449More Examples
450-------------
451Some more examples to explore the various options available.
452
453**Multiple VLAN example**::
454
455 network:
456 version: 1
457 config:
458 - id: eth0
459 mac_address: d4:be:d9:a8:49:13
460 mtu: 1500
461 name: eth0
462 subnets:
463 - address: 10.245.168.16/21
464 dns_nameservers:
465 - 10.245.168.2
466 gateway: 10.245.168.1
467 type: static
468 type: physical
469 - id: eth1
470 mac_address: d4:be:d9:a8:49:15
471 mtu: 1500
472 name: eth1
473 subnets:
474 - address: 10.245.188.2/24
475 dns_nameservers: []
476 type: static
477 type: physical
478 - id: eth1.2667
479 mtu: 1500
480 name: eth1.2667
481 subnets:
482 - address: 10.245.184.2/24
483 dns_nameservers: []
484 type: static
485 type: vlan
486 vlan_id: 2667
487 vlan_link: eth1
488 - id: eth1.2668
489 mtu: 1500
490 name: eth1.2668
491 subnets:
492 - address: 10.245.185.1/24
493 dns_nameservers: []
494 type: static
495 type: vlan
496 vlan_id: 2668
497 vlan_link: eth1
498 - id: eth1.2669
499 mtu: 1500
500 name: eth1.2669
501 subnets:
502 - address: 10.245.186.1/24
503 dns_nameservers: []
504 type: static
505 type: vlan
506 vlan_id: 2669
507 vlan_link: eth1
508 - id: eth1.2670
509 mtu: 1500
510 name: eth1.2670
511 subnets:
512 - address: 10.245.187.2/24
513 dns_nameservers: []
514 type: static
515 type: vlan
516 vlan_id: 2670
517 vlan_link: eth1
518 - address: 10.245.168.2
519 search:
520 - dellstack
521 type: nameserver
522
0523
=== modified file 'doc/topics/overview.rst'
--- doc/topics/overview.rst 2016-06-02 08:26:30 +0000
+++ doc/topics/overview.rst 2016-08-29 23:08:04 +0000
@@ -20,7 +20,7 @@
20~~~~~~~~~~~~~~~~~~~~~~~~20~~~~~~~~~~~~~~~~~~~~~~~~
21At the moment, curtin doesn't address how the system that it is running on is booted. It could be booted from a live-cd or from a pxe boot environment. It could even be booted off a disk in the system (although installation to that disk would probably break things).21At the moment, curtin doesn't address how the system that it is running on is booted. It could be booted from a live-cd or from a pxe boot environment. It could even be booted off a disk in the system (although installation to that disk would probably break things).
2222
23Curtin's assumption is that a fairly rich linux (Ubuntu) environment is booted.23Curtin's assumption is that a fairly rich Linux (Ubuntu) environment is booted.
2424
25Early Commands25Early Commands
26~~~~~~~~~~~~~~26~~~~~~~~~~~~~~
@@ -38,13 +38,13 @@
3838
39Partitioning39Partitioning
40~~~~~~~~~~~~40~~~~~~~~~~~~
41Partitioning covers setting up filesystems on the system. A series of commands are run serially in order. At the end, a fstab formated file must be populated in ``OUTPUT_FSTAB`` that contains mount information, and the filesystems are expected to be mounted at the ``TARGET_MOUNT_POINT``.41Partitioning covers setting up filesystems on the system. A series of commands are run serially in order. At the end, a fstab formatted file must be populated in ``OUTPUT_FSTAB`` that contains mount information, and the filesystems are expected to be mounted at the ``TARGET_MOUNT_POINT``.
4242
43Any commands can be used to create this filesystem, but curtin contains some tools to facilitate with this process.43Any commands can be used to create this filesystem, but curtin contains some tools to facilitate with this process.
4444
45**Config Example**::45**Config Example**::
4646
47 paritioning_commands:47 partitioning_commands:
48 10_wipe_filesystems: curtin wipe --quick --all-unused-disks48 10_wipe_filesystems: curtin wipe --quick --all-unused-disks
49 50_setup_raid: curtin disk-setup --all-disks raid0 /49 50_setup_raid: curtin disk-setup --all-disks raid0 /
5050
@@ -53,7 +53,7 @@
53Partitioning commands have the following environment variables available to them:53Partitioning commands have the following environment variables available to them:
5454
55- ``WORKING_DIR``: This is simply for some sort of inter-command state. It will be the same directory for each command run and will only be deleted at the end of all partitioning_commands.55- ``WORKING_DIR``: This is simply for some sort of inter-command state. It will be the same directory for each command run and will only be deleted at the end of all partitioning_commands.
56- ``OUTPUT_FSTAB``: This is the target path for a fstab file. After all partitioning commands have been run, a file should exist, formated per fstab(5) that describes how the filesystems should be mounted.56- ``OUTPUT_FSTAB``: This is the target path for a fstab file. After all partitioning commands have been run, a file should exist, formatted per fstab(5) that describes how the filesystems should be mounted.
57- ``TARGET_MOUNT_POINT``:57- ``TARGET_MOUNT_POINT``:
5858
5959
@@ -61,7 +61,7 @@
61~~~~~~~~~~~~~~~~~~~~~~~~~~~61~~~~~~~~~~~~~~~~~~~~~~~~~~~
62Networking is done in a similar fashion to partitioning. A series of commands, specified in the config are run. At the end of these commands, a interfaces(5) style file is expected to be written to ``OUTPUT_INTERFACES``.62Networking is done in a similar fashion to partitioning. A series of commands, specified in the config are run. At the end of these commands, a interfaces(5) style file is expected to be written to ``OUTPUT_INTERFACES``.
6363
64Note, that as with fstab, this file is not copied verbatum to the target filesystem, but rather made availble to the OS customization stage. That stage may just copy the file verbatum, but may also parse it, and use that as input.64Note, that as with fstab, this file is not copied verbatim to the target filesystem, but rather made available to the OS customization stage. That stage may just copy the file verbatim, but may also parse it, and use that as input.
6565
66**Config Example**::66**Config Example**::
6767
@@ -73,7 +73,7 @@
73Networking commands have the following environment variables available to them:73Networking commands have the following environment variables available to them:
7474
75- ``WORKING_DIR``: This is simply for some sort of inter-command state. It will be the same directory for each command run and will only be deleted at the end of all network_commands.75- ``WORKING_DIR``: This is simply for some sort of inter-command state. It will be the same directory for each command run and will only be deleted at the end of all network_commands.
76- ``OUTPUT_INTERFACES``: This is the target path for an interfaces style file. After all commands have been run, a file should exist, formated per interfaces(5) that describes the systems network setup.76- ``OUTPUT_INTERFACES``: This is the target path for an interfaces style file. After all commands have been run, a file should exist, formatted per interfaces(5) that describes the systems network setup.
7777
78Extraction of sources78Extraction of sources
79~~~~~~~~~~~~~~~~~~~~~79~~~~~~~~~~~~~~~~~~~~~
@@ -84,7 +84,7 @@
84 sources:84 sources:
85 05_primary: http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-amd64-root.tar.gz85 05_primary: http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-amd64-root.tar.gz
8686
87Given the source above, curtin will essentiall do a::87Given the source above, curtin will essentially do a::
8888
89 wget $URL | tar -Sxvzf 89 wget $URL | tar -Sxvzf
9090
9191
=== modified file 'doc/topics/reporting.rst'
--- doc/topics/reporting.rst 2016-06-02 08:26:30 +0000
+++ doc/topics/reporting.rst 2016-08-29 23:08:04 +0000
@@ -7,7 +7,7 @@
77
8Events8Events
9------9------
10Reporting consists of notifcation of a series of 'events. Each event has:10Reporting consists of notification of a series of 'events. Each event has:
11 - **event_type**: 'start' or 'finish'11 - **event_type**: 'start' or 'finish'
12 - **description**: human readable text12 - **description**: human readable text
13 - **name**: and id for this event13 - **name**: and id for this event
@@ -48,7 +48,7 @@
48Each entry must have a 'type'. The currently supported values are:48Each entry must have a 'type'. The currently supported values are:
49 - **log**: logs via python logger49 - **log**: logs via python logger
50 - **print**: prints messages to stdout (for debugging)50 - **print**: prints messages to stdout (for debugging)
51 - **webhook**: posts json formated data to a remote url. Supports Oauth.51 - **webhook**: posts json formatted data to a remote url. Supports Oauth.
5252
5353
54Additionally, the webhook reporter will post files on finish of curtin. The user can declare which files should be posted in the ``install`` item via ``post_files`` as shown above. If post_files is not present, it will default to the value of log_file.54Additionally, the webhook reporter will post files on finish of curtin. The user can declare which files should be posted in the ``install`` item via ``post_files`` as shown above. If post_files is not present, it will default to the value of log_file.
@@ -154,7 +154,7 @@
154Legacy Reporter154Legacy Reporter
155---------------155---------------
156The legacy 'reporter' config entry is still supported. This was utilized by156The legacy 'reporter' config entry is still supported. This was utilized by
157MAAS for start/end and posting of the install log at the end of isntallation.157MAAS for start/end and posting of the install log at the end of installation.
158158
159Its configuration looks like this:159Its configuration looks like this:
160160
161161
=== added file 'doc/topics/storage.rst'
--- doc/topics/storage.rst 1970-01-01 00:00:00 +0000
+++ doc/topics/storage.rst 2016-08-29 23:08:04 +0000
@@ -0,0 +1,894 @@
1=======
2Storage
3=======
4
5Curtin supports a user-configurable storage layout. This format lets users
6(including via MAAS) to customize their machines' storage configuration by
7creating partitions, RAIDs, LVMs, formatting with file systems and setting
8mount points.
9
10Custom storage configuration is handled by the ``block-meta custom`` command
11in curtin. Partitioning layout is read as a list of in-order modifications to
12make to achieve the desired configuration. The top level configuration key
13containing this configuration is ``storage``. This key should contain a
14dictionary with at least a version number and the configuration list. The
15current config specification is ``version: 1``.
16
17**Config Example**::
18
19 storage:
20 version: 1
21 config:
22 - id: sda
23 type: disk
24 ptable: gpt
25 serial: QM00002
26 model: QEMU_HARDDISK
27
28Configuration Types
29-------------------
30Each entry in the config list is a dictionary with several keys which vary
31between commands. The two dictionary keys that every entry in the list needs
32to have are ``id: <id>`` and ``type: <type>``.
33
34An entry's ``id`` allows other entries in the config to refer to a specific
35entry. It can be any string other than one with a special meaning in yaml, such
36as ``true`` or ``none``.
37
38An entry's ``type`` tells curtin how to handle a particular entry. Available
39commands include:
40
41- Disk Command (``disk``)
42- Partition Command (``partition``)
43- Format Command (``format``)
44- Mount Command (``mount``)
45- LVM_VolGroup Command (``lvm_volgroup``)
46- LVM_Partition Command (``lvm_partition``)
47- DM_Crypt Command (``dm_crypt``)
48- RAID Command (``raid``)
49- Bcache Command (``bcache``)
50
51Disk Command
52~~~~~~~~~~~~
53The disk command sets up disks for use by curtin. It can wipe the disks, create
54partition tables, or just verify that the disks exist with an existing partition
55table. A disk command may contain all or some of the following keys:
56
57**ptable**: *msdos, gpt*
58
59If the ``ptable`` key is present and a valid type of partition table, curtin
60will create an empty partition table of that type on the disk. At the moment,
61msdos and gpt partition tables are supported.
62
63**serial**: *<serial number>*
64
65In order to uniquely identify a disk on the system its serial number should be
66specified. This ensures that even if additional storage devices
67are added to the system during installation, or udev rules cause the path to a
68disk to change curtin will still be able to correctly identify the disk it
69should be operating on using ``/dev/disk/by-id``.
70
71This is the preferred way to identify a disk and should be used in all
72production environments as it is less likely to point to an incorrect device.
73
74**path**: *<path to device with leading /dev*
75
76The ``path`` key can be used to identify the disk. If both ``serial`` and
77``path`` are specified, curtin will use the serial number and ignore the path
78that was specified.
79
80**model**: *<disk model>*
81
82This can specify the manufacturer or model of the disk. It is not currently
83used by curtin, but can be useful for a human reading a config file. Future
84versions of curtin may make use of this information.
85
86**wipe**: *superblock, superblock-recursive, zero, random*
87
88If wipe is specified, **the disk contents will be destroyed**. In the case that
89a disk is a part of virtual block device, like bcache, RAID array, or LVM, then
90curtin will attempt to tear down the virtual device to allow access to the disk
91for resetting the disk.
92
93The most common option for clearing a disk is ``wipe: superblock``. In some
94cases use of ``wipe: superblock-recursive`` is useful to ensure that embedded
95superblocks on a disk aren't rediscovered during probing. For example, LVM,
96bcache and RAID on a partition would have metadata outside of the range of a
97superblock wipe of the start and end sections of the disk.
98
99The ``wipe: zero`` option will write zeros to each sector of the disk.
100Depending on the size and speed of the disk; it may take a long time to
101complete.
102
103The ``wipe: random`` option will write pseudo-random data from /dev/urandom
104Depending on the size and speed of the disk; it may take a long time to
105complete.
106
107**preserve**: *true, false*
108
109When the preserve key is present and set to ``true`` curtin will attempt
110to use the disk without damaging data present on it. If ``preserve`` is set and
111``ptable`` is also set, then curtin will validate that the partition table
112specified by ``ptable`` exists on the disk and will raise an error if it does
113not. If ``preserve`` is set and ``ptable`` is not, then curtin will be able to
114use the disk in later commands, but will not check if the disk has a valid
115partition table, and will only verify that the disk exists.
116
117It can be dangerous to try to move or re-size filesystems and partitions
118containing data that needs to be preserved. Therefor curtin does not support
119preserving a disk without also preserving the partitions on it. If a disk is
120set to be preserved and curtin is told to move a partition on that disk,
121installation will stop. It is still possible to reformat partitions that do
122not need to be preserved.
123
124**name**: *<name>*
125
126If the ``name`` key is present, curtin will create a udev rule that makes a
127symbolic link to the disk with the given name value. This makes it easy to find
128disks on an installed system. The links are created in
129``/dev/disk/by-dname/<name>``.
130A link to each partition on the disk will also be created at
131``/dev/disk/by-dname/<name>-part<number>``, so if ``name: maindisk`` is set,
132the disk will be at ``/dev/disk/by-dname/maindisk`` and the first partition on
133it will be at ``/dev/disk/by-dname/maindisk-part1``.
134
135**grub_device**: *true, false*
136
137If the ``grub_device`` key is present and set to true, then when post
138installation hooks are run grub will be installed onto this disk. In most
139situations it is not necessary to specify this value as curtin will detect
140and determine which device to use as a boot disk. In cases where the boot
141device is on a special volume, such as a RAID array or a LVM Logical Volume,
142it may be necessary to specify the device that will hold the grub bootloader.
143
144**Config Example**::
145
146 - id: disk0
147 type: disk
148 ptable: gpt
149 serial: QM00002
150 model: QEMU_HARDDISK
151 name: maindisk
152 wipe: superblock
153
154Partition Command
155~~~~~~~~~~~~~~~~~
156The partition command creates a single partition on a disk. Curtin only needs
157to be told which disk to use and the size of the partition. Additional options
158are available.
159
160**number**: *<number>*
161
162The partition number can be specified using ``number``. However, numbers must
163be in order and some situations, such as extended/logical partitions on msdos
164partition tables will require special numbering, so it maybe better to omit
165the partition number. If the ``number`` key is not present, curtin will attempt
166determine the right number to use.
167
168**size**: *<size>*
169
170The partition size can be specified with the ``size`` key. Sizes must be
171given with an appropriate SI unit, such as *B, kB, MB, GB, TB*, or using just
172the appropriate SI prefix, i.e. *B, k, M, G, T...*
173
174.. note::
175
176 Curtin does not adjust size values. If you specific a size that exceeds the
177 capacity of a device then installation will fail.
178
179**device**: *<device id>*
180
181The ``device`` key refers to the ``id`` of a disk in the storage configuration.
182The disk entry must already be defined in the list of commands to ensure that
183it has already been processed.
184
185**wipe**: *superblock, pvremove, zero, random*
186
187After the partition is added to the disk's partition table, curtin can run a
188wipe command on the partition. The wipe command values are the sames as for
189disks.
190
191**flag**: *logical, extended, boot, bios_grub, swap, lvm, raid, home, prep*
192
193If the ``flag`` key is present, curtin will set the specified flag on the
194partition. Note that some flags only apply to msdos partition tables, and some
195only apply to gpt partition tables.
196
197The *logical/extended* partition flags can be used to create logical partitions
198on a msdos table. An extended partition should be created containing all of the
199empty space on the drive, and logical partitions can be created within it. A
200extended partition must already be present to create logical partitions. If the
201``number`` flag is set for an extended partition it must be set to 4, and
202each logical partition should be numbered starting from 5.
203
204On msdos partition tables, the *boot* flag sets the boot parameter to that
205partition. On gpt partition tables, the boot flag sets the esp flag on the
206partition.
207
208If the host system for curtin has been booted using UEFI then curtin will
209install grub to the esp partition. If the system installation media
210has been booted using an MBR, grub will be installed onto the disk's MBR.
211However, on a disk with a gpt partition table, there is not enough space after
212the MBR for grub to store its second stage core.img, so a small un-formatted
213partition with the *bios_grub* flag is needed. This partition should be placed
214at the beginning of the disk and should be 1MB in size. It should not contain a
215filesystem or be mounted anywhere on the system.
216
217**preserve**: *true, false*
218
219If the preserve flag is set to true, curtin will verify that the partition
220exists and will not modify the partition.
221
222**Config Example**::
223
224 - id: disk0-part1
225 type: partition
226 number: 1
227 size: 8GB
228 device: disk0
229 flag: boot
230
231Format Command
232~~~~~~~~~~~~~~
233The format command makes filesystems on a volume. The filesystem type and
234target volume can be specified, as well as a few other options.
235
236**fstype**: ext4, ext3, fat32, fat16, swap, xfs
237
238The ``fstype`` key specifies what type of filesystem format curtin should use
239for this volume. Curtin knows about common Linux filesystems such as ext4/3 and
240fat filesystems and makes use of additional parameters and flags to optimize the
241filesystem. If the ``fstype`` value is not known to curtin, that is not fatal.
242Curtin will check if ``mkfs.<fstype>`` exists and if so, will use that tool to
243format the target volume.
244
245For fat filesystems, the size of the fat table can be specified by entering
246*fat64*, *fat32*, *fat16*, or *fat12* instead of just entering *fat*.
247If *fat* is used, then ``mkfs.fat`` will automatically determine the best
248size fat table to use, probably *fat32*.
249
250If ``fstype: swap`` is set, curtin will create a swap partition on the target
251volume.
252
253**volume**: *<volume id>*
254
255The ``volume`` key refers to the ``id`` of the target volume in the storage
256config. The target volume must already exist and be accessible. Any type
257of target volume can be used as long as it has a block device that curtin
258can locate.
259
260**label**: *<volume name>*
261
262The ``label`` key tells curtin to create a filesystem LABEL when formatting a
263volume. Note that not all filesystem types support names and that there are
264length limits for names. For fat filesystems, names are limited to 11
265characters. For ext4/3 filesystems, names are limited to 16 characters.
266
267If curtin does not know about the filesystem type it is using, then the
268``label`` key will be ignored, because curtin will not know the correct flags
269to set the label value in the filesystem metadata.
270
271**uuid**: *<uuid>*
272
273If the ``uuid`` key is set and ``fstype`` is set to *ext4* or *ext3*, then
274curtin will set the uuid of the new filesystem to the specified value.
275
276**preserve**: *true, false*
277
278If the ``preserve`` key is set to true, curtin will not format the partition.
279
280**Config Example**::
281
282 - id: disk0-part1-fs1
283 type: format
284 fstype: ext4
285 label: cloud-image
286 volume: disk0-part1
287
288Mount Command
289~~~~~~~~~~~~~
290The mount command mounts the target filesystem and creates an entry for it in
291the newly installed system's ``/etc/fstab``. The path to the target mountpoint
292must be specified as well as the target filesystem.
293
294**path**: *<path>*
295
296The ``path`` key tells curtin where the filesystem should be mounted on the
297target system. An entry in the target system's ``/etc/fstab`` will be created
298for the target device which will mount it in the correct place once the
299installed system boots.
300
301If the device specified is formatted as swap space, then an entry will be added
302to the target system's ``/etc/fstab`` to make use of this swap space.
303
304When entries are created in ``/etc/fstab``, curtin will use the most reliable
305method available to identify each device. For regular partitions, curtin will
306use the UUID of the filesystem present on the partition. For special devices,
307such as RAID arrays, or LVM logical volumes, curtin will use their normal path
308in ``/dev``.
309
310**device**: *<device id>*
311
312The ``device`` key refers to the ``id`` of the target device in the storage
313config. The target device must already contain a valid filesystem and be
314accessible.
315
316**Config Example**::
317
318 - id: disk0-part1-fs1-mount0
319 type: mount
320 path: /home
321 device: disk0-part1-fs1
322
323Lvm Volgroup Command
324~~~~~~~~~~~~~~~~~~~~
325The lvm_volgroup command creates LVM Physical Volumes (PV) and connects them in
326a LVM Volume Group (vg). The command requires a name for the volgroup and a
327list of the devices that should be used as physical volumes.
328
329**name**: *<name>*
330
331The ``name`` key specifies the name of the volume group. It anything can be
332used except words with special meanings in YAML, such as *true*, or *none*.
333
334**devices**: *[]*
335
336The ``devices`` key gives a list of devices to use as physical volumes. Each
337device is specified using the ``id`` of existing devices in the storage config.
338Almost anything can be used as a device such as partitions, whole disks, RAID.
339
340**Config Example**::
341
342 - id: volgroup1
343 type: lvm_volgroup
344 name: vg1
345 devices:
346 - disk0-part2
347 - disk1
348
349Lvm Partition Command
350~~~~~~~~~~~~~~~~~~~~~
351The lvm_partition command creates a lvm logical volume on the specified
352volgroup with the specified size. It also assigns it the specified name.
353
354**name**: *<name>*
355
356The ``name`` key specifies the name of the Logical Volume (LV) to be created.
357
358Curtin creates udev rules for Logical Volumes to give them consistently named
359symbolic links in the target system under ``/dev/disk/by-dname/``. The naming
360scheme for Logical Volumes follows the pattern
361``<volgroup name>-<logical volume name>``. For example a ``lvm_partition``
362with ``name`` *lv1* on a ``lvm_volgroup`` named *vg1* would have the path
363``/dev/disk/by-dname/vg1-lv1``.
364
365**volgroup**: *<volgroup id>*
366
367The ``volgroup`` key specifies the ``id`` of the Volume Group in which to
368create the logical volume. The volgroup must already have been created and must
369have enough free space on it to create the logical volume. The volgroup should
370be specified using the ``id`` key of the volgroup in the storage config, not the
371name of the volgroup.
372
373**size**: *<size>*
374
375The ``size`` key tells curtin what size to make the logical volume. The size
376can be entered in any format that can be processed by the lvm2 tools, so a
377number followed by a SI unit should work, i.e. *B, kB, MB, GB, TB*.
378
379If the ``size`` key is omitted then all remaining space on the volgroup will be
380used for the logical volume.
381
382.. note::
383
384 Curtin does not adjust size values. If you specific a size that exceeds the
385 capacity of a device then installation will fail.
386
387
388**Config Example**::
389
390 - id: lvm_partition_1
391 type: lvm_partition
392 name: lv1
393 volgroup: volgroup1
394 size: 10G
395
396
397**Combined Example**::
398
399 - id: volgroup1
400 type: lvm_volgroup
401 name: vg1
402 devices:
403 - disk0-part2
404 - disk1
405 - id: lvm_partition_1
406 type: lvm_partition
407 name: lv1
408 volgroup: volgroup1
409 size: 10G
410
411
412
413Dm-Crypt Command
414~~~~~~~~~~~~~~~~
415The dm_crypt command creates encrypted volumes using ``cryptsetup``. It
416requires a name for the encrypted volume, the volume to be encrypted and a key.
417Note that this should not be used for systems where security is a requirement.
418The key is stored in plain-text in the storage configuration and it could be
419possible for the storage configuration to be intercepted between the utility
420that generates it and curtin.
421
422**volume**: *<volume id>*
423
424The ``volume`` key gives the volume that is to be encrypted.
425
426**dm_name**: *<name>*
427
428The ``name`` key specifies the name of the encrypted volume.
429
430**key**: *<key>*
431
432The ``key`` key specifies the password of the encryption key. The target
433system will prompt for this password in order to mount the disk.
434
435.. note::
436
437 Encrypted disks and partitions are tracked in ``/etc/crypttab`` and will be
438 mounted at boot time.
439
440**Config Example**::
441
442 - id: lvm_partition_1
443 type: dm_crypt
444 dm_name: crypto
445 volume: sdb1
446 key: testkey
447
448RAID Command
449~~~~~~~~~~~~
450The RAID command configures Linux Software RAID using mdadm. It needs to be given
451a name for the md device, a list of volumes for to compose the md device, an
452optional list of devices to be used as spare volumes, and RAID level.
453
454**name**: *<name>*
455
456The ``name`` key specifies the name of the md device.
457
458.. note::
459
460 Curtin creates a udev rule to create a link to the md device in
461 ``/dev/disk/by-dname/<name>`` using the specified name.
462
463**raidlevel**: *0, 1, 5, 6, 10*
464
465The ``raidlevel`` key specifies the raid level of the array.
466
467**devices**: *[]*
468
469The ``devices`` key specifies a list of the devices that will be used for the
470raid array. Each device must be referenced by ``id`` and the device must be
471previously defined in the storage configuration. Must not be empty.
472
473Devices can either be full disks or partition.
474
475
476**spare_devices**: *[]*
477
478The ``spare_devices`` key specifies a list of the devices that will be used for
479spares in the raid array. Each device must be referenced by ``id`` and the
480device must be previously defined in the storage configuration. May be empty.
481
482
483**Config Example**::
484
485 - id: raid_array
486 type: raid
487 name: md0
488 raidlevel: 1
489 devices:
490 - sdb
491 - sdc
492 spare_devices:
493 - sdd
494
495Bcache Command
496~~~~~~~~~~~~~~
497The bcache command will configure a block-cache device using the Linux kernel
498bcache module. Bcache allows users to use a typically small, but fast SSD or
499NVME device as a cache for larger, slower spinning disks.
500
501The bcache command needs to be told which device to use hold the data and which
502device to use as its cache device. A cache device may be reused with multiple
503backing devices.
504
505
506**backing_device**: *<device id>*
507
508The ``backing_device`` key specifies the item in storage configuration to use
509as the backing device. This can be any device that would normally be used with
510a filesystem on it, such as a partition or a raid array.
511
512**cache_device**: *<device id>*
513
514The ``cache_device`` key specifies the item in the storage configuration to use
515as the cache device. This can be a partition or a whole disk. It should be on a
516ssd in most cases, as bcache is designed around the performance characteristics
517of a ssd.
518
519**cache_mode**: *writethrough, writeback, writearound, none*
520
521The ``cache_mode`` key specifies the mode in which bcache operates. The
522default mode is writethrough which ensures data hits the backing device
523before completing the operation. writeback mode will have higher performance
524but exposes dataloss if the cache device fails. writearound will avoid using
525the cache for large sequential writes; useful for not evicting smaller
526reads/writes from the cache. None effectively disables bcache.
527
528**name**: *<name>*
529
530If the ``name`` key is present, curtin will create a link to the device at
531``/dev/disk/by-dname/<name>``.
532
533**Config Example**::
534
535 - id: bcache0
536 type: bcache
537 name: cached_raid
538 backing_device: raid_array
539 cache_device: sdb
540
541
542Additional Examples
543-------------------
544
545Learn by examples.
546
547- Basic
548- LVM
549- Bcache
550- RAID Boot
551- RAID5 + Bcache
552
553Basic Layout
554~~~~~~~~~~~~
555
556::
557
558 storage:
559 version: 1
560 config:
561 - id: disk0
562 type: disk
563 ptable: msdos
564 model: QEMU HARDDISK
565 path: /dev/vdb
566 name: main_disk
567 wipe: superblock
568 grub_device: true
569 - id: disk0-part1
570 type: partition
571 number: 1
572 size: 3GB
573 device: disk0
574 flag: boot
575 - id: disk0-part2
576 type: partition
577 number: 2
578 size: 1GB
579 device: disk0
580 - id: disk0-part1-format-root
581 type: format
582 fstype: ext4
583 volume: disk0-part1
584 - id: disk0-part2-format-home
585 type: format
586 fstype: ext4
587 volume: disk0-part2
588 - id: disk0-part1-mount-root
589 type: mount
590 path: /
591 device: disk0-part1-format-root
592 - id: disk0-part2-mount-home
593 type: mount
594 path: /home
595 device: disk0-part2-format-home
596
597LVM
598~~~
599
600::
601
602 storage:
603 version: 1
604 config:
605 - id: sda
606 type: disk
607 ptable: msdos
608 model: QEMU HARDDISK
609 path: /dev/vdb
610 name: main_disk
611 - id: sda1
612 type: partition
613 size: 3GB
614 device: sda
615 flag: boot
616 - id: sda_extended
617 type: partition
618 size: 5G
619 flag: extended
620 device: sda
621 - id: sda2
622 type: partition
623 size: 2G
624 flag: logical
625 device: sda
626 - id: sda3
627 type: partition
628 size: 3G
629 flag: logical
630 device: sda
631 - id: volgroup1
632 name: vg1
633 type: lvm_volgroup
634 devices:
635 - sda2
636 - sda3
637 - id: lvmpart1
638 name: lv1
639 size: 1G
640 type: lvm_partition
641 volgroup: volgroup1
642 - id: lvmpart2
643 name: lv2
644 type: lvm_partition
645 volgroup: volgroup1
646 - id: sda1_root
647 type: format
648 fstype: ext4
649 volume: sda1
650 - id: lv1_fs
651 name: storage
652 type: format
653 fstype: fat32
654 volume: lvmpart1
655 - id: lv2_fs
656 name: storage
657 type: format
658 fstype: ext3
659 volume: lvmpart2
660 - id: sda1_mount
661 type: mount
662 path: /
663 device: sda1_root
664 - id: lv1_mount
665 type: mount
666 path: /srv/data
667 device: lv1_fs
668 - id: lv2_mount
669 type: mount
670 path: /srv/backup
671 device: lv2_fs
672
673Bcache
674~~~~~~
675
676::
677
678 storage:
679 version: 1
680 config:
681 - id: id_rotary0
682 type: disk
683 name: rotary0
684 path: /dev/vdb
685 ptable: msdos
686 wipe: superblock
687 grub_device: true
688 - id: id_ssd0
689 type: disk
690 name: ssd0
691 path: /dev/vdc
692 wipe: superblock
693 - id: id_rotary0_part1
694 type: partition
695 name: rotary0-part1
696 device: id_rotary0
697 number: 1
698 size: 999M
699 wipe: superblock
700 - id: id_rotary0_part2
701 type: partition
702 name: rotary0-part2
703 device: id_rotary0
704 number: 2
705 size: 9G
706 wipe: superblock
707 - id: id_bcache0
708 type: bcache
709 name: bcache0
710 backing_device: id_rotary0_part2
711 cache_device: id_ssd0
712 cache_mode: writeback
713 - id: bootfs
714 type: format
715 label: boot-fs
716 volume: id_rotary0_part1
717 fstype: ext4
718 - id: rootfs
719 type: format
720 label: root-fs
721 volume: id_bcache0
722 fstype: ext4
723 - id: rootfs_mount
724 type: mount
725 path: /
726 device: rootfs
727 - id: bootfs_mount
728 type: mount
729 path: /boot
730 device: bootfs
731
732RAID Boot
733~~~~~~~~~
734
735::
736
737 storage:
738 version: 1
739 config:
740 - id: sda
741 type: disk
742 ptable: gpt
743 model: QEMU HARDDISK
744 path: /dev/vdb
745 name: main_disk
746 grub_device: 1
747 - id: bios_boot_partition
748 type: partition
749 size: 1MB
750 device: sda
751 flag: bios_grub
752 - id: sda1
753 type: partition
754 size: 3GB
755 device: sda
756 - id: sdb
757 type: disk
758 ptable: gpt
759 model: QEMU HARDDISK
760 path: /dev/vdc
761 name: second_disk
762 - id: sdb1
763 type: partition
764 size: 3GB
765 device: sdb
766 - id: sdc
767 type: disk
768 ptable: gpt
769 model: QEMU HARDDISK
770 path: /dev/vdd
771 name: third_disk
772 - id: sdc1
773 type: partition
774 size: 3GB
775 device: sdc
776 - id: mddevice
777 name: md0
778 type: raid
779 raidlevel: 5
780 devices:
781 - sda1
782 - sdb1
783 - sdc1
784 - id: md_root
785 type: format
786 fstype: ext4
787 volume: mddevice
788 - id: md_mount
789 type: mount
790 path: /
791 device: md_root
792
793
794RAID5 + Bcache
795~~~~~~~~~~~~~~
796
797::
798
799 storage:
800 config:
801 - grub_device: true
802 id: sda
803 model: QEMU HARDDISK
804 name: sda
805 ptable: msdos
806 path: /dev/vdb
807 type: disk
808 wipe: superblock
809 - id: sdb
810 model: QEMU HARDDISK
811 name: sdb
812 path: /dev/vdc
813 type: disk
814 wipe: superblock
815 - id: sdc
816 model: QEMU HARDDISK
817 name: sdc
818 path: /dev/vdd
819 type: disk
820 wipe: superblock
821 - id: sdd
822 model: QEMU HARDDISK
823 name: sdd
824 path: /dev/vde
825 type: disk
826 wipe: superblock
827 - id: sde
828 model: QEMU HARDDISK
829 name: sde
830 path: /dev/vdf
831 type: disk
832 wipe: superblock
833 - devices:
834 - sdc
835 - sdd
836 - sde
837 id: md0
838 name: md0
839 raidlevel: 5
840 spare_devices: []
841 type: raid
842 - device: sda
843 id: sda-part1
844 name: sda-part1
845 number: 1
846 size: 1000001536B
847 type: partition
848 uuid: 3a38820c-d675-4069-b060-509a3d9d13cc
849 wipe: superblock
850 - device: sda
851 id: sda-part2
852 name: sda-part2
853 number: 2
854 size: 7586787328B
855 type: partition
856 uuid: 17747faa-4b9e-4411-97e5-12fd3d199fb8
857 wipe: superblock
858 - backing_device: sda-part2
859 cache_device: sdb
860 cache_mode: writeback
861 id: bcache0
862 name: bcache0
863 type: bcache
864 - fstype: ext4
865 id: sda-part1_format
866 label: ''
867 type: format
868 uuid: 71b1ef6f-5cab-4a77-b4c8-5a209ec11d7c
869 volume: sda-part1
870 - fstype: ext4
871 id: md0_format
872 label: ''
873 type: format
874 uuid: b031f0a0-adb3-43be-bb43-ce0fc8a224a4
875 volume: md0
876 - fstype: ext4
877 id: bcache0_format
878 label: ''
879 type: format
880 uuid: ce45bbaf-5a44-4487-b89e-035c2dd40657
881 volume: bcache0
882 - device: bcache0_format
883 id: bcache0_mount
884 path: /
885 type: mount
886 - device: sda-part1_format
887 id: sda-part1_mount
888 path: /boot
889 type: mount
890 - device: md0_format
891 id: md0_mount
892 path: /srv/data
893 type: mount
894 version: 1
0895
=== modified file 'setup.py'
--- setup.py 2015-08-31 14:19:25 +0000
+++ setup.py 2016-08-29 23:08:04 +0000
@@ -2,7 +2,7 @@
2from glob import glob2from glob import glob
3import os3import os
44
5VERSION = '0.1.0'5import curtin
66
77
8def is_f(p):8def is_f(p):
@@ -11,7 +11,7 @@
11setup(11setup(
12 name="curtin",12 name="curtin",
13 description='The curtin installer',13 description='The curtin installer',
14 version=VERSION,14 version=curtin.__version__,
15 author='Scott Moser',15 author='Scott Moser',
16 author_email='scott.moser@canonical.com',16 author_email='scott.moser@canonical.com',
17 license="AGPL",17 license="AGPL",
1818
=== modified file 'tox.ini'
--- tox.ini 2016-07-27 19:46:21 +0000
+++ tox.ini 2016-08-29 23:08:04 +0000
@@ -57,6 +57,7 @@
57[testenv:docs]57[testenv:docs]
58deps = {[testenv]deps}58deps = {[testenv]deps}
59 sphinx59 sphinx
60 sphinx-rtd-theme
60commands =61commands =
61 sphinx-build -b html -d doc/_build/doctrees doc/ doc/_build/html62 sphinx-build -b html -d doc/_build/doctrees doc/ doc/_build/html
6263

Subscribers

People subscribed via source and target branches