|Work in progress|
Appliance definition files are written in YAML. If you don’t know YAML, read more here, it’s really easy to understand!
Let’s start with a small example:
Every appliance definition file consists of one or more sections. Let’s discuss them.
Only the name, os/name and os/version is required. Every other section can be omitted, and defaults will be used.
This is a name for your appliance. It must be unique in all of your appliances and match the file name.
A small (one sentence or such) summary of the appliance; purpose, goals, etc.
The appliances section is designed to reuse appliances in new definitions. For example, you can create a template for your appliances, and then create a new specialized definition with your appliance template as a dependency; it’ll automatically be merged into one behind the scenes.
Example appliances section:
This section contains all of the packages you wish to add to your appliance. By default minimal packages set will be installed for selected operating system.
Example packages section:
In this section you can specify additional repositories in order to add packages to your appliance that are sourced from these repositories.
|Name of repository is required|
You must specify name of the repository you want to add. This must be one word without any special characters.
There are two types of link:
- mirrorlist, and
Notice that you can use #BASE_ARCH# tag to substitute architecture for the current building architecture, eg. if the appliance will be built on a 64 bit platform, x86_64 will be injected. In the other case i386 will be injected.
Read more about available parameters here.
By default all repositories listed in an appliance definition file are installed into the appliance. If you want to specify a repository to be used only during the install phase, and don’t want to install it into the YUM config of the appliance, make it ephemeral:
Example repos section:
This section gives the ability to specify virtual hardware requirements.
- cpus – virtual CPU count, default: 1,
- memory – memory quantity in MB, default: 256,
- partitions – partitioning scheme with root mounts and size in GB, default: one root partition 1ith 1GB space
Example hardware section:
|Not all platforms will respect the CPU/memory values; some environments will override it.|
In partitions subsection you define the partition scheme. Partition sizes are specified in gigabytes (GB).
Example partition scheme:
|There must be only one root partition with ‘/’ mount point.|
If there is no partition scheme specified, one root partition with size 1GB will be added, which is equivalent to this:
To specify filesystem type, add a type subsection.
|Default operating system filesystem type is used when no type is specified.|
|Every partition specified in this section will be located on one disk.|