bootstrap-vz/manifests/README.rst

238 lines
9.6 KiB
ReStructuredText
Raw Normal View History

2015-04-19 17:06:17 +02:00
The manifest file is the primary way to interact with bootstrap-vz.
Every configuration and customization of a Debian installation is specified in this file.
2015-04-11 16:40:16 +02:00
The manifest format is YAML or JSON. It is near impossible to run the
bootstrapper with an invalid configuration, since every part of the
framework supplies a `json-schema <http://json-schema.org/>`__ that
specifies exactly which configuration settings are valid in different
situations.
Manifest variables
------------------
Many of the settings in the example manifests use strings like
``debian-{system.release}-{system.architecture}-{{"{%y"}}}{{"{%m"}}}{{"{%d"}}}``.
These strings make use of manifest variables, which can cross reference
other settings in the manifest or specific values supplied by the
bootstrapper (e.g. all python date formatting variables are available).
Any reference uses dots to specify a path to the desired manifest
setting. Not all settings support this though, to see whether embedding
a manifest variable in a setting is possible, look for the
2015-04-19 17:06:17 +02:00
``manifest vars`` label.
2015-04-11 16:40:16 +02:00
Sections
--------
The manifest is split into 7 sections.
Provider
~~~~~~~~
The provider section contains all provider specific settings and the
name of the provider itself.
2015-04-19 17:06:17 +02:00
- ``name``: target virtualization platform of the installation
``required``
2015-04-11 16:40:16 +02:00
Consult the `providers <../bootstrapvz/providers>`__ section of the documentation
2015-04-11 16:40:16 +02:00
for a list of valid values.
Bootstrapper
~~~~~~~~~~~~
This section concerns the bootstrapper itself and its behavior. There
are 4 possible settings:
2015-04-19 17:06:17 +02:00
- ``workspace``: Path to where the bootstrapper should place images
2015-04-11 16:40:16 +02:00
and intermediate files. Any volumes will be mounted under that path.
2015-04-19 17:06:17 +02:00
``required``
- ``tarball``: debootstrap has the option to download all the
2015-04-11 16:40:16 +02:00
software and pack it up in a tarball. When starting the actual
bootstrapping process, debootstrap can then be pointed at that
tarball and use it instead of downloading anything from the internet.
If you plan on running the bootstrapper multiple times, this option
can save you a lot of bandwidth and time. This option just specifies
whether it should create a new tarball or not. It will search for and
use an available tarball if it already exists, regardless of this
setting.
2015-04-19 17:06:17 +02:00
``optional``
2015-04-11 16:40:16 +02:00
Valid values: ``true, false``
Default: ``false``
2015-04-19 17:06:17 +02:00
- ``mirror``: The mirror debootstrap should download software from.
2015-04-11 16:40:16 +02:00
It is advisable to specify a mirror close to your location (or the
location of the host you are bootstrapping on), to decrease latency
and improve bandwidth. If not specified, `the configured aptitude
mirror URL <#packages>`__ is used.
2015-04-19 17:06:17 +02:00
``optional``
- ``include_packages``: Extra packages to be installed during
2015-04-11 16:40:16 +02:00
bootstrap. Accepts a list of package names.
2015-04-19 17:06:17 +02:00
``optional``
- ``exclude_packages``: Packages to exclude during bootstrap phase.
2015-04-11 16:40:16 +02:00
Accepts a list of package names.
2015-04-19 17:06:17 +02:00
``optional``
- ``guest_additions``: This setting is only relevant for the
2015-04-19 17:09:20 +02:00
`virtualbox provider <../bootstrapvz/providers/virtualbox>`__.
2015-04-12 14:32:47 +02:00
It specifies the path to the VirtualBox Guest Additions ISO, which, when specified,
2015-04-11 16:40:16 +02:00
will be mounted and used to install the VirtualBox Guest Additions.
2015-04-19 17:06:17 +02:00
``optional``
2015-04-11 16:40:16 +02:00
Image
~~~~~
The image section configures anything pertaining directly to the image
that will be created.
2015-04-19 17:06:17 +02:00
- ``name``: The name of the resulting image.
2015-04-11 16:40:16 +02:00
When bootstrapping cloud images, this would be the name visible in
the interface when booting up new instances.
When bootstrapping for VirtualBox or kvm, it's the filename of the
image.
2015-04-19 17:06:17 +02:00
``required``
``manifest vars``
- ``bucket``: When bootstrapping an S3 backed image for AWS, this
2015-04-11 16:40:16 +02:00
will be the bucket where the image is uploaded to.
2015-04-19 17:06:17 +02:00
``required for S3 backing``
- ``region``: Region in which the AMI should be registered.
``required for S3 backing``
2015-04-11 16:40:16 +02:00
System
~~~~~~
This section defines anything that pertains directly to the bootstrapped
system and does not fit under any other section.
2015-04-19 17:06:17 +02:00
- ``architecture``: The architecture of the system.
2015-04-11 16:40:16 +02:00
Valid values: ``i386, amd64``
2015-04-19 17:06:17 +02:00
``required``
- ``bootloader``: The bootloader for the system. Depending on the
2015-04-11 16:40:16 +02:00
bootmethod of the virtualization platform, the options may be
restricted.
Valid values: ``grub, extlinux, pv-grub``
2015-04-19 17:06:17 +02:00
``required``
- ``charmap``: The default charmap of the system.
Valid values: Any valid charmap like ``UTF-8``, ``ISO-8859-`` or
2015-04-11 16:40:16 +02:00
``GBK``.
2015-04-19 17:06:17 +02:00
``required``
- ``hostname``: hostname to preconfigure the system with.
``optional``
- ``locale``: The default locale of the system.
2015-04-11 16:40:16 +02:00
Valid values: Any locale mentioned in ``/etc/locale.gen``
2015-04-19 17:06:17 +02:00
``required``
- ``release``: Defines which debian release should be bootstrapped.
2015-04-11 16:40:16 +02:00
Valid values: ``squeeze``, ``wheezy``, ``jessie``, ``sid``,
``oldstable``, ``stable``, ``testing``, ``unstable``
2015-04-19 17:06:17 +02:00
``required``
- ``timezone``: Timezone of the system.
2015-04-11 16:40:16 +02:00
Valid values: Any filename from ``/usr/share/zoneinfo``
2015-04-19 17:06:17 +02:00
``required``
2015-04-11 16:40:16 +02:00
Packages
~~~~~~~~
The packages section allows you to install custom packages from a
variety of sources.
2015-04-19 17:06:17 +02:00
- ``install``: A list of strings that specify which packages should
be installed. Valid values: Package names optionally followed by a
2015-04-11 16:40:16 +02:00
``/target`` or paths to local ``.deb`` files.
Note that packages are installed in the order they are listed.
The installer invocations are bundled by package type (remote or local),
meaning if you install two local packages, then two remote packages
and then another local package, there will be two calls to ``dpkg -i ...``
and a single call to ``apt-get install ...``.
2015-04-19 17:06:17 +02:00
- ``install_standard``: Defines if the packages of the
2015-04-11 16:40:16 +02:00
``"Standard System Utilities"`` option of the Debian installer,
provided by `tasksel <https://wiki.debian.org/tasksel>`__, should be
installed or not. The problem is that with just ``debootstrap``, the
system ends up with very basic commands. This is not a problem for a
machine that will not be used interactively, but otherwise it is nice
to have at hand tools like ``bash-completion``, ``less``, ``locate``,
etc.
2015-04-19 17:06:17 +02:00
``optional``
2015-04-11 16:40:16 +02:00
Valid values: ``true``, ``false``
Default: ``false``
2015-04-19 17:06:17 +02:00
- ``mirror``: The default aptitude mirror.
``optional``
Default: ``http://httpredir.debian.org/debian/``
2015-04-19 17:06:17 +02:00
- ``sources``: A map of additional sources that should be added to
2015-04-11 16:40:16 +02:00
the aptitude sources list. The key becomes the filename in
``/etc/apt/sources.list.d/`` (with ``.list`` appended to it), while
the value is an array with each entry being a line.
2015-04-19 17:06:17 +02:00
``optional``
- ``components``: A list of components that should be added to the
2015-04-11 16:40:16 +02:00
default apt sources. For example ``contrib`` or ``non-free``
2015-04-19 17:06:17 +02:00
``optional``
2015-04-11 16:40:16 +02:00
Default: ``['main']``
2015-04-19 17:06:17 +02:00
- ``trusted-keys``: List of paths to ``.gpg`` keyrings that should
2015-04-11 16:40:16 +02:00
be added to the aptitude keyring of trusted signatures for
repositories.
2015-04-19 17:06:17 +02:00
``optional``
- ``preferences``: Allows you to pin packages through `apt
2015-04-11 16:40:16 +02:00
preferences <https://wiki.debian.org/AptPreferences>`__. The setting
is an object where the key is the preference filename in
``/etc/apt/preferences.d/``. The key ``main`` is special and refers
to the file ``/etc/apt/preferences``, which will be overwritten if
specified.
2015-04-19 17:06:17 +02:00
``optional``
2015-04-11 16:40:16 +02:00
The values are objects with three keys:
2015-04-19 17:06:17 +02:00
- ``package``: The package to pin (wildcards allowed)
- ``pin``: The release to pin the package to.
- ``pin-priority``: The priority of this pin.
2015-04-11 16:40:16 +02:00
Volume
~~~~~~
bootstrap-vz allows a wide range of options for configuring the disk
layout of the system. It can create unpartitioned as well as partitioned
volumes using either the gpt or msdos scheme. At most, there are only
three partitions with predefined roles configurable though. They are
boot, root and swap.
2015-04-19 17:06:17 +02:00
- ``backing``: Specifies the volume backing. This setting is very
2015-04-11 16:40:16 +02:00
provider specific.
Valid values: ``ebs``, ``s3``, ``vmdk``, ``vdi``, ``raw``
2015-04-19 17:06:17 +02:00
``required``
- ``partitions``: A map of the partitions that should be created on
2015-04-11 16:40:16 +02:00
the volume.
2015-04-19 17:06:17 +02:00
- ``type``: The partitioning scheme to use. When using ``none``,
2015-04-11 16:40:16 +02:00
only root can be specified as a partition.
Valid values: ``none``, ``gpt``, ``msdos``
2015-04-19 17:06:17 +02:00
``required``
- ``root``: Configuration of the root partition. ``required``
2015-04-11 16:40:16 +02:00
2015-04-19 17:06:17 +02:00
- ``size``: The size of the partition. Valid values: Any
2015-04-11 16:40:16 +02:00
datasize specification up to TB (e.g. 5KiB, 1MB, 6TB).
2015-04-19 17:06:17 +02:00
``required``
- ``filesystem``: The filesystem of the partition. When choosing
2015-04-11 16:40:16 +02:00
``xfs``, the ``xfsprogs`` package will need to be installed.
Valid values: ``ext2``, ``ext3``, ``ext4``, ``xfs``
2015-04-19 17:06:17 +02:00
``required``
- ``format_command``: Command to format the partition with. This
2015-04-11 16:40:16 +02:00
optional setting overrides the command bootstrap-vz would normally
use to format the partition. The command is specified as a string
array where each option/argument is an item in that array (much
like the `commands <../bootstrapvz/plugins/commands>`__ plugin).
2015-04-19 17:06:17 +02:00
``optional`` The following variables are available:
- ``{fs}``: The filesystem of the partition.
- ``{device_path}``: The device path of the partition.
- ``{size}``: The size of the partition.
2015-04-11 16:40:16 +02:00
The default command used by boostrap-vz is
``['mkfs.{fs}', '{device_path}']``.
2015-04-19 17:06:17 +02:00
- ``boot``: Configuration of the boot partition. The three
2015-04-11 16:40:16 +02:00
settings equal those of the root partition.
2015-04-19 17:06:17 +02:00
``optional``
- ``swap``: Configuration of the swap partition. Since the swap
2015-04-11 16:40:16 +02:00
partition has its own filesystem you can only specify the size for
this partition.
2015-04-19 17:06:17 +02:00
``optional``
2015-04-11 16:40:16 +02:00
Plugins
~~~~~~~
The plugins section is a map of plugin names to whatever configuration a
plugin requires. Go to the `plugin section <../bootstrapvz/plugins>`__
2015-04-12 14:32:47 +02:00
of the documentation, to see the configuration for a specific plugin.