name: httpd summary: Appliance with Apache HTTPD web server appliances: - jeos packages: - httpd
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:
name: httpd summary: Appliance with Apache HTTPD web server appliances: - jeos packages: - httpd
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:
appliances: - jeos - other
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:
packages: - httpd - mc
In this section you can specify additional repositories in order to add packages to your appliance that are sourced from these repositories.
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
baseurl.
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.
TODO link
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:
repos: - name: "local-repo" baseurl: "file:///var/repo" ephemeral: true
Example repos section:
repos: - name: "fedora-11" baseurl: "http://ftp.man.poznan.pl/pub/linux/fedora/releases/11/Everything/#BASE_ARCH#/os/" - name: "fedora-11-updates" mirrorlist: "http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f11&arch=#BASE_ARCH#"
This section gives the ability to specify virtual hardware requirements.
Members:
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:
hardware: cpus: 2 memory: 256 partitions: "/": size: 5 "/home": size: 10
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:
hardware: partitions: "/": size: 5 # 5 GB "/home": size: 0.5 # 0.5 GB
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:
hardware: partitions: "/": size: 1 # 1 GB
To specify filesystem type, add a type subsection.
Default operating system filesystem type is used when no type is specified.
hardware: partitions: "/": size: 5 type: ext3 # currently supported: ext3 and ext4
Every partition specified in this section will be located on one disk.