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
1=== modified file 'Makefile'
2--- Makefile 2016-07-26 13:30:35 +0000
3+++ Makefile 2016-08-29 23:08:04 +0000
4@@ -49,5 +49,7 @@
5 sync-images:
6 @$(CWD)/tools/vmtest-sync-images
7
8+clean:
9+ rm -rf doc/_build
10
11-.PHONY: all test pyflakes pyflakes3 pep8 build
12+.PHONY: all clean test pyflakes pyflakes3 pep8 build
13
14=== modified file 'curtin/__init__.py'
15--- curtin/__init__.py 2016-07-15 17:20:36 +0000
16+++ curtin/__init__.py 2016-08-29 23:08:04 +0000
17@@ -37,4 +37,6 @@
18 'APT_CONFIG_V1',
19 ]
20
21+__version__ = "0.1.0"
22+
23 # vi: ts=4 expandtab syntax=python
24
25=== modified file 'doc/conf.py'
26--- doc/conf.py 2015-08-27 18:24:31 +0000
27+++ doc/conf.py 2016-08-29 23:08:04 +0000
28@@ -13,6 +13,11 @@
29
30 import sys, os
31
32+# Fix path so we can import curtin.__version__
33+sys.path.insert(1, os.path.realpath(os.path.join(
34+ os.path.dirname(__file__), '..')))
35+import curtin
36+
37 # If extensions (or modules to document with autodoc) are in another directory,
38 # add these directories to sys.path here. If the directory is relative to the
39 # documentation root, use os.path.abspath to make it absolute, like shown here.
40@@ -41,16 +46,16 @@
41
42 # General information about the project.
43 project = u'curtin'
44-copyright = u'2013, Scott Moser'
45+copyright = u'2016, Scott Moser, Ryan Harper'
46
47 # The version info for the project you're documenting, acts as replacement for
48 # |version| and |release|, also used in various other places throughout the
49 # built documents.
50 #
51 # The short X.Y version.
52-version = '0.3'
53+version = curtin.__version__
54 # The full version, including alpha/beta/rc tags.
55-release = '0.3'
56+release = version
57
58 # The language for content autogenerated by Sphinx. Refer to documentation
59 # for a list of supported languages.
60@@ -93,6 +98,18 @@
61 # a list of builtin themes.
62 html_theme = 'classic'
63
64+# on_rtd is whether we are on readthedocs.org, this line of code grabbed from
65+# docs.readthedocs.org
66+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
67+
68+if not on_rtd: # only import and set the theme if we're building docs locally
69+ import sphinx_rtd_theme
70+ html_theme = 'sphinx_rtd_theme'
71+ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
72+
73+# otherwise, readthedocs.org uses their theme by default, so no need to specify
74+# it
75+
76 # Theme options are theme-specific and customize the look and feel of a theme
77 # further. For a list of options available for each theme, see the
78 # documentation.
79@@ -120,7 +137,7 @@
80 # Add any paths that contain custom static files (such as style sheets) here,
81 # relative to this directory. They are copied after the builtin static files,
82 # so a file named "default.css" will overwrite the builtin "default.css".
83-html_static_path = ['static']
84+#html_static_path = ['static']
85
86 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
87 # using the given strftime format.
88
89=== removed file 'doc/devel/README-vmtest.txt'
90--- doc/devel/README-vmtest.txt 2016-08-02 08:18:23 +0000
91+++ doc/devel/README-vmtest.txt 1970-01-01 00:00:00 +0000
92@@ -1,221 +0,0 @@
93-== Background ==
94-Curtin includes a mechanism called 'vmtest' that allows it to actually
95-do installs and validate a number of configurations.
96-
97-The general flow of the vmtests is:
98- 1. each test has an associated yaml config file for curtin in examples/tests
99- 2. uses curtin-pack to create the user-data for cloud-init to trigger install
100- 3. create and install a system using 'tools/launch'.
101- 3.1 The install environment is booted from a maas ephemeral image.
102- 3.2 kernel & initrd used are from maas images (not part of the image)
103- 3.3 network by default is handled via user networking
104- 3.4 It creates all empty disks required
105- 3.5 cloud-init datasource is provided by launch
106- a) like: ds=nocloud-net;seedfrom=http://10.7.0.41:41518/
107- provided by python webserver start_http
108- b) via -drive file=/tmp/launch.8VOiOn/seed.img,if=virtio,media=cdrom
109- as a seed disk (if booted without external kernel)
110- 3.6 dependencies and other preparations are installed at the beginning by
111- curtin inside the ephemeral image prior to configuring the target
112- 4. power off the system.
113- 5. configure a 'NoCloud' datasource seed image that provides scripts that
114- will run on first boot.
115- 5.1 this will contain all our code to gather health data on the install
116- 5.2 by cloud-init design this runs only once per instance, if you start
117- the system again this won't be called again
118- 6. boot the installed system with 'tools/xkvm'.
119- 6.1 reuses the disks that were installed/configured in the former steps
120- 6.2 also adds an output disk
121- 6.3 additionally the seed image for the data gathering is added
122- 6.4 On this boot it will run the provided scripts, write their output to a
123- "data" disk and then shut itself down.
124- 7. extract the data from the output disk
125- 8. vmtest python code now verifies if the output is as expected.
126-
127-== Debugging ==
128-At 3.1
129- - one can pull data out of the maas image with
130- sudo mount-image-callback your.img -- sh -c 'COMMAND'
131- e.g. sudo mount-image-callback your.img -- sh -c 'cp $MOUNTPOINT/boot/* .'
132-At step 3.6 -> 4.
133- - tools/launch can be called in a way to give you console access
134- to do so just call tools/launch but drop the -serial=x parameter.
135- One might want to change "'power_state': {'mode': 'poweroff'}" to avoid
136- the auto reboot before getting control
137- Replace the directory usually seen in the launch calls with a clean fresh
138- directory
139- - In /curtin curtin and its config can be found
140- - if the system gets that far cloud-init will create a user ubuntu/passw0rd
141- - otherwise one can use a cloud-image from https://cloud-images.ubuntu.com/
142- and add a backdoor user via
143- bzr branch lp:~maas-maintainers/maas/backdoor-image backdoor-image
144- sudo ./backdoor-image -v --user=<USER> --password-auth --password=<PW> IMG
145-At step 6 -> 7
146- - You might want to keep all the temporary images around.
147- To do so you can set CURTIN_VMTEST_KEEP_DATA_PASS=all:
148- export CURTIN_VMTEST_KEEP_DATA_PASS=all CURTIN_VMTEST_KEEP_DATA_FAIL=all
149- That will keep the /tmp/tmpXXXXX directories and all files in there for
150- further execution.
151-At step 7
152- - You might want to take a look at the output disk yourself.
153- It is a normal qcow image, so one can use mount-image-callback as described
154- above
155- - to invoke xkvm on your own take the command you see in the output and
156- remove the "-serial ..." but add -nographic instead
157- For graphical console one can add --vnc 127.0.0.1:1
158-
159-== Setup ==
160-In order to run vmtest you'll need some dependencies. To get them, you
161-can run:
162- make vmtest-deps
163-
164-That will install all necessary dependencies.
165-
166-== Running ==
167-Running tests is done most simply by:
168-
169- make vmtest
170-
171-If you wish to all tests in test_network.py, do so with:
172- sudo PATH=$PWD/tools:$PATH nosetests3 tests/vmtests/test_network.py
173-
174-Or run a single test with:
175- sudo PATH=$PWD/tools:$PATH nosetests3 tests/vmtests/test_network.py:WilyTestBasic
176-
177-Note:
178- * currently, the tests have to run as root. The reason for this is that
179- the kernel and initramfs to boot are extracted from the maas ephemeral
180- image. This should be fixed at some point, and then 'make vmtest'
181-
182- The tests themselves don't actually have to run as root, but the
183- test setup does.
184- * the 'tools' directory must be in your path.
185- * test will set apt: { proxy } in the guests to the value of
186- 'apt_proxy' environment variable. If that is not set it will
187- look at the host's apt config and read 'Acquire::HTTP::Proxy'
188-
189-== Environment Variables ==
190-Some environment variables affect the running of vmtest
191- * apt_proxy:
192- test will set apt_proxy in the guests to the value of 'apt_proxy'.
193- If that is not set it will look at the host's apt config and read
194- 'Acquire::HTTP::Proxy'
195-
196- * CURTIN_VMTEST_KEEP_DATA_PASS CURTIN_VMTEST_KEEP_DATA_FAIL:
197- default:
198- CURTIN_VMTEST_KEEP_DATA_PASS=none
199- CURTIN_VMTEST_KEEP_DATA_FAIL=all
200- These 2 variables determine what portions of the temporary
201- test data are kept.
202-
203- The variables contain a comma ',' delimited list of directories
204- that should be kept in the case of pass or fail. Additionally,
205- the values 'all' and 'none' are accepted.
206-
207- Each vmtest that runs has its own sub-directory under the top level
208- CURTIN_VMTEST_TOPDIR. In that directory are directories:
209- boot: inputs to the system boot (after install)
210- install: install phase related files
211- disks: the disks used for installation and boot
212- logs: install and boot logs
213- collect: data collected by the boot phase
214-
215- * CURTIN_VMTEST_TOPDIR: default $TMPDIR/vmtest-<timestamp>
216- vmtest puts all test data under this value. By default, it creates
217- a directory in TMPDIR (/tmp) named with as "vmtest-<timestamp>"
218-
219- If you set this value, you must ensure that the directory is either
220- non-existant or clean.
221-
222- * CURTIN_VMTEST_LOG: default $TMPDIR/vmtest-<timestamp>.log
223- vmtest writes extended log information to this file.
224- The default puts the log along side the TOPDIR.
225-
226- * CURTIN_VMTEST_IMAGE_SYNC: default false (boolean)
227- if set to true, each run will attempt a sync of images.
228- If you want to make sure images are always up to date, then set to true.
229-
230- * CURTIN_VMTEST_BRIDGE: default 'user'
231- the network devices will be attached to this bridge. The default is
232- 'user', which means to use qemu user mode networking. Set it to
233- 'virbr0' or 'lxcbr0' to use those bridges and then be able to ssh
234- in directly.
235-
236- * CURTIN_VMTEST_BOOT_TIMEOUT: default 300
237- timeout before giving up on the boot of the installed system.
238-
239- * CURTIN_VMTEST_INSTALL_TIMEOUT: default 3000
240- timeout before giving up on installation.
241-
242- * CURTIN_VMTEST_PARALLEL: default ''
243- only supported through ./tools/jenkins-runner .
244- -1 : then run one per core.
245- 0 or '': then run with no parallel
246- >0 : run with N processes
247- this modifies the invocation of nosetets to add '--processes' and other
248- necessary nose arguments (--process-timeout)
249-
250- * IMAGE_DIR: default /srv/images
251- vmtest keeps a mirror of maas ephemeral images in this directory.
252-
253- * IMAGES_TO_KEEP: default 1
254- keep this number of images of each release in the IMAGE_DIR.
255-
256-Environment 'boolean' values:
257- For boolean environment variables the value is considered True
258- if it is any value other than case insensitive 'false', '' or "0"
259-
260-
261-== Test Class Variables ==
262-The base VMBaseClass defines several variables that help creating a new test
263-easily. Among those the common ones are:
264-
265-Generic:
266-- arch_skip
267- If a test is not supported on an architecture it can list the arch in this
268- variable to auto-skip the test if executed on that arch.
269-- conf_file
270- The configuration that will be processed by this vmtest.
271-- extra_kern_args
272- Extra arguments to the guest kernel on boot.
273-
274-Data Collection:
275-- collect_scripts
276- The commands run when booting into the installed environment to collect the
277- data for the test to verify a proper execution.
278-- boot_cloudconf
279- Extra cloud-init config content for the install phase.
280- This allows to gather content of the install phase if needed for test
281- verification.
282-
283-
284-Disk Setup:
285-- disk_block_size = 512
286-- disk_driver = 'virtio-blk'
287- Used to set up the disks for the virtual environment used by the vmtest.
288- Will set the values used in extra_disks if not specified there.
289-- extra_disks
290- A list of extra disks to be created for the testcase. The definition is
291- dpath:size:driver:block_size
292-- multipath = False
293-- multipath_num_paths = 2
294- Details for the (virtual) multipath setup
295-- nvme_disks
296- a shortcut to provide extra disks with the nvme driver
297-
298-Timeouts:
299-- boot_timeout
300-- install_timeout
301- Usually set via CURTIN_VMTEST_BOOT_TIMEOUT/CURTIN_VMTEST_INSTALL_TIMEOUT
302- (see above) environment var, but can be overwritten by a testcase if needed.
303-
304-Checks:
305-- disk_to_check
306- A disk name that is verified to be existing after the installation.
307-- fstab_expected
308-
309-Release:
310-- release = None
311-- krel = None
312- Those two define the distribution and kernel release to be tested and are
313- usually set by importing and inheriting from tests/vmtests/releases.py
314
315=== removed file 'doc/devel/README.txt'
316--- doc/devel/README.txt 2015-03-04 13:30:53 +0000
317+++ doc/devel/README.txt 1970-01-01 00:00:00 +0000
318@@ -1,55 +0,0 @@
319-## curtin development ##
320-
321-This document describes how to use kvm and ubuntu cloud images
322-to develop curtin or test install configurations inside kvm.
323-
324-## get some dependencies ##
325-sudo apt-get -qy install kvm libvirt-bin cloud-utils bzr
326-
327-## get cloud image to boot (-disk1.img) and one to install (-root.tar.gz)
328-mkdir -p ~/download
329-DLDIR=$( cd ~/download && pwd )
330-rel="trusty"
331-arch=amd64
332-burl="http://cloud-images.ubuntu.com/$rel/current/"
333-for f in $rel-server-cloudimg-${arch}-root.tar.gz $rel-server-cloudimg-${arch}-disk1.img; do
334- wget "$burl/$f" -O $DLDIR/$f; done
335-( cd $DLDIR && qemu-img convert -O qcow $rel-server-cloudimg-${arch}-disk1.img $rel-server-cloudimg-${arch}-disk1.qcow2)
336-
337-BOOTIMG="$DLDIR/$rel-server-cloudimg-${arch}-disk1.qcow2"
338-ROOTTGZ="$DLDIR/$rel-server-cloudimg-${arch}-root.tar.gz"
339-
340-## get curtin
341-mkdir -p ~/src
342-bzr init-repo ~/src/curtin
343-( cd ~/src/curtin && bzr branch lp:curtin trunk.dist )
344-( cd ~/src/curtin && bzr branch trunk.dist trunk )
345-
346-## work with curtin
347-cd ~/src/curtin/trunk
348-# use 'launch' to launch a kvm instance with user data to pack
349-# up local curtin and run it inside instance.
350-./tools/launch $BOOTIMG --publish $ROOTTGZ -- curtin install "PUBURL/${ROOTTGZ##*/}"
351-
352-## notes about 'launch' ##
353- * launch has --help so you can see that for some info.
354- * '--publish' adds a web server at ${HTTP_PORT:-9923}
355- and puts the files you want available there. You can reference
356- this url in config or cmdline with 'PUBURL'. For example
357- '--publish foo.img' will put 'foo.img' at PUBURL/foo.img.
358- * launch sets 'ubuntu' user password to 'passw0rd'
359- * launch runs 'kvm -curses'
360- kvm -curses keyboard info:
361- 'alt-2' to go to qemu console
362- * launch puts serial console to 'serial.log' (look there for stuff)
363- * when logged in
364- * you can look at /var/log/cloud-init-output.log
365- * archive should be extracted in /curtin
366- * shell archive should be in /var/lib/cloud/instance/scripts/part-002
367- * when logged in, and archive available at
368-
369-
370-## other notes ##
371- * need to add '--install-deps' or something for curtin
372- cloud-image in 12.04 has no 'python3'
373- ideally 'curtin --install-deps install' would get the things it needs
374
375=== modified file 'doc/index.rst'
376--- doc/index.rst 2015-08-27 19:54:41 +0000
377+++ doc/index.rst 2016-08-29 23:08:04 +0000
378@@ -13,7 +13,13 @@
379 :maxdepth: 2
380
381 topics/overview
382+ topics/config
383+ topics/apt_source
384+ topics/networking
385+ topics/storage
386 topics/reporting
387+ topics/development
388+ topics/integration-testing
389
390
391
392
393=== modified file 'doc/topics/apt_source.rst'
394--- doc/topics/apt_source.rst 2016-08-02 07:53:52 +0000
395+++ doc/topics/apt_source.rst 2016-08-29 23:08:04 +0000
396@@ -9,7 +9,7 @@
397 The feature has an optional target argument which - by default - is used to modify the environment that curtin currently installs (@TARGET_MOUNT_POINT).
398
399 Features
400---------
401+~~~~~~~~
402
403 * Add PGP keys to the APT trusted keyring
404
405@@ -39,7 +39,7 @@
406
407
408 Configuration
409--------------
410+~~~~~~~~~~~~~
411
412 The general configuration of the apt feature is under an element called ``apt``.
413
414@@ -53,7 +53,8 @@
415 The key is the filename and will be prepended by /etc/apt/sources.list.d/ if it doesn't start with a ``/``.
416 There 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.
417
418-The values inside the entries consist of the following optional entries::
419+The values inside the entries consist of the following optional entries
420+
421 * ``source``: a sources.list entry (some variable replacements apply)
422
423 * ``keyid``: providing a key to import via shortid or fingerprint
424@@ -62,7 +63,8 @@
425
426 * ``keyserver``: specify an alternate keyserver to pull keys from that were specified by keyid
427
428-The 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::
429+The 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 ::
430+
431 sources:
432 s1: {'key': 'key1', 'source': 'source1'}
433
434@@ -101,8 +103,7 @@
435
436 - make an example with a partial mirror that doesn't mirror the backports suite, so backports have to be disabled
437
438-That would be specified as
439-::
440+That would be specified as ::
441
442 apt:
443 primary:
444@@ -125,26 +126,31 @@
445
446
447 Common snippets
448----------------
449+~~~~~~~~~~~~~~~
450 This is a collection of additional ideas people can use the feature for customizing their to-be-installed system.
451
452 * enable proposed on installing
453- apt:
454- sources:
455- proposed.list: deb $MIRROR $RELEASE-proposed main restricted universe multiverse
456+
457+::
458+
459+ apt:
460+ sources:
461+ proposed.list: deb $MIRROR $RELEASE-proposed main restricted universe multiverse
462
463 * Make debug symbols available
464- apt:
465-  sources:
466-   ddebs.list: |
467-   deb http://ddebs.ubuntu.com $RELEASE main restricted universe multiverse
468-   deb http://ddebs.ubuntu.com $RELEASE-updates main restricted universe multiverse
469-  deb http://ddebs.ubuntu.com $RELEASE-security main restricted universe multiverse
470- deb http://ddebs.ubuntu.com $RELEASE-proposed main restricted universe multiverse
471-
472+
473+::
474+
475+ apt:
476+ sources:
477+ ddebs.list: |
478+ deb http://ddebs.ubuntu.com $RELEASE main restricted universe multiverse
479+  deb http://ddebs.ubuntu.com $RELEASE-updates main restricted universe multiverse
480+  deb http://ddebs.ubuntu.com $RELEASE-security main restricted universe multiverse
481+ deb http://ddebs.ubuntu.com $RELEASE-proposed main restricted universe multiverse
482
483 Timing
484-------
485+~~~~~~
486 The feature is implemented at the stage of curthooks_commands, which runs just after curtin has extracted the image to the target.
487 Additionally it can be ran as standalong command "curtin -v --config <yourconfigfile> apt-config".
488
489@@ -153,6 +159,6 @@
490
491
492 Dependencies
493-------------
494+~~~~~~~~~~~~
495 Cloud-init might need to resolve dependencies and install packages in the ephemeral environment to run curtin.
496 Therefore 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.
497
498=== added file 'doc/topics/config.rst'
499--- doc/topics/config.rst 1970-01-01 00:00:00 +0000
500+++ doc/topics/config.rst 2016-08-29 23:08:04 +0000
501@@ -0,0 +1,551 @@
502+====================
503+Curtin Configuration
504+====================
505+
506+Curtin exposes a number of configuration options for controlling Curtin
507+behavior during installation.
508+
509+
510+Configuration options
511+---------------------
512+Curtin's top level config keys are as follows:
513+
514+
515+- apt_mirrors (``apt_mirrors``)
516+- apt_proxy (``apt_proxy``)
517+- block-meta (``block``)
518+- debconf_selections (``debconf_selections``)
519+- disable_overlayroot (``disable_overlayroot``)
520+- grub (``grub``)
521+- http_proxy (``http_proxy``)
522+- install (``install``)
523+- kernel (``kernel``)
524+- kexec (``kexec``)
525+- multipath (``multipath``)
526+- network (``network``)
527+- power_state (``power_state``)
528+- reporting (``reporting``)
529+- restore_dist_interfaces: (``restore_dist_interfaces``)
530+- sources (``sources``)
531+- stages (``stages``)
532+- storage (``storage``)
533+- swap (``swap``)
534+- system_upgrade (``system_upgrade``)
535+- write_files (``write_files``)
536+
537+
538+apt_mirrors
539+~~~~~~~~~~~
540+Configure APT mirrors for ``ubuntu_archive`` and ``ubuntu_security``
541+
542+**ubuntu_archive**: *<http://local.archive/ubuntu>*
543+
544+**ubuntu_security**: *<http://local.archive/ubuntu>*
545+
546+If the target OS includes /etc/apt/sources.list, Curtin will replace
547+the default values for each key set with the supplied mirror URL.
548+
549+**Example**::
550+
551+ apt_mirrors:
552+ ubuntu_archive: http://local.archive/ubuntu
553+ ubuntu_security: http://local.archive/ubuntu
554+
555+
556+apt_proxy
557+~~~~~~~~~
558+Curtin will configure an APT HTTP proxy in the target OS
559+
560+**apt_proxy**: *<URL to APT proxy>*
561+
562+**Example**::
563+
564+ apt_proxy: http://squid.mirror:3267/
565+
566+
567+block-meta
568+~~~~~~~~~~
569+Configure how Curtin selects and configures disks on the target
570+system without providing a custom configuration (mode=simple).
571+
572+**devices**: *<List of block devices for use>*
573+
574+The ``devices`` parameter is a list of block device paths that Curtin may
575+select from with choosing where to install the OS.
576+
577+**boot-partition**: *<dictionary of configuration>*
578+
579+The ``boot-partition`` parameter controls how to configure the boot partition
580+with the following parameters:
581+
582+**enabled**: *<boolean>*
583+
584+Enabled will forcibly setup a partition on the target device for booting.
585+
586+**format**: *<['uefi', 'gpt', 'prep', 'mbr']>*
587+
588+Specify the partition format. Some formats, like ``uefi`` and ``prep``
589+are restricted by platform characteristics.
590+
591+**fstype**: *<filesystem type: one of ['ext3', 'ext4'], defaults to 'ext4'>*
592+
593+Specify the filesystem format on the boot partition.
594+
595+**label**: *<filesystem label: defaults to 'boot'>*
596+
597+Specify the filesystem label on the boot partition.
598+
599+**Example**::
600+
601+ block-meta:
602+ devices:
603+ - /dev/sda
604+ - /dev/sdb
605+ boot-partition:
606+ - enabled: True
607+ format: gpt
608+ fstype: ext4
609+ label: my-boot-partition
610+
611+
612+debconf_selections
613+~~~~~~~~~~~~~~~~~~
614+Curtin will update the target with debconf set-selection values. Users will
615+need to be familiar with the package debconf options. Users can probe a
616+packages' debconf settings by using ``debconf-get-selections``.
617+
618+**selection_name**: *<debconf-set-selections input>*
619+
620+``debconf-set-selections`` is in the form::
621+
622+ <packagename> <packagename/option-name> <type> <value>
623+
624+**Example**::
625+
626+ debconf_selections:
627+ set1: |
628+ cloud-init cloud-init/datasources multiselect MAAS
629+ lxd lxd/bridge-name string lxdbr0
630+ set2: lxd lxd/setup-bridge boolean true
631+
632+
633+
634+disable_overlayroot
635+~~~~~~~~~~~~~~~~~~~
636+Curtin disables overlayroot in the target by default.
637+
638+**disable_overlayroot**: *<boolean: default True>*
639+
640+**Example**::
641+
642+ disable_overlayroot: False
643+
644+
645+grub
646+~~~~
647+Curtin configures grub as the target machine's boot loader. Users
648+can control a few options to tailor how the system will boot after
649+installation.
650+
651+**install_devices**: *<list of block device names to install grub>*
652+
653+Specify a list of devices onto which grub will attempt to install.
654+
655+**replace_linux_default**: *<boolean: default True>*
656+
657+Controls whether grub-install will update the Linux Default target
658+value during installation.
659+
660+**update_nvram**: *<boolean: default False>*
661+
662+Certain platforms, like ``uefi`` and ``prep`` systems utilize
663+NVRAM to hold boot configuration settings which control the order in
664+which devices are booted. Curtin by default will not attempt to
665+update the NVRAM settings to preserve the system configuration.
666+Users may want to force NVRAM to be updated such that the next boot
667+of the system will boot from the installed device.
668+
669+**Example**::
670+
671+ grub:
672+ install_devices:
673+ - /dev/sda1
674+ replace_linux_default: False
675+ update_nvram: True
676+
677+
678+http_proxy
679+~~~~~~~~~~
680+Curtin will export ``http_proxy`` value into the installer environment.
681+
682+**http_proxy**: *<HTTP Proxy URL>*
683+
684+**Example**::
685+
686+ http_proxy: http://squid.proxy:3728/
687+
688+
689+
690+install
691+~~~~~~~
692+Configure Curtin's install options.
693+
694+**log_file**: *<path to write Curtin's install.log data>*
695+
696+Curtin logs install progress by default to /var/log/curtin/install.log
697+
698+**post_files**: *<List of files to read from host to include in reporting data>*
699+
700+Curtin by default will post the ``log_file`` value to any configured reporter.
701+
702+**save_install_config**: *<Path to save merged curtin configuration file>*
703+
704+Curtin will save the merged configuration data into the target OS at
705+the path of ``save_install_config``. This defaults to /root/curtin-install-cfg.yaml
706+
707+**Example**::
708+
709+ install:
710+ log_file: /tmp/install.log
711+ post_files:
712+ - /tmp/install.log
713+ - /var/log/syslog
714+ save_install_config: /root/myconf.yaml
715+
716+
717+kernel
718+~~~~~~
719+Configure how Curtin selects which kernel to install into the target image.
720+If ``kernel`` is not configured, Curtin will use the default mapping below
721+and determine which ``package`` value by looking up the current release
722+and current kernel version running.
723+
724+
725+**fallback-package**: *<kernel package-name to be used as fallback>*
726+
727+Specify a kernel package name to be used if the default package is not
728+available.
729+
730+**mapping**: *<Dictionary mapping Ubuntu release to HWE kernel names>*
731+
732+Default mapping for Releases to package names is as follows::
733+
734+ precise:
735+ 3.2.0:
736+ 3.5.0: -lts-quantal
737+ 3.8.0: -lts-raring
738+ 3.11.0: -lts-saucy
739+ 3.13.0: -lts-trusty
740+ trusty:
741+ 3.13.0:
742+ 3.16.0: -lts-utopic
743+ 3.19.0: -lts-vivid
744+ 4.2.0: -lts-wily
745+ 4.4.0: -lts-xenial
746+ xenial:
747+ 4.3.0:
748+ 4.4.0:
749+
750+
751+**package**: *<Linux kernel package name>*
752+
753+Specify the exact package to install in the target OS.
754+
755+**Example**::
756+
757+ kernel:
758+ fallback-package: linux-image-generic
759+ package: linux-image-generic-lts-xenial
760+ mapping:
761+ - xenial:
762+ - 4.4.0: -my-custom-kernel
763+
764+
765+kexec
766+~~~~~
767+Curtin can use kexec to "reboot" into the target OS.
768+
769+**mode**: *<on>*
770+
771+Enable rebooting with kexec.
772+
773+**Example**::
774+
775+ kexec: on
776+
777+
778+multipath
779+~~~~~~~~~
780+Curtin will detect and autoconfigure multipath by default to enable
781+boot for systems with multipath. Curtin does not apply any advanced
782+configuration or tuning, rather it uses distro defaults and provides
783+enough configuration to enable booting.
784+
785+**mode**: *<['auto', ['disabled']>*
786+
787+Defaults to auto which will configure enough to enable booting on multipath
788+devices. Disabled will prevent curtin from installing or configuring
789+multipath.
790+
791+**overwrite_bindings**: *<boolean>*
792+
793+If ``overwrite_bindings`` is True then Curtin will generate new bindings
794+file for multipath, overriding any existing binding in the target image.
795+
796+**Example**::
797+
798+ multipath:
799+ mode: auto
800+ overwrite_bindings: True
801+
802+
803+network
804+~~~~~~~
805+Configure networking (see Networking section for details).
806+
807+**network_option_1**: *<option value>*
808+
809+**Example**::
810+
811+ network:
812+ version: 1
813+ config:
814+ - type: physical
815+ name: eth0
816+ mac_address: "c0:d6:9f:2c:e8:80"
817+ subnets:
818+ - type: dhcp4
819+
820+
821+power_state
822+~~~~~~~~~~~
823+Curtin can configure the target machine into a specific power state after
824+completing an installation. Default is to do nothing.
825+
826+**delay**: *<Integer seconds to delay change in state>*
827+
828+Curtin will wait ``delay`` seconds before changing the power state.
829+
830+**mode**: *<New power state is one of: [halt, poweroff, reboot]>*
831+
832+Curtin will transition the node into one of the new states listed.
833+
834+``halt`` will stop a machine, but may not cut the power to the system.
835+``poweroff`` will stop a machine and request it shut off the power.
836+``reboot`` will perform a platform reset.
837+
838+**message**: *<message string>*
839+
840+The ``message`` string will be broadcast to system consoles prior to
841+power state change.
842+
843+
844+**Example**::
845+
846+ power_state:
847+ mode: poweroff
848+ delay: 5
849+ message: Bye Bye
850+
851+
852+reporting
853+~~~~~~~~~
854+Configure installation reporting (see Reporting section for details).
855+
856+**Example**::
857+
858+ reporting:
859+ maas:
860+ level: DEBUG
861+ type: webhook
862+ endpoint: http://localhost:8000/
863+
864+
865+restore_dist_interfaces
866+~~~~~~~~~~~~~~~~~~~~~~~
867+Curtin can restore a copy of /etc/network/interfaces built in to cloud images.
868+
869+**restore_dist_interfaces**: *<boolean>*
870+
871+If True, then Curtin will restore the interfaces file into the target.
872+
873+
874+**Example**::
875+
876+ restore_dist_interfaces: True
877+
878+
879+sources
880+~~~~~~~
881+Specify the root image to install on to the target system. The URI also
882+configures the method used to copy the image to the target system.
883+
884+**sources**: *<List of source URIs>*
885+
886+``source URI`` may be one of:
887+
888+- **dd-**: Use ``dd`` command to write image to target.
889+- **cp://**: Use ``rsync`` command to copy source directory to target.
890+- **file://**: Use ``tar`` command to extract source to target.
891+- **http[s]://**: Use ``wget | tar`` commands to extract source to target.
892+
893+**Example Cloud-image**::
894+
895+ sources:
896+ - https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-root.tar.gz
897+
898+**Example Custom DD image**::
899+
900+ sources:
901+ - dd-img: https://localhost/raw_images/centos-6-3.img
902+
903+**Example Copy from booted environment**::
904+
905+ sources:
906+ - cp:///
907+
908+
909+**Example Copy from local tarball**::
910+
911+ sources:
912+ - file:///tmp/root.tar.gz
913+
914+
915+stages
916+~~~~~~
917+Curtin installation executes in stages. At each stage, Curtin will look for
918+a list of commands to run at each stage by reading in from the Curtin config
919+*<stage_name>_commands* which is a dictionary and each key contains a list
920+of commands to run. Users may override the stages value to control
921+what curtin stages execute. During each stage, the commands are executed
922+in C Locale sort order. Users should name keys in a NN-XXX format where NN
923+is a two-digit number to exercise control over execution order.
924+
925+The following stages are defined in Curtin and
926+run by default.
927+
928+- **early**: *Preparing for Installation*
929+
930+This stage runs before any actions are taken for installation. By default
931+this stage does nothing.
932+
933+- **partitioning**: *Select and partition disks for installation*
934+
935+This stage runs ``curtin block-meta simple`` by default.
936+
937+- **network**: *Probe and configure networking*
938+
939+This stage runs ``curtin net-meta auto`` by default.
940+
941+- **extract**: *Writing install sources to disk*
942+
943+This stage runs ``curtin extract`` by default.
944+
945+- **extract**: *Writing install sources to disk*
946+
947+This stage runs ``curtin extract`` by default.
948+
949+- **curthooks**: *Configuring installed system*
950+
951+This stage runs ``curtin curthooks`` by default.
952+
953+- **hooks**: *Finalizing installation*
954+
955+This stage runs ``curtin hook`` by default.
956+
957+- **late**: *Executing late commands*
958+
959+This stage runs after Curtin has completed the installation. By default
960+this stage does nothing.
961+
962+**Example Custom Stages**::
963+
964+ # Skip the whole install and just run `mystage`
965+ stages: ['early', 'late', 'mystage']
966+ mystage_commands:
967+ 00-cmd: ['/usr/bin/foo']
968+
969+**Example Early and Late commands**::
970+
971+ early_commands:
972+ 99-cmd: ['echo', 'I ran last']
973+ 00-cmd: ['echo', 'I ran first']
974+ late_commands:
975+ 50-cmd: ['curtin', 'in-target' '--', 'touch', '/etc/disable_overlayroot']
976+
977+
978+swap
979+~~~~
980+Curtin can configure a swapfile on the filesystem in the target system.
981+Size settings can be integer or string values with suffix. Curtin
982+supports the following suffixes which multiply the value.
983+
984+- **B**: *1*
985+- **K[B]**: *1 << 10*
986+- **M[B]**: *1 << 20*
987+- **G[B]**: *1 << 30*
988+- **T[B]**: *1 << 40*
989+
990+Curtin will use a heuristic to configure the swapfile size if the ``size``
991+parameter is not set to a specific value. The ``maxsize`` sets the upper
992+bound of the heuristic calculation.
993+
994+**filename**: *<path to swap file>*
995+
996+Configure the filename of the swap file. Defaults to /swap.img
997+
998+**maxsize**: *<Size string>*
999+
1000+Configure the max size of the swapfile, defaults to 8GB
1001+
1002+**size**: *<Size string>*
1003+
1004+Configure the exact size of the swapfile. Setting ``size`` to 0 will
1005+disable swap.
1006+
1007+**Example**::
1008+
1009+ swap:
1010+ filename: swap.img
1011+ size: None
1012+ maxsize: 4GB
1013+
1014+
1015+system_upgrade
1016+~~~~~~~~~~~~~~
1017+Control if Curtin runs `dist-upgrade` in target after install. Defaults to
1018+False.
1019+
1020+**enabled**: *<boolean>*
1021+
1022+**Example**::
1023+
1024+ system_upgrade:
1025+ enabled: False
1026+
1027+
1028+write_files
1029+~~~~~~~~~~~
1030+Curtin supports writing out arbitrary data to a file.
1031+``write_files`` accepts a dictionary of entries formatted as follows:
1032+
1033+**path**: *<path and filename to save content>*
1034+
1035+Specify the name and location of where to write the content.
1036+
1037+**permissions**: *<Unix permission string>*
1038+
1039+Specify the permissions mode as an integer or string of numbers.
1040+
1041+**content**: *<data>*
1042+
1043+Specify the content.
1044+
1045+**Example**::
1046+
1047+ write_files:
1048+ f1:
1049+ path: /file1
1050+ content: !!binary |
1051+ f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAwARAAAAAAABAAAAAAAAAAJAVAAAAAAA
1052+ f2: {path: /file2, content: "foobar", permissions: '0666'}
1053
1054=== added file 'doc/topics/development.rst'
1055--- doc/topics/development.rst 1970-01-01 00:00:00 +0000
1056+++ doc/topics/development.rst 2016-08-29 23:08:04 +0000
1057@@ -0,0 +1,68 @@
1058+=================
1059+Developing Curtin
1060+=================
1061+
1062+Curtin developers make use of cloud-images and kvm to help develop and test new
1063+curtin features.
1064+
1065+Install dependencies
1066+====================
1067+
1068+Install some virtualization and cloud packages to get started.::
1069+
1070+ sudo apt-get -qy install kvm libvirt-bin cloud-utils bzr
1071+
1072+
1073+Download cloud images
1074+=====================
1075+Curtin will use two cloud images (-disk1.img) is for booting,
1076+(-root.tar.gz) is used for installing.::
1077+
1078+ mkdir -p ~/download
1079+ DLDIR=$( cd ~/download && pwd )
1080+ rel="trusty"
1081+ arch=amd64
1082+ burl="http://cloud-images.ubuntu.com/$rel/current/"
1083+ for f in $rel-server-cloudimg-${arch}-root.tar.gz $rel-server-cloudimg-${arch}-disk1.img; do
1084+ wget "$burl/$f" -O $DLDIR/$f; done
1085+ ( cd $DLDIR && qemu-img convert -O qcow $rel-server-cloudimg-${arch}-disk1.img $rel-server-cloudimg-${arch}-disk1.qcow2)
1086+
1087+ export BOOTIMG="$DLDIR/$rel-server-cloudimg-${arch}-disk1.qcow2"
1088+ export ROOTTGZ="$DLDIR/$rel-server-cloudimg-${arch}-root.tar.gz"
1089+
1090+
1091+Getting the source
1092+==================
1093+Download curtin source from launchpad via `bzr` command.::
1094+
1095+ mkdir -p ~/src
1096+ bzr init-repo ~/src/curtin
1097+ ( cd ~/src/curtin && bzr branch lp:curtin trunk.dist )
1098+ ( cd ~/src/curtin && bzr branch trunk.dist trunk )
1099+
1100+Using curtin
1101+============
1102+Use `launch` to launch a kvm instance with user data to pack up
1103+local curtin and run it inside an instance.::
1104+
1105+ cd ~/src/curtin/trunk
1106+ ./tools/launch $BOOTIMG --publish $ROOTTGZ -- curtin install "PUBURL/${ROOTTGZ##*/}"
1107+
1108+
1109+Notes about 'launch'
1110+====================
1111+
1112+- launch has --help so you can see that for some info.
1113+- `--publish` adds a web server at ${HTTP_PORT:-$RANDOM_PORT}
1114+ and puts the files you want available there. You can reference
1115+ this url in config or cmdline with 'PUBURL'. For example
1116+ `--publish foo.img` will put `foo.img` at PUBURL/foo.img.
1117+- launch sets 'ubuntu' user password to 'passw0rd'
1118+- launch runs 'kvm -curses'
1119+ kvm -curses keyboard info:
1120+ 'alt-2' to go to qemu console
1121+- launch puts serial console to 'serial.log' (look there for stuff)
1122+- when logged in
1123+ - you can look at /var/log/cloud-init-output.log
1124+ - archive should be extracted in /curtin
1125+ - shell archive should be in /var/lib/cloud/instance/scripts/part-002
1126
1127=== added file 'doc/topics/integration-testing.rst'
1128--- doc/topics/integration-testing.rst 1970-01-01 00:00:00 +0000
1129+++ doc/topics/integration-testing.rst 2016-08-29 23:08:04 +0000
1130@@ -0,0 +1,245 @@
1131+===================
1132+Integration Testing
1133+===================
1134+
1135+Curtin includes an in-tree integration suite that runs hundreds of tests
1136+validating various forms of custom storage and network configurations across
1137+all of the supported Ubuntu LTS releases as well as some of the currently
1138+supported interim releases.
1139+
1140+Background
1141+==========
1142+
1143+Curtin includes a mechanism called 'vmtest' that allows it to actually
1144+do installs and validate a number of configurations.
1145+
1146+The general flow of the vmtests is:
1147+
1148+#. each test has an associated yaml config file for curtin in examples/tests
1149+#. uses curtin-pack to create the user-data for cloud-init to trigger install
1150+#. create and install a system using 'tools/launch'.
1151+
1152+ #. The install environment is booted from a maas ephemeral image.
1153+ #. kernel & initrd used are from maas images (not part of the image)
1154+ #. network by default is handled via user networking
1155+ #. It creates all empty disks required
1156+ #. cloud-init datasource is provided by launch
1157+
1158+ #. like: ds=nocloud-net;seedfrom=http://10.7.0.41:41518/
1159+ provided by python webserver start_http
1160+ #. via -drive file=/tmp/launch.8VOiOn/seed.img,if=virtio,media=cdrom
1161+ as a seed disk (if booted without external kernel)
1162+
1163+ #. dependencies and other preparations are installed at the beginning by
1164+ curtin inside the ephemeral image prior to configuring the target
1165+
1166+#. power off the system.
1167+#. configure a 'NoCloud' datasource seed image that provides scripts that
1168+ will run on first boot.
1169+
1170+ #. this will contain all our code to gather health data on the install
1171+ #. by cloud-init design this runs only once per instance, if you start
1172+ the system again this won't be called again
1173+
1174+#. boot the installed system with 'tools/xkvm'.
1175+
1176+ #. reuses the disks that were installed/configured in the former steps
1177+ #. also adds an output disk
1178+ #. additionally the seed image for the data gathering is added
1179+ #. On this boot it will run the provided scripts, write their output to a
1180+ "data" disk and then shut itself down.
1181+
1182+#. extract the data from the output disk
1183+#. vmtest python code now verifies if the output is as expected.
1184+
1185+Debugging
1186+=========
1187+
1188+At 3.1 one can pull data out of the maas image the command
1189+``mount-image-callback``. For example::
1190+
1191+ sudo mount-image-callback your.img -- sh -c 'cp $MOUNTPOINT/boot/* .'
1192+
1193+At step 3.6 through 4 ``tools/launch`` can be called in a way to give you
1194+console access. To do so just call tools/launch but drop the -serial=x
1195+parameter. One might want to change "'power_state': {'mode': 'poweroff'}" to
1196+avoid the auto reboot before getting control. Replace the directory usually
1197+seen in the launch calls with a clean fresh directory.
1198+
1199+In /curtin curtin and its config can be found. If the system gets that far
1200+cloud-init will create a user creds: ubuntu/passw0rd , otherwise one can use a
1201+cloud-image from https://cloud-images.ubuntu.com/ and add a backdoor user
1202+via::
1203+
1204+ bzr branch lp:~maas-maintainers/maas/backdoor-image backdoor-image
1205+ sudo ./backdoor-image -v --user=<USER> --password-auth --password=<PW> IMG
1206+
1207+At step 6 -> 7 you might want to keep all the temporary images around. To do
1208+so you can set ``CURTIN_VMTEST_KEEP_DATA_PASS=all`` in your environment. ::
1209+
1210+ export CURTIN_VMTEST_KEEP_DATA_PASS=all CURTIN_VMTEST_KEEP_DATA_FAIL=all
1211+
1212+That will keep the /tmp/tmpXXXXX directories and all files in there for further
1213+execution.
1214+
1215+At step 7 you might want to take a look at the output disk yourself. It is a
1216+normal qcow image, so one can use ``mount-image-callback`` as described above.
1217+
1218+To invoke xkvm on your own take the command you see in the output and remove
1219+the "-serial ..." but add ``-nographic`` instead For graphical console one can
1220+add ``--vnc 127.0.0.1:1``
1221+
1222+Setup
1223+=====
1224+
1225+In order to run vmtest you'll need some dependencies. To get them, you
1226+can run::
1227+
1228+ make vmtest-deps
1229+
1230+Running
1231+=======
1232+
1233+Running tests is done most simply by::
1234+
1235+ make vmtest
1236+
1237+If you wish to all tests in test_network.py, do so with::
1238+
1239+ nosetests3 tests/vmtests/test_network.py
1240+
1241+Or run a single test with::
1242+
1243+ nosetests3 tests/vmtests/test_network.py:WilyTestBasic
1244+
1245+
1246+Environment Variables
1247+=====================
1248+
1249+Some environment variables affect the running of vmtest
1250+
1251+- ``apt_proxy``:
1252+
1253+ test will set apt: { proxy } in the guests to the value of ``apt_proxy``
1254+ environment variable. If that is not set it will look at the host's apt
1255+ config and read ``Acquire::HTTP::Proxy``
1256+
1257+- ``CURTIN_VMTEST_KEEP_DATA_PASS``: Defaults to none.
1258+- ``CURTIN_VMTEST_KEEP_DATA_FAIL``: Defaults to all.
1259+
1260+ These 2 variables determine what portions of the temporary
1261+ test data are kept.
1262+
1263+ The variables contain a comma ',' delimited list of directories
1264+ that should be kept in the case of pass or fail. Additionally,
1265+ the values 'all' and 'none' are accepted.
1266+
1267+ Each vmtest that runs has its own sub-directory under the top level
1268+ ``CURTIN_VMTEST_TOPDIR``. In that directory are directories:
1269+
1270+ - ``boot``: inputs to the system boot (after install)
1271+ - ``install``: install phase related files
1272+ - ``disks``: the disks used for installation and boot
1273+ - ``logs``: install and boot logs
1274+ - ``collect``: data collected by the boot phase
1275+
1276+- ``CURTIN_VMTEST_TOPDIR``: default $TMPDIR/vmtest-<timestamp>
1277+
1278+ Vmtest puts all test data under this value. By default, it creates
1279+ a directory in TMPDIR (/tmp) named with as ``vmtest-<timestamp>``
1280+
1281+ If you set this value, you must ensure that the directory is either
1282+ non-existent or clean.
1283+
1284+- ``CURTIN_VMTEST_LOG``: default $TMPDIR/vmtest-<timestamp>.log
1285+
1286+ Vmtest writes extended log information to this file.
1287+ The default puts the log along side the TOPDIR.
1288+
1289+- ``CURTIN_VMTEST_IMAGE_SYNC``: default false (boolean)
1290+
1291+ If set to true, each run will attempt a sync of images.
1292+ If you want to make sure images are always up to date, then set to true.
1293+
1294+- ``CURTIN_VMTEST_BRIDGE``: ``user``
1295+
1296+ The network devices will be attached to this bridge. The default is
1297+ ``user``, which means to use qemu user mode networking. Set it to
1298+ ``virbr0`` or ``lxdbr0`` to use those bridges and then be able to ssh
1299+ in directly.
1300+
1301+- ``CURTIN_VMTEST_BOOT_TIMEOUT``: default 300
1302+
1303+ timeout before giving up on the boot of the installed system.
1304+
1305+- ``CURTIN_VMTEST_INSTALL_TIMEOUT``: default 3000
1306+
1307+ timeout before giving up on installation.
1308+
1309+- ``CURTIN_VMTEST_PARALLEL``: default ''
1310+
1311+ only supported through ./tools/jenkins-runner .
1312+
1313+ - ``-1``: then run one per core.
1314+ - ``0`` or ``''``: run with no parallel
1315+ - ``>0``: run with N processes
1316+
1317+ This modifies the invocation of nosetets to add '--processes' and other
1318+ necessary nose arguments (--process-timeout)
1319+
1320+- ``IMAGE_DIR``: default /srv/images
1321+
1322+ Vmtest keeps a mirror of maas ephemeral images in this directory.
1323+
1324+- ``IMAGES_TO_KEEP``: default 1
1325+
1326+ Controls the number of images of each release retained in the IMAGE_DIR.
1327+
1328+Environment 'boolean' values
1329+============================
1330+
1331+For boolean environment variables the value is considered True
1332+if it is any value other than case insensitive 'false', '' or "0".
1333+
1334+Test Class Variables
1335+====================
1336+
1337+The base VMBaseClass defines several variables that help creating a new test
1338+easily. Among those the common ones are:
1339+
1340+Generic:
1341+
1342+- ``arch_skip``:
1343+
1344+ If a test is not supported on an architecture it can list the arch in this
1345+ variable to auto-skip the test if executed on that arch.
1346+
1347+- ``conf_file``:
1348+
1349+ The configuration that will be processed by this vmtest.
1350+
1351+- ``extra_kern_args``:
1352+
1353+ Extra arguments to the guest kernel on boot.
1354+
1355+Data Collection:
1356+
1357+- ``collect_scripts``:
1358+
1359+ The commands run when booting into the installed environment to collect the
1360+ data for the test to verify a proper execution.
1361+
1362+- ``boot_cloudconf``:
1363+
1364+ Extra cloud-init config content for the install phase. This allows to gather
1365+ content of the install phase if needed for test verification.
1366+
1367+Disk Setup:
1368+
1369+- ``disk_block_size``:
1370+
1371+ Default block size ``512`` bytes.
1372+
1373+- ``disk_driver``:
1374+
1375+ Default block device driver is ``virtio-blk``.
1376
1377=== added file 'doc/topics/networking.rst'
1378--- doc/topics/networking.rst 1970-01-01 00:00:00 +0000
1379+++ doc/topics/networking.rst 2016-08-29 23:08:04 +0000
1380@@ -0,0 +1,522 @@
1381+==========
1382+Networking
1383+==========
1384+
1385+Curtin supports a user-configurable networking configuration format.
1386+This format lets users (including via MAAS) to customize their machines'
1387+networking interfaces by assigning subnet configuration, virtual device
1388+creation (bonds, bridges, vlans) routes and DNS configuration.
1389+
1390+Curtin accepts a YAML input under the top-level ``network`` key
1391+to indicate that a user would like to specify a custom networking
1392+configuration. Required elements of a network configuration are
1393+``config`` and ``version``. Currently curtin only supports
1394+network config version=1. ::
1395+
1396+ network:
1397+ version: 1
1398+ config: []
1399+
1400+Configuration Types
1401+-------------------
1402+Within the network ``config`` portion, users include a list of configuration
1403+types. The current list of support ``type`` values are as follows:
1404+
1405+- Physical (``physical``)
1406+- Bond (``bond``)
1407+- Bridge (``bridge``)
1408+- VLAN (``vlan``)
1409+- Nameserver (``nameserver``)
1410+- Route (``route``)
1411+
1412+Physical, Bond, Bridge and VLAN types may also include IP configuration under
1413+the key ``subnets``.
1414+
1415+- Subnet/IP (``subnets``)
1416+
1417+
1418+Physical
1419+~~~~~~~~
1420+The ``physical`` type configuration represents a "physical" network device,
1421+typically Ethernet-based. At least one of of these entries is required for
1422+external network connectivity. Type ``physical`` requires only one key:
1423+``name``. A ``physical`` device may contain some or all of the following keys:
1424+
1425+**name**: *<desired device name>*
1426+
1427+A devices name must be less than 15 characters. Names exceeding the maximum
1428+will be truncated. This is a limitation of the Linux kernel network-device
1429+structure.
1430+
1431+**mac_address**: *<MAC Address>*
1432+
1433+The MAC Address is a device unique identifier that most Ethernet-based network
1434+devices possess. Specifying a MAC Address is optional.
1435+
1436+
1437+.. note::
1438+
1439+ Curtin will emit a udev rule to provide a persistent mapping between a
1440+ device's ``name`` and the ``mac_address``.
1441+
1442+**mtu**: *<MTU SizeBytes>*
1443+
1444+The MTU key represents a device's Maximum Transmission Unit, the largest size
1445+packet or frame, specified in octets (eight-bit bytes), that can be sent in a
1446+packet- or frame-based network. Specifying ``mtu`` is optional.
1447+
1448+.. note::
1449+
1450+ The possible supported values of a device's MTU is not available at
1451+ configuration time. It's possible to specify a value too large or to
1452+ small for a device and may be ignored by the device.
1453+
1454+
1455+**Physical Example**::
1456+
1457+ network:
1458+ version: 1
1459+ config:
1460+ # Simple network adapter
1461+ - type: physical
1462+ name: interface0
1463+ mac_address: 00:11:22:33:44:55
1464+ # Second nic with Jumbo frames
1465+ - type: physical
1466+ name: jumbo0
1467+ mac_address: aa:11:22:33:44:55
1468+ mtu: 9000
1469+ # 10G pair
1470+ - type: physical
1471+ name: gbe0
1472+ mac_address: cd:11:22:33:44:00
1473+ - type: physical
1474+ name: gbe1
1475+ mac_address: cd:11:22:33:44:02
1476+
1477+Bond
1478+~~~~
1479+A ``bond`` type will configure a Linux software Bond with one or more network
1480+devices. A ``bond`` type requires the following keys:
1481+
1482+**name**: *<desired device name>*
1483+
1484+A devices name must be less than 15 characters. Names exceeding the maximum
1485+will be truncated. This is a limitation of the Linux kernel network-device
1486+structure.
1487+
1488+**mac_address**: *<MAC Address>*
1489+
1490+When specifying MAC Address on a bond this value will be assigned to the bond
1491+device and may be different than the MAC address of any of the underlying
1492+bond interfaces. Specifying a MAC Address is optional. If ``mac_address`` is
1493+not present, then the bond will use one of the MAC Address values from one of
1494+the bond interfaces.
1495+
1496+
1497+**bond_interfaces**: *<List of network device names>*
1498+
1499+The ``bond_interfaces`` key accepts a list of network device ``name`` values
1500+from the configuration. This list may be empty.
1501+
1502+**params**: *<Dictionary of key: value bonding parameter pairs>*
1503+
1504+The ``params`` key in a bond holds a dictionary of bonding parameters.
1505+This dictionary may be empty. For more details on what the various bonding
1506+parameters mean please read the Linux Kernel Bonding.txt.
1507+
1508+Valid ``params`` keys are:
1509+
1510+ - ``active_slave``: Set bond attribute
1511+ - ``ad_actor_key``: Set bond attribute
1512+ - ``ad_actor_sys_prio``: Set bond attribute
1513+ - ``ad_actor_system``: Set bond attribute
1514+ - ``ad_aggregator``: Set bond attribute
1515+ - ``ad_num_ports``: Set bond attribute
1516+ - ``ad_partner_key``: Set bond attribute
1517+ - ``ad_partner_mac``: Set bond attribute
1518+ - ``ad_select``: Set bond attribute
1519+ - ``ad_user_port_key``: Set bond attribute
1520+ - ``all_slaves_active``: Set bond attribute
1521+ - ``arp_all_targets``: Set bond attribute
1522+ - ``arp_interval``: Set bond attribute
1523+ - ``arp_ip_target``: Set bond attribute
1524+ - ``arp_validate``: Set bond attribute
1525+ - ``downdelay``: Set bond attribute
1526+ - ``fail_over_mac``: Set bond attribute
1527+ - ``lacp_rate``: Set bond attribute
1528+ - ``lp_interval``: Set bond attribute
1529+ - ``miimon``: Set bond attribute
1530+ - ``mii_status``: Set bond attribute
1531+ - ``min_links``: Set bond attribute
1532+ - ``mode``: Set bond attribute
1533+ - ``num_grat_arp``: Set bond attribute
1534+ - ``num_unsol_na``: Set bond attribute
1535+ - ``packets_per_slave``: Set bond attribute
1536+ - ``primary``: Set bond attribute
1537+ - ``primary_reselect``: Set bond attribute
1538+ - ``queue_id``: Set bond attribute
1539+ - ``resend_igmp``: Set bond attribute
1540+ - ``slaves``: Set bond attribute
1541+ - ``tlb_dynamic_lb``: Set bond attribute
1542+ - ``updelay``: Set bond attribute
1543+ - ``use_carrier``: Set bond attribute
1544+ - ``xmit_hash_policy``: Set bond attribute
1545+
1546+**Bond Example**::
1547+
1548+ network:
1549+ version: 1
1550+ config:
1551+ # Simple network adapter
1552+ - type: physical
1553+ name: interface0
1554+ mac_address: 00:11:22:33:44:55
1555+ # 10G pair
1556+ - type: physical
1557+ name: gbe0
1558+ mac_address: cd:11:22:33:44:00
1559+ - type: physical
1560+ name: gbe1
1561+ mac_address: cd:11:22:33:44:02
1562+ - type: bond
1563+ name: bond0
1564+ bond_interfaces:
1565+ - gbe0
1566+ - gbe1
1567+ params:
1568+ bond-mode: active-backup
1569+
1570+Bridge
1571+~~~~~~
1572+Type ``bridge`` requires the following keys:
1573+
1574+- ``name``: Set the name of the bridge.
1575+- ``bridge_interfaces``: Specify the ports of a bridge via their ``name``. This list may be empty.
1576+- ``params``: A list of bridge params. For more details, please read the bridge-utils-interfaces manpage.
1577+
1578+Valid keys are:
1579+
1580+ - ``bridge_ageing``: Set the bridge's ageing value.
1581+ - ``bridge_bridgeprio``: Set the bridge device network priority.
1582+ - ``bridge_fd``: Set the bridge's forward delay.
1583+ - ``bridge_hello``: Set the bridge's hello value.
1584+ - ``bridge_hw``: Set the bridge's MAC address.
1585+ - ``bridge_maxage``: Set the bridge's maxage value.
1586+ - ``bridge_maxwait``: Set how long network scripts should wait for the bridge to be up.
1587+ - ``bridge_pathcost``: Set the cost of a specific port on the bridge.
1588+ - ``bridge_portprio``: Set the priority of a specific port on the bridge.
1589+ - ``bridge_ports``: List of devices that are part of the bridge.
1590+ - ``bridge_stp``: Set spanning tree protocol on or off.
1591+ - ``bridge_waitport``: Set amount of time in seconds to wait on specific ports to become available.
1592+
1593+
1594+**Bridge Example**::
1595+
1596+ network:
1597+ version: 1
1598+ config:
1599+ # Simple network adapter
1600+ - type: physical
1601+ name: interface0
1602+ mac_address: 00:11:22:33:44:55
1603+ # Second nic with Jumbo frames
1604+ - type: physical
1605+ name: jumbo0
1606+ mac_address: aa:11:22:33:44:55
1607+ mtu: 9000
1608+ - type: bridge
1609+ name: br0
1610+ bridge_interfaces:
1611+ - jumbo0
1612+ params:
1613+ bridge_ageing: 250
1614+ bridge_bridgeprio: 22
1615+ bridge_fd: 1
1616+ bridge_hello: 1
1617+ bridge_maxage: 10
1618+ bridge_maxwait: 0
1619+ bridge_pathcost:
1620+ - jumbo0 75
1621+ bridge_pathprio:
1622+ - jumbo0 28
1623+ bridge_stp: 'off'
1624+ bridge_maxwait:
1625+ - jumbo0 0
1626+
1627+
1628+VLAN
1629+~~~~
1630+Type ``vlan`` requires the following keys:
1631+
1632+- ``name``: Set the name of the VLAN
1633+- ``vlan_link``: Specify the underlying link via its ``name``.
1634+- ``vlan_id``: Specify the VLAN numeric id.
1635+
1636+**VLAN Example**::
1637+
1638+ network:
1639+ version: 1
1640+ config:
1641+ # Physical interfaces.
1642+ - type: physical
1643+ name: eth0
1644+ mac_address: "c0:d6:9f:2c:e8:80"
1645+ # VLAN interface.
1646+ - type: vlan
1647+ name: eth0.101
1648+ vlan_link: eth0
1649+ vlan_id: 101
1650+ mtu: 1500
1651+
1652+Nameserver
1653+~~~~~~~~~~
1654+
1655+Users can specify a ``nameserver`` type. Nameserver dictionaries include
1656+the following keys:
1657+
1658+- ``address``: List of IPv4 or IPv6 address of nameservers.
1659+- ``search``: List of of hostnames to include in the resolv.conf search path.
1660+
1661+**Nameserver Example**::
1662+
1663+ network:
1664+ version: 1
1665+ config:
1666+ - type: physical
1667+ name: interface0
1668+ mac_address: 00:11:22:33:44:55
1669+ subnets:
1670+ - type: static
1671+ address: 192.168.23.14/27
1672+ gateway: 192.168.23.1
1673+ - type: nameserver:
1674+ address:
1675+ - 192.168.23.2
1676+ - 8.8.8.8
1677+ search:
1678+ - exemplary
1679+
1680+
1681+
1682+Route
1683+~~~~~
1684+
1685+Users can include static routing information as well. A ``route`` dictionary
1686+has the following keys:
1687+
1688+- ``destination``: IPv4 network address with CIDR netmask notation.
1689+- ``gateway``: IPv4 gateway address with CIDR netmask notation.
1690+- ``metric``: Integer which sets the network metric value for this route.
1691+
1692+**Route Example**::
1693+
1694+ network:
1695+ version: 1
1696+ config:
1697+ - type: physical
1698+ name: interface0
1699+ mac_address: 00:11:22:33:44:55
1700+ subnets:
1701+ - type: static
1702+ address: 192.168.23.14/24
1703+ gateway: 192.168.23.1
1704+ - type: route
1705+ destination: 192.168.24.0/24
1706+ gateway: 192.168.24.1
1707+ metric: 3
1708+
1709+Subnet/IP
1710+~~~~~~~~~
1711+
1712+For any network device (one of the Config Types) users can define a list of
1713+``subnets`` which contain ip configuration dictionaries. Multiple subnet
1714+entries will create interface alias allowing a single interface to use different
1715+ip configurations.
1716+
1717+Valid keys for for ``subnets`` include the following:
1718+
1719+- ``type``: Specify the subnet type.
1720+- ``control``: Specify manual, auto or hotplug. Indicates how the interface will be handled during boot.
1721+- ``address``: IPv4 or IPv6 address. It may include CIDR netmask notation.
1722+- ``netmask``: IPv4 subnet mask in dotted format or CIDR notation.
1723+- ``gateway``: IPv4 address of the default gateway for this subnet.
1724+- ``dns_nameserver``: Specify a list of IPv4 dns server IPs to end up in resolv.conf.
1725+- ``dns_search``: Specify a list of search paths to be included in resolv.conf.
1726+
1727+
1728+Subnet types are one of the following:
1729+
1730+- ``dhcp4``: Configure this interface with IPv4 dhcp.
1731+- ``dhcp``: Alias for ``dhcp4``
1732+- ``dhcp6``: Configure this interface with IPv6 dhcp.
1733+- ``static``: Configure this interface with a static IPv4.
1734+- ``static6``: Configure this interface with a static IPv6 .
1735+
1736+When making use of ``dhcp`` types, no additional configuration is needed in the
1737+subnet dictionary.
1738+
1739+
1740+**Subnet DHCP Example**::
1741+
1742+ network:
1743+ version: 1
1744+ config:
1745+ - type: physical
1746+ name: interface0
1747+ mac_address: 00:11:22:33:44:55
1748+ subnets:
1749+ - type: dhcp
1750+
1751+
1752+**Subnet Static Example**::
1753+
1754+ network:
1755+ version: 1
1756+ config:
1757+ - type: physical
1758+ name: interface0
1759+ mac_address: 00:11:22:33:44:55
1760+ subnets:
1761+ - type: static
1762+ address: 192.168.23.14/27
1763+ gateway: 192.168.23.1
1764+ dns_nameservers:
1765+ - 192.168.23.2
1766+ - 8.8.8.8
1767+ dns_search:
1768+ - exemplary.maas
1769+
1770+The following will result in an ``interface0`` using DHCP and ``interface0:1``
1771+using the static subnet configuration.
1772+
1773+**Multiple subnet Example**::
1774+
1775+ network:
1776+ version: 1
1777+ config:
1778+ - type: physical
1779+ name: interface0
1780+ mac_address: 00:11:22:33:44:55
1781+ subnets:
1782+ - type: dhcp
1783+ - type: static
1784+ address: 192.168.23.14/27
1785+ gateway: 192.168.23.1
1786+ dns_nameservers:
1787+ - 192.168.23.2
1788+ - 8.8.8.8
1789+ dns_search:
1790+ - exemplary
1791+
1792+
1793+Multi-layered configurations
1794+----------------------------
1795+
1796+Complex networking sometimes uses layers of configuration. The syntax allows
1797+users to build those layers one at a time. All of the virtual network devices
1798+supported allow specifying an underlying device by their ``name`` value.
1799+
1800+**Bonded VLAN Example**::
1801+
1802+ network:
1803+ version: 1
1804+ config:
1805+ # 10G pair
1806+ - type: physical
1807+ name: gbe0
1808+ mac_address: cd:11:22:33:44:00
1809+ - type: physical
1810+ name: gbe1
1811+ mac_address: cd:11:22:33:44:02
1812+ # Bond.
1813+ - type: bond
1814+ name: bond0
1815+ bond_interfaces:
1816+ - gbe0
1817+ - gbe1
1818+ params:
1819+ bond-mode: 802.3ad
1820+ bond-lacp-rate: fast
1821+ # A Bond VLAN.
1822+ - type: vlan
1823+ name: bond0.200
1824+ vlan_link: bond0
1825+ vlan_id: 200
1826+ subnets:
1827+ - type: dhcp4
1828+
1829+More Examples
1830+-------------
1831+Some more examples to explore the various options available.
1832+
1833+**Multiple VLAN example**::
1834+
1835+ network:
1836+ version: 1
1837+ config:
1838+ - id: eth0
1839+ mac_address: d4:be:d9:a8:49:13
1840+ mtu: 1500
1841+ name: eth0
1842+ subnets:
1843+ - address: 10.245.168.16/21
1844+ dns_nameservers:
1845+ - 10.245.168.2
1846+ gateway: 10.245.168.1
1847+ type: static
1848+ type: physical
1849+ - id: eth1
1850+ mac_address: d4:be:d9:a8:49:15
1851+ mtu: 1500
1852+ name: eth1
1853+ subnets:
1854+ - address: 10.245.188.2/24
1855+ dns_nameservers: []
1856+ type: static
1857+ type: physical
1858+ - id: eth1.2667
1859+ mtu: 1500
1860+ name: eth1.2667
1861+ subnets:
1862+ - address: 10.245.184.2/24
1863+ dns_nameservers: []
1864+ type: static
1865+ type: vlan
1866+ vlan_id: 2667
1867+ vlan_link: eth1
1868+ - id: eth1.2668
1869+ mtu: 1500
1870+ name: eth1.2668
1871+ subnets:
1872+ - address: 10.245.185.1/24
1873+ dns_nameservers: []
1874+ type: static
1875+ type: vlan
1876+ vlan_id: 2668
1877+ vlan_link: eth1
1878+ - id: eth1.2669
1879+ mtu: 1500
1880+ name: eth1.2669
1881+ subnets:
1882+ - address: 10.245.186.1/24
1883+ dns_nameservers: []
1884+ type: static
1885+ type: vlan
1886+ vlan_id: 2669
1887+ vlan_link: eth1
1888+ - id: eth1.2670
1889+ mtu: 1500
1890+ name: eth1.2670
1891+ subnets:
1892+ - address: 10.245.187.2/24
1893+ dns_nameservers: []
1894+ type: static
1895+ type: vlan
1896+ vlan_id: 2670
1897+ vlan_link: eth1
1898+ - address: 10.245.168.2
1899+ search:
1900+ - dellstack
1901+ type: nameserver
1902+
1903
1904=== modified file 'doc/topics/overview.rst'
1905--- doc/topics/overview.rst 2016-06-02 08:26:30 +0000
1906+++ doc/topics/overview.rst 2016-08-29 23:08:04 +0000
1907@@ -20,7 +20,7 @@
1908 ~~~~~~~~~~~~~~~~~~~~~~~~
1909 At 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).
1910
1911-Curtin's assumption is that a fairly rich linux (Ubuntu) environment is booted.
1912+Curtin's assumption is that a fairly rich Linux (Ubuntu) environment is booted.
1913
1914 Early Commands
1915 ~~~~~~~~~~~~~~
1916@@ -38,13 +38,13 @@
1917
1918 Partitioning
1919 ~~~~~~~~~~~~
1920-Partitioning 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``.
1921+Partitioning 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``.
1922
1923 Any commands can be used to create this filesystem, but curtin contains some tools to facilitate with this process.
1924
1925 **Config Example**::
1926
1927- paritioning_commands:
1928+ partitioning_commands:
1929 10_wipe_filesystems: curtin wipe --quick --all-unused-disks
1930 50_setup_raid: curtin disk-setup --all-disks raid0 /
1931
1932@@ -53,7 +53,7 @@
1933 Partitioning commands have the following environment variables available to them:
1934
1935 - ``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.
1936-- ``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.
1937+- ``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.
1938 - ``TARGET_MOUNT_POINT``:
1939
1940
1941@@ -61,7 +61,7 @@
1942 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1943 Networking 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``.
1944
1945-Note, 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.
1946+Note, 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.
1947
1948 **Config Example**::
1949
1950@@ -73,7 +73,7 @@
1951 Networking commands have the following environment variables available to them:
1952
1953 - ``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.
1954-- ``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.
1955+- ``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.
1956
1957 Extraction of sources
1958 ~~~~~~~~~~~~~~~~~~~~~
1959@@ -84,7 +84,7 @@
1960 sources:
1961 05_primary: http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-amd64-root.tar.gz
1962
1963-Given the source above, curtin will essentiall do a::
1964+Given the source above, curtin will essentially do a::
1965
1966 wget $URL | tar -Sxvzf
1967
1968
1969=== modified file 'doc/topics/reporting.rst'
1970--- doc/topics/reporting.rst 2016-06-02 08:26:30 +0000
1971+++ doc/topics/reporting.rst 2016-08-29 23:08:04 +0000
1972@@ -7,7 +7,7 @@
1973
1974 Events
1975 ------
1976-Reporting consists of notifcation of a series of 'events. Each event has:
1977+Reporting consists of notification of a series of 'events. Each event has:
1978 - **event_type**: 'start' or 'finish'
1979 - **description**: human readable text
1980 - **name**: and id for this event
1981@@ -48,7 +48,7 @@
1982 Each entry must have a 'type'. The currently supported values are:
1983 - **log**: logs via python logger
1984 - **print**: prints messages to stdout (for debugging)
1985- - **webhook**: posts json formated data to a remote url. Supports Oauth.
1986+ - **webhook**: posts json formatted data to a remote url. Supports Oauth.
1987
1988
1989 Additionally, 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.
1990@@ -154,7 +154,7 @@
1991 Legacy Reporter
1992 ---------------
1993 The legacy 'reporter' config entry is still supported. This was utilized by
1994-MAAS for start/end and posting of the install log at the end of isntallation.
1995+MAAS for start/end and posting of the install log at the end of installation.
1996
1997 Its configuration looks like this:
1998
1999
2000=== added file 'doc/topics/storage.rst'
2001--- doc/topics/storage.rst 1970-01-01 00:00:00 +0000
2002+++ doc/topics/storage.rst 2016-08-29 23:08:04 +0000
2003@@ -0,0 +1,894 @@
2004+=======
2005+Storage
2006+=======
2007+
2008+Curtin supports a user-configurable storage layout. This format lets users
2009+(including via MAAS) to customize their machines' storage configuration by
2010+creating partitions, RAIDs, LVMs, formatting with file systems and setting
2011+mount points.
2012+
2013+Custom storage configuration is handled by the ``block-meta custom`` command
2014+in curtin. Partitioning layout is read as a list of in-order modifications to
2015+make to achieve the desired configuration. The top level configuration key
2016+containing this configuration is ``storage``. This key should contain a
2017+dictionary with at least a version number and the configuration list. The
2018+current config specification is ``version: 1``.
2019+
2020+**Config Example**::
2021+
2022+ storage:
2023+ version: 1
2024+ config:
2025+ - id: sda
2026+ type: disk
2027+ ptable: gpt
2028+ serial: QM00002
2029+ model: QEMU_HARDDISK
2030+
2031+Configuration Types
2032+-------------------
2033+Each entry in the config list is a dictionary with several keys which vary
2034+between commands. The two dictionary keys that every entry in the list needs
2035+to have are ``id: <id>`` and ``type: <type>``.
2036+
2037+An entry's ``id`` allows other entries in the config to refer to a specific
2038+entry. It can be any string other than one with a special meaning in yaml, such
2039+as ``true`` or ``none``.
2040+
2041+An entry's ``type`` tells curtin how to handle a particular entry. Available
2042+commands include:
2043+
2044+- Disk Command (``disk``)
2045+- Partition Command (``partition``)
2046+- Format Command (``format``)
2047+- Mount Command (``mount``)
2048+- LVM_VolGroup Command (``lvm_volgroup``)
2049+- LVM_Partition Command (``lvm_partition``)
2050+- DM_Crypt Command (``dm_crypt``)
2051+- RAID Command (``raid``)
2052+- Bcache Command (``bcache``)
2053+
2054+Disk Command
2055+~~~~~~~~~~~~
2056+The disk command sets up disks for use by curtin. It can wipe the disks, create
2057+partition tables, or just verify that the disks exist with an existing partition
2058+table. A disk command may contain all or some of the following keys:
2059+
2060+**ptable**: *msdos, gpt*
2061+
2062+If the ``ptable`` key is present and a valid type of partition table, curtin
2063+will create an empty partition table of that type on the disk. At the moment,
2064+msdos and gpt partition tables are supported.
2065+
2066+**serial**: *<serial number>*
2067+
2068+In order to uniquely identify a disk on the system its serial number should be
2069+specified. This ensures that even if additional storage devices
2070+are added to the system during installation, or udev rules cause the path to a
2071+disk to change curtin will still be able to correctly identify the disk it
2072+should be operating on using ``/dev/disk/by-id``.
2073+
2074+This is the preferred way to identify a disk and should be used in all
2075+production environments as it is less likely to point to an incorrect device.
2076+
2077+**path**: *<path to device with leading /dev*
2078+
2079+The ``path`` key can be used to identify the disk. If both ``serial`` and
2080+``path`` are specified, curtin will use the serial number and ignore the path
2081+that was specified.
2082+
2083+**model**: *<disk model>*
2084+
2085+This can specify the manufacturer or model of the disk. It is not currently
2086+used by curtin, but can be useful for a human reading a config file. Future
2087+versions of curtin may make use of this information.
2088+
2089+**wipe**: *superblock, superblock-recursive, zero, random*
2090+
2091+If wipe is specified, **the disk contents will be destroyed**. In the case that
2092+a disk is a part of virtual block device, like bcache, RAID array, or LVM, then
2093+curtin will attempt to tear down the virtual device to allow access to the disk
2094+for resetting the disk.
2095+
2096+The most common option for clearing a disk is ``wipe: superblock``. In some
2097+cases use of ``wipe: superblock-recursive`` is useful to ensure that embedded
2098+superblocks on a disk aren't rediscovered during probing. For example, LVM,
2099+bcache and RAID on a partition would have metadata outside of the range of a
2100+superblock wipe of the start and end sections of the disk.
2101+
2102+The ``wipe: zero`` option will write zeros to each sector of the disk.
2103+Depending on the size and speed of the disk; it may take a long time to
2104+complete.
2105+
2106+The ``wipe: random`` option will write pseudo-random data from /dev/urandom
2107+Depending on the size and speed of the disk; it may take a long time to
2108+complete.
2109+
2110+**preserve**: *true, false*
2111+
2112+When the preserve key is present and set to ``true`` curtin will attempt
2113+to use the disk without damaging data present on it. If ``preserve`` is set and
2114+``ptable`` is also set, then curtin will validate that the partition table
2115+specified by ``ptable`` exists on the disk and will raise an error if it does
2116+not. If ``preserve`` is set and ``ptable`` is not, then curtin will be able to
2117+use the disk in later commands, but will not check if the disk has a valid
2118+partition table, and will only verify that the disk exists.
2119+
2120+It can be dangerous to try to move or re-size filesystems and partitions
2121+containing data that needs to be preserved. Therefor curtin does not support
2122+preserving a disk without also preserving the partitions on it. If a disk is
2123+set to be preserved and curtin is told to move a partition on that disk,
2124+installation will stop. It is still possible to reformat partitions that do
2125+not need to be preserved.
2126+
2127+**name**: *<name>*
2128+
2129+If the ``name`` key is present, curtin will create a udev rule that makes a
2130+symbolic link to the disk with the given name value. This makes it easy to find
2131+disks on an installed system. The links are created in
2132+``/dev/disk/by-dname/<name>``.
2133+A link to each partition on the disk will also be created at
2134+``/dev/disk/by-dname/<name>-part<number>``, so if ``name: maindisk`` is set,
2135+the disk will be at ``/dev/disk/by-dname/maindisk`` and the first partition on
2136+it will be at ``/dev/disk/by-dname/maindisk-part1``.
2137+
2138+**grub_device**: *true, false*
2139+
2140+If the ``grub_device`` key is present and set to true, then when post
2141+installation hooks are run grub will be installed onto this disk. In most
2142+situations it is not necessary to specify this value as curtin will detect
2143+and determine which device to use as a boot disk. In cases where the boot
2144+device is on a special volume, such as a RAID array or a LVM Logical Volume,
2145+it may be necessary to specify the device that will hold the grub bootloader.
2146+
2147+**Config Example**::
2148+
2149+ - id: disk0
2150+ type: disk
2151+ ptable: gpt
2152+ serial: QM00002
2153+ model: QEMU_HARDDISK
2154+ name: maindisk
2155+ wipe: superblock
2156+
2157+Partition Command
2158+~~~~~~~~~~~~~~~~~
2159+The partition command creates a single partition on a disk. Curtin only needs
2160+to be told which disk to use and the size of the partition. Additional options
2161+are available.
2162+
2163+**number**: *<number>*
2164+
2165+The partition number can be specified using ``number``. However, numbers must
2166+be in order and some situations, such as extended/logical partitions on msdos
2167+partition tables will require special numbering, so it maybe better to omit
2168+the partition number. If the ``number`` key is not present, curtin will attempt
2169+determine the right number to use.
2170+
2171+**size**: *<size>*
2172+
2173+The partition size can be specified with the ``size`` key. Sizes must be
2174+given with an appropriate SI unit, such as *B, kB, MB, GB, TB*, or using just
2175+the appropriate SI prefix, i.e. *B, k, M, G, T...*
2176+
2177+.. note::
2178+
2179+ Curtin does not adjust size values. If you specific a size that exceeds the
2180+ capacity of a device then installation will fail.
2181+
2182+**device**: *<device id>*
2183+
2184+The ``device`` key refers to the ``id`` of a disk in the storage configuration.
2185+The disk entry must already be defined in the list of commands to ensure that
2186+it has already been processed.
2187+
2188+**wipe**: *superblock, pvremove, zero, random*
2189+
2190+After the partition is added to the disk's partition table, curtin can run a
2191+wipe command on the partition. The wipe command values are the sames as for
2192+disks.
2193+
2194+**flag**: *logical, extended, boot, bios_grub, swap, lvm, raid, home, prep*
2195+
2196+If the ``flag`` key is present, curtin will set the specified flag on the
2197+partition. Note that some flags only apply to msdos partition tables, and some
2198+only apply to gpt partition tables.
2199+
2200+The *logical/extended* partition flags can be used to create logical partitions
2201+on a msdos table. An extended partition should be created containing all of the
2202+empty space on the drive, and logical partitions can be created within it. A
2203+extended partition must already be present to create logical partitions. If the
2204+``number`` flag is set for an extended partition it must be set to 4, and
2205+each logical partition should be numbered starting from 5.
2206+
2207+On msdos partition tables, the *boot* flag sets the boot parameter to that
2208+partition. On gpt partition tables, the boot flag sets the esp flag on the
2209+partition.
2210+
2211+If the host system for curtin has been booted using UEFI then curtin will
2212+install grub to the esp partition. If the system installation media
2213+has been booted using an MBR, grub will be installed onto the disk's MBR.
2214+However, on a disk with a gpt partition table, there is not enough space after
2215+the MBR for grub to store its second stage core.img, so a small un-formatted
2216+partition with the *bios_grub* flag is needed. This partition should be placed
2217+at the beginning of the disk and should be 1MB in size. It should not contain a
2218+filesystem or be mounted anywhere on the system.
2219+
2220+**preserve**: *true, false*
2221+
2222+If the preserve flag is set to true, curtin will verify that the partition
2223+exists and will not modify the partition.
2224+
2225+**Config Example**::
2226+
2227+ - id: disk0-part1
2228+ type: partition
2229+ number: 1
2230+ size: 8GB
2231+ device: disk0
2232+ flag: boot
2233+
2234+Format Command
2235+~~~~~~~~~~~~~~
2236+The format command makes filesystems on a volume. The filesystem type and
2237+target volume can be specified, as well as a few other options.
2238+
2239+**fstype**: ext4, ext3, fat32, fat16, swap, xfs
2240+
2241+The ``fstype`` key specifies what type of filesystem format curtin should use
2242+for this volume. Curtin knows about common Linux filesystems such as ext4/3 and
2243+fat filesystems and makes use of additional parameters and flags to optimize the
2244+filesystem. If the ``fstype`` value is not known to curtin, that is not fatal.
2245+Curtin will check if ``mkfs.<fstype>`` exists and if so, will use that tool to
2246+format the target volume.
2247+
2248+For fat filesystems, the size of the fat table can be specified by entering
2249+*fat64*, *fat32*, *fat16*, or *fat12* instead of just entering *fat*.
2250+If *fat* is used, then ``mkfs.fat`` will automatically determine the best
2251+size fat table to use, probably *fat32*.
2252+
2253+If ``fstype: swap`` is set, curtin will create a swap partition on the target
2254+volume.
2255+
2256+**volume**: *<volume id>*
2257+
2258+The ``volume`` key refers to the ``id`` of the target volume in the storage
2259+config. The target volume must already exist and be accessible. Any type
2260+of target volume can be used as long as it has a block device that curtin
2261+can locate.
2262+
2263+**label**: *<volume name>*
2264+
2265+The ``label`` key tells curtin to create a filesystem LABEL when formatting a
2266+volume. Note that not all filesystem types support names and that there are
2267+length limits for names. For fat filesystems, names are limited to 11
2268+characters. For ext4/3 filesystems, names are limited to 16 characters.
2269+
2270+If curtin does not know about the filesystem type it is using, then the
2271+``label`` key will be ignored, because curtin will not know the correct flags
2272+to set the label value in the filesystem metadata.
2273+
2274+**uuid**: *<uuid>*
2275+
2276+If the ``uuid`` key is set and ``fstype`` is set to *ext4* or *ext3*, then
2277+curtin will set the uuid of the new filesystem to the specified value.
2278+
2279+**preserve**: *true, false*
2280+
2281+If the ``preserve`` key is set to true, curtin will not format the partition.
2282+
2283+**Config Example**::
2284+
2285+ - id: disk0-part1-fs1
2286+ type: format
2287+ fstype: ext4
2288+ label: cloud-image
2289+ volume: disk0-part1
2290+
2291+Mount Command
2292+~~~~~~~~~~~~~
2293+The mount command mounts the target filesystem and creates an entry for it in
2294+the newly installed system's ``/etc/fstab``. The path to the target mountpoint
2295+must be specified as well as the target filesystem.
2296+
2297+**path**: *<path>*
2298+
2299+The ``path`` key tells curtin where the filesystem should be mounted on the
2300+target system. An entry in the target system's ``/etc/fstab`` will be created
2301+for the target device which will mount it in the correct place once the
2302+installed system boots.
2303+
2304+If the device specified is formatted as swap space, then an entry will be added
2305+to the target system's ``/etc/fstab`` to make use of this swap space.
2306+
2307+When entries are created in ``/etc/fstab``, curtin will use the most reliable
2308+method available to identify each device. For regular partitions, curtin will
2309+use the UUID of the filesystem present on the partition. For special devices,
2310+such as RAID arrays, or LVM logical volumes, curtin will use their normal path
2311+in ``/dev``.
2312+
2313+**device**: *<device id>*
2314+
2315+The ``device`` key refers to the ``id`` of the target device in the storage
2316+config. The target device must already contain a valid filesystem and be
2317+accessible.
2318+
2319+**Config Example**::
2320+
2321+ - id: disk0-part1-fs1-mount0
2322+ type: mount
2323+ path: /home
2324+ device: disk0-part1-fs1
2325+
2326+Lvm Volgroup Command
2327+~~~~~~~~~~~~~~~~~~~~
2328+The lvm_volgroup command creates LVM Physical Volumes (PV) and connects them in
2329+a LVM Volume Group (vg). The command requires a name for the volgroup and a
2330+list of the devices that should be used as physical volumes.
2331+
2332+**name**: *<name>*
2333+
2334+The ``name`` key specifies the name of the volume group. It anything can be
2335+used except words with special meanings in YAML, such as *true*, or *none*.
2336+
2337+**devices**: *[]*
2338+
2339+The ``devices`` key gives a list of devices to use as physical volumes. Each
2340+device is specified using the ``id`` of existing devices in the storage config.
2341+Almost anything can be used as a device such as partitions, whole disks, RAID.
2342+
2343+**Config Example**::
2344+
2345+ - id: volgroup1
2346+ type: lvm_volgroup
2347+ name: vg1
2348+ devices:
2349+ - disk0-part2
2350+ - disk1
2351+
2352+Lvm Partition Command
2353+~~~~~~~~~~~~~~~~~~~~~
2354+The lvm_partition command creates a lvm logical volume on the specified
2355+volgroup with the specified size. It also assigns it the specified name.
2356+
2357+**name**: *<name>*
2358+
2359+The ``name`` key specifies the name of the Logical Volume (LV) to be created.
2360+
2361+Curtin creates udev rules for Logical Volumes to give them consistently named
2362+symbolic links in the target system under ``/dev/disk/by-dname/``. The naming
2363+scheme for Logical Volumes follows the pattern
2364+``<volgroup name>-<logical volume name>``. For example a ``lvm_partition``
2365+with ``name`` *lv1* on a ``lvm_volgroup`` named *vg1* would have the path
2366+``/dev/disk/by-dname/vg1-lv1``.
2367+
2368+**volgroup**: *<volgroup id>*
2369+
2370+The ``volgroup`` key specifies the ``id`` of the Volume Group in which to
2371+create the logical volume. The volgroup must already have been created and must
2372+have enough free space on it to create the logical volume. The volgroup should
2373+be specified using the ``id`` key of the volgroup in the storage config, not the
2374+name of the volgroup.
2375+
2376+**size**: *<size>*
2377+
2378+The ``size`` key tells curtin what size to make the logical volume. The size
2379+can be entered in any format that can be processed by the lvm2 tools, so a
2380+number followed by a SI unit should work, i.e. *B, kB, MB, GB, TB*.
2381+
2382+If the ``size`` key is omitted then all remaining space on the volgroup will be
2383+used for the logical volume.
2384+
2385+.. note::
2386+
2387+ Curtin does not adjust size values. If you specific a size that exceeds the
2388+ capacity of a device then installation will fail.
2389+
2390+
2391+**Config Example**::
2392+
2393+ - id: lvm_partition_1
2394+ type: lvm_partition
2395+ name: lv1
2396+ volgroup: volgroup1
2397+ size: 10G
2398+
2399+
2400+**Combined Example**::
2401+
2402+ - id: volgroup1
2403+ type: lvm_volgroup
2404+ name: vg1
2405+ devices:
2406+ - disk0-part2
2407+ - disk1
2408+ - id: lvm_partition_1
2409+ type: lvm_partition
2410+ name: lv1
2411+ volgroup: volgroup1
2412+ size: 10G
2413+
2414+
2415+
2416+Dm-Crypt Command
2417+~~~~~~~~~~~~~~~~
2418+The dm_crypt command creates encrypted volumes using ``cryptsetup``. It
2419+requires a name for the encrypted volume, the volume to be encrypted and a key.
2420+Note that this should not be used for systems where security is a requirement.
2421+The key is stored in plain-text in the storage configuration and it could be
2422+possible for the storage configuration to be intercepted between the utility
2423+that generates it and curtin.
2424+
2425+**volume**: *<volume id>*
2426+
2427+The ``volume`` key gives the volume that is to be encrypted.
2428+
2429+**dm_name**: *<name>*
2430+
2431+The ``name`` key specifies the name of the encrypted volume.
2432+
2433+**key**: *<key>*
2434+
2435+The ``key`` key specifies the password of the encryption key. The target
2436+system will prompt for this password in order to mount the disk.
2437+
2438+.. note::
2439+
2440+ Encrypted disks and partitions are tracked in ``/etc/crypttab`` and will be
2441+ mounted at boot time.
2442+
2443+**Config Example**::
2444+
2445+ - id: lvm_partition_1
2446+ type: dm_crypt
2447+ dm_name: crypto
2448+ volume: sdb1
2449+ key: testkey
2450+
2451+RAID Command
2452+~~~~~~~~~~~~
2453+The RAID command configures Linux Software RAID using mdadm. It needs to be given
2454+a name for the md device, a list of volumes for to compose the md device, an
2455+optional list of devices to be used as spare volumes, and RAID level.
2456+
2457+**name**: *<name>*
2458+
2459+The ``name`` key specifies the name of the md device.
2460+
2461+.. note::
2462+
2463+ Curtin creates a udev rule to create a link to the md device in
2464+ ``/dev/disk/by-dname/<name>`` using the specified name.
2465+
2466+**raidlevel**: *0, 1, 5, 6, 10*
2467+
2468+The ``raidlevel`` key specifies the raid level of the array.
2469+
2470+**devices**: *[]*
2471+
2472+The ``devices`` key specifies a list of the devices that will be used for the
2473+raid array. Each device must be referenced by ``id`` and the device must be
2474+previously defined in the storage configuration. Must not be empty.
2475+
2476+Devices can either be full disks or partition.
2477+
2478+
2479+**spare_devices**: *[]*
2480+
2481+The ``spare_devices`` key specifies a list of the devices that will be used for
2482+spares in the raid array. Each device must be referenced by ``id`` and the
2483+device must be previously defined in the storage configuration. May be empty.
2484+
2485+
2486+**Config Example**::
2487+
2488+ - id: raid_array
2489+ type: raid
2490+ name: md0
2491+ raidlevel: 1
2492+ devices:
2493+ - sdb
2494+ - sdc
2495+ spare_devices:
2496+ - sdd
2497+
2498+Bcache Command
2499+~~~~~~~~~~~~~~
2500+The bcache command will configure a block-cache device using the Linux kernel
2501+bcache module. Bcache allows users to use a typically small, but fast SSD or
2502+NVME device as a cache for larger, slower spinning disks.
2503+
2504+The bcache command needs to be told which device to use hold the data and which
2505+device to use as its cache device. A cache device may be reused with multiple
2506+backing devices.
2507+
2508+
2509+**backing_device**: *<device id>*
2510+
2511+The ``backing_device`` key specifies the item in storage configuration to use
2512+as the backing device. This can be any device that would normally be used with
2513+a filesystem on it, such as a partition or a raid array.
2514+
2515+**cache_device**: *<device id>*
2516+
2517+The ``cache_device`` key specifies the item in the storage configuration to use
2518+as the cache device. This can be a partition or a whole disk. It should be on a
2519+ssd in most cases, as bcache is designed around the performance characteristics
2520+of a ssd.
2521+
2522+**cache_mode**: *writethrough, writeback, writearound, none*
2523+
2524+The ``cache_mode`` key specifies the mode in which bcache operates. The
2525+default mode is writethrough which ensures data hits the backing device
2526+before completing the operation. writeback mode will have higher performance
2527+but exposes dataloss if the cache device fails. writearound will avoid using
2528+the cache for large sequential writes; useful for not evicting smaller
2529+reads/writes from the cache. None effectively disables bcache.
2530+
2531+**name**: *<name>*
2532+
2533+If the ``name`` key is present, curtin will create a link to the device at
2534+``/dev/disk/by-dname/<name>``.
2535+
2536+**Config Example**::
2537+
2538+ - id: bcache0
2539+ type: bcache
2540+ name: cached_raid
2541+ backing_device: raid_array
2542+ cache_device: sdb
2543+
2544+
2545+Additional Examples
2546+-------------------
2547+
2548+Learn by examples.
2549+
2550+- Basic
2551+- LVM
2552+- Bcache
2553+- RAID Boot
2554+- RAID5 + Bcache
2555+
2556+Basic Layout
2557+~~~~~~~~~~~~
2558+
2559+::
2560+
2561+ storage:
2562+ version: 1
2563+ config:
2564+ - id: disk0
2565+ type: disk
2566+ ptable: msdos
2567+ model: QEMU HARDDISK
2568+ path: /dev/vdb
2569+ name: main_disk
2570+ wipe: superblock
2571+ grub_device: true
2572+ - id: disk0-part1
2573+ type: partition
2574+ number: 1
2575+ size: 3GB
2576+ device: disk0
2577+ flag: boot
2578+ - id: disk0-part2
2579+ type: partition
2580+ number: 2
2581+ size: 1GB
2582+ device: disk0
2583+ - id: disk0-part1-format-root
2584+ type: format
2585+ fstype: ext4
2586+ volume: disk0-part1
2587+ - id: disk0-part2-format-home
2588+ type: format
2589+ fstype: ext4
2590+ volume: disk0-part2
2591+ - id: disk0-part1-mount-root
2592+ type: mount
2593+ path: /
2594+ device: disk0-part1-format-root
2595+ - id: disk0-part2-mount-home
2596+ type: mount
2597+ path: /home
2598+ device: disk0-part2-format-home
2599+
2600+LVM
2601+~~~
2602+
2603+::
2604+
2605+ storage:
2606+ version: 1
2607+ config:
2608+ - id: sda
2609+ type: disk
2610+ ptable: msdos
2611+ model: QEMU HARDDISK
2612+ path: /dev/vdb
2613+ name: main_disk
2614+ - id: sda1
2615+ type: partition
2616+ size: 3GB
2617+ device: sda
2618+ flag: boot
2619+ - id: sda_extended
2620+ type: partition
2621+ size: 5G
2622+ flag: extended
2623+ device: sda
2624+ - id: sda2
2625+ type: partition
2626+ size: 2G
2627+ flag: logical
2628+ device: sda
2629+ - id: sda3
2630+ type: partition
2631+ size: 3G
2632+ flag: logical
2633+ device: sda
2634+ - id: volgroup1
2635+ name: vg1
2636+ type: lvm_volgroup
2637+ devices:
2638+ - sda2
2639+ - sda3
2640+ - id: lvmpart1
2641+ name: lv1
2642+ size: 1G
2643+ type: lvm_partition
2644+ volgroup: volgroup1
2645+ - id: lvmpart2
2646+ name: lv2
2647+ type: lvm_partition
2648+ volgroup: volgroup1
2649+ - id: sda1_root
2650+ type: format
2651+ fstype: ext4
2652+ volume: sda1
2653+ - id: lv1_fs
2654+ name: storage
2655+ type: format
2656+ fstype: fat32
2657+ volume: lvmpart1
2658+ - id: lv2_fs
2659+ name: storage
2660+ type: format
2661+ fstype: ext3
2662+ volume: lvmpart2
2663+ - id: sda1_mount
2664+ type: mount
2665+ path: /
2666+ device: sda1_root
2667+ - id: lv1_mount
2668+ type: mount
2669+ path: /srv/data
2670+ device: lv1_fs
2671+ - id: lv2_mount
2672+ type: mount
2673+ path: /srv/backup
2674+ device: lv2_fs
2675+
2676+Bcache
2677+~~~~~~
2678+
2679+::
2680+
2681+ storage:
2682+ version: 1
2683+ config:
2684+ - id: id_rotary0
2685+ type: disk
2686+ name: rotary0
2687+ path: /dev/vdb
2688+ ptable: msdos
2689+ wipe: superblock
2690+ grub_device: true
2691+ - id: id_ssd0
2692+ type: disk
2693+ name: ssd0
2694+ path: /dev/vdc
2695+ wipe: superblock
2696+ - id: id_rotary0_part1
2697+ type: partition
2698+ name: rotary0-part1
2699+ device: id_rotary0
2700+ number: 1
2701+ size: 999M
2702+ wipe: superblock
2703+ - id: id_rotary0_part2
2704+ type: partition
2705+ name: rotary0-part2
2706+ device: id_rotary0
2707+ number: 2
2708+ size: 9G
2709+ wipe: superblock
2710+ - id: id_bcache0
2711+ type: bcache
2712+ name: bcache0
2713+ backing_device: id_rotary0_part2
2714+ cache_device: id_ssd0
2715+ cache_mode: writeback
2716+ - id: bootfs
2717+ type: format
2718+ label: boot-fs
2719+ volume: id_rotary0_part1
2720+ fstype: ext4
2721+ - id: rootfs
2722+ type: format
2723+ label: root-fs
2724+ volume: id_bcache0
2725+ fstype: ext4
2726+ - id: rootfs_mount
2727+ type: mount
2728+ path: /
2729+ device: rootfs
2730+ - id: bootfs_mount
2731+ type: mount
2732+ path: /boot
2733+ device: bootfs
2734+
2735+RAID Boot
2736+~~~~~~~~~
2737+
2738+::
2739+
2740+ storage:
2741+ version: 1
2742+ config:
2743+ - id: sda
2744+ type: disk
2745+ ptable: gpt
2746+ model: QEMU HARDDISK
2747+ path: /dev/vdb
2748+ name: main_disk
2749+ grub_device: 1
2750+ - id: bios_boot_partition
2751+ type: partition
2752+ size: 1MB
2753+ device: sda
2754+ flag: bios_grub
2755+ - id: sda1
2756+ type: partition
2757+ size: 3GB
2758+ device: sda
2759+ - id: sdb
2760+ type: disk
2761+ ptable: gpt
2762+ model: QEMU HARDDISK
2763+ path: /dev/vdc
2764+ name: second_disk
2765+ - id: sdb1
2766+ type: partition
2767+ size: 3GB
2768+ device: sdb
2769+ - id: sdc
2770+ type: disk
2771+ ptable: gpt
2772+ model: QEMU HARDDISK
2773+ path: /dev/vdd
2774+ name: third_disk
2775+ - id: sdc1
2776+ type: partition
2777+ size: 3GB
2778+ device: sdc
2779+ - id: mddevice
2780+ name: md0
2781+ type: raid
2782+ raidlevel: 5
2783+ devices:
2784+ - sda1
2785+ - sdb1
2786+ - sdc1
2787+ - id: md_root
2788+ type: format
2789+ fstype: ext4
2790+ volume: mddevice
2791+ - id: md_mount
2792+ type: mount
2793+ path: /
2794+ device: md_root
2795+
2796+
2797+RAID5 + Bcache
2798+~~~~~~~~~~~~~~
2799+
2800+::
2801+
2802+ storage:
2803+ config:
2804+ - grub_device: true
2805+ id: sda
2806+ model: QEMU HARDDISK
2807+ name: sda
2808+ ptable: msdos
2809+ path: /dev/vdb
2810+ type: disk
2811+ wipe: superblock
2812+ - id: sdb
2813+ model: QEMU HARDDISK
2814+ name: sdb
2815+ path: /dev/vdc
2816+ type: disk
2817+ wipe: superblock
2818+ - id: sdc
2819+ model: QEMU HARDDISK
2820+ name: sdc
2821+ path: /dev/vdd
2822+ type: disk
2823+ wipe: superblock
2824+ - id: sdd
2825+ model: QEMU HARDDISK
2826+ name: sdd
2827+ path: /dev/vde
2828+ type: disk
2829+ wipe: superblock
2830+ - id: sde
2831+ model: QEMU HARDDISK
2832+ name: sde
2833+ path: /dev/vdf
2834+ type: disk
2835+ wipe: superblock
2836+ - devices:
2837+ - sdc
2838+ - sdd
2839+ - sde
2840+ id: md0
2841+ name: md0
2842+ raidlevel: 5
2843+ spare_devices: []
2844+ type: raid
2845+ - device: sda
2846+ id: sda-part1
2847+ name: sda-part1
2848+ number: 1
2849+ size: 1000001536B
2850+ type: partition
2851+ uuid: 3a38820c-d675-4069-b060-509a3d9d13cc
2852+ wipe: superblock
2853+ - device: sda
2854+ id: sda-part2
2855+ name: sda-part2
2856+ number: 2
2857+ size: 7586787328B
2858+ type: partition
2859+ uuid: 17747faa-4b9e-4411-97e5-12fd3d199fb8
2860+ wipe: superblock
2861+ - backing_device: sda-part2
2862+ cache_device: sdb
2863+ cache_mode: writeback
2864+ id: bcache0
2865+ name: bcache0
2866+ type: bcache
2867+ - fstype: ext4
2868+ id: sda-part1_format
2869+ label: ''
2870+ type: format
2871+ uuid: 71b1ef6f-5cab-4a77-b4c8-5a209ec11d7c
2872+ volume: sda-part1
2873+ - fstype: ext4
2874+ id: md0_format
2875+ label: ''
2876+ type: format
2877+ uuid: b031f0a0-adb3-43be-bb43-ce0fc8a224a4
2878+ volume: md0
2879+ - fstype: ext4
2880+ id: bcache0_format
2881+ label: ''
2882+ type: format
2883+ uuid: ce45bbaf-5a44-4487-b89e-035c2dd40657
2884+ volume: bcache0
2885+ - device: bcache0_format
2886+ id: bcache0_mount
2887+ path: /
2888+ type: mount
2889+ - device: sda-part1_format
2890+ id: sda-part1_mount
2891+ path: /boot
2892+ type: mount
2893+ - device: md0_format
2894+ id: md0_mount
2895+ path: /srv/data
2896+ type: mount
2897+ version: 1
2898
2899=== modified file 'setup.py'
2900--- setup.py 2015-08-31 14:19:25 +0000
2901+++ setup.py 2016-08-29 23:08:04 +0000
2902@@ -2,7 +2,7 @@
2903 from glob import glob
2904 import os
2905
2906-VERSION = '0.1.0'
2907+import curtin
2908
2909
2910 def is_f(p):
2911@@ -11,7 +11,7 @@
2912 setup(
2913 name="curtin",
2914 description='The curtin installer',
2915- version=VERSION,
2916+ version=curtin.__version__,
2917 author='Scott Moser',
2918 author_email='scott.moser@canonical.com',
2919 license="AGPL",
2920
2921=== modified file 'tox.ini'
2922--- tox.ini 2016-07-27 19:46:21 +0000
2923+++ tox.ini 2016-08-29 23:08:04 +0000
2924@@ -57,6 +57,7 @@
2925 [testenv:docs]
2926 deps = {[testenv]deps}
2927 sphinx
2928+ sphinx-rtd-theme
2929 commands =
2930 sphinx-build -b html -d doc/_build/doctrees doc/ doc/_build/html
2931

Subscribers

People subscribed via source and target branches