Welcome to the FlossWare Cobbler kickstarts and snippets project!
All defined kickstarts are simple wrappers that call a corresponding snippet of a similar name (without the flossware_
prefix and .ks
file extension):
- flossware_centos_atomic.ks: kickstarting template for CentOS Atomic.
- flossware_fedora_atomic.ks: kickstarting template for Fedora Atomic.
- flossware_rhel_atomic.ks: kickstarting template for RHEL Atomic.
- flossware_standard.ks: standard kickstarting template for "normal" bare metal or VMs.
Please note there is some uniqueness when templating Atomic kickstarts:
- No
package
section - An
ostreesetup
option - Each Atomic instance performs different operations in their respective
post
sections. - The Fedora Atomic image uses
addon
andanaconda
sections.
Our initial work with Atomic kickstarts was performed by manually installing each image and reviewing the generated kickstart after the install was booted.
Snippets represent the bulk of all work. We considered putting some templatization in the kickstarts but felt that keeping that functionality together made the most logical sense. Snippets are broken up into the categories found below. Each concept (with the exception of the Kickstart Counterparts) is contained in a directory of that name.
As mentioned above, all kickstarts call a corresponding snippet. The job of these snippets is to set variables (where appropriate) and coordinate assembly of the kickstart result as a whole. The names correspond to the type of distro you are installing:
The option snippets represent an option that one may find in a kickstart file - for example autopart for automatically creating partitions.
Should an option afford parameters, simply denoting the name of the option in your ksmeta
as the name with the value being what should end up in the resultant kickstart. As an example, let's assume you wish to set the language to en_US
in your kickstart:
ksmeta='lang="en_US"'
This will result in the kickstart to:
lang en_US
Module snippets represent logically related snippets contained in a file (think of them like a subroutine):
- atomic: adds the
ostreesetup
option and disables some services. - common: layout "common" kickstarting options, like
text
,skipx
, etc. - defined_disk_partition: if not using
autopart
, will layout a "good enough" disk structure. If you denotelvmDisks
as aksmeta
variable whose values are the disks to use, it will layout LVM partitioning for you. As an exampleksmeta='lvmDisks="sda sdb sdc"'
will use diskssda
,sdb
andsdc
as one LVM partition spanning all those disks. - disk_partition: "common" disk partitioning snippets. If autopart is a
ksmeta
variable, it will use that option otherwise it will use use the defined_disk_partition snippet. - filesystem: "common" file system snippet for zerombr, ignoredisk and bootloader options as well as calling the disk_partition snippet.
Please note we are investigating using Cheetah defs, per issue #18, as a replacement for modules.
Section snippets correspond to sections in kickstarts like package, pre, post and add ons. To define values on sections:
- For the section itself, simply define a
ksmeta
variable whose name represents the section and whose value is what to put on the section. As an example:ksmeta='post="--errorfail"'
- To provide a body, denote a snippet in your
ksmeta
variables that is named[section]_body
. As an example:ksmeta='post_body="flossware/sections/post_body/centos_atomic"'
Clone this git repo and:
- copy the contents of kickstarts to
/var/lib/cobbler/kickstarts
. - create a
/var/lib/cobbler/snippets/flossware
directory. - copy the contents of snippets to
/var/lib/cobbler/snippets/flossware
.
To yum install, you will need to enable the FlossWare cobbler yum repo by performing one of the following:
- Get the repo file:
wget https://bintray.com/flossware/rpm/rpm -O bintray-flossware-rpm.repo
- Create the
/etc/yum.repos.d/bintray-flossware-rpm.repo
file as:
#bintraybintray-flossware-rpm - packages by flossware from Bintray
[bintraybintray-flossware-rpm]
name=bintray-flossware-rpm
baseurl=https://dl.bintray.com/flossware/rpm
gpgcheck=0
repo_gpgcheck=0
enabled=1
Once the repo file exists, execute: yum install flossware-cobbler
By default, the kickstarts and snippets can be used upon deployment with no additions to ksmeta
. The only caveat is your installed bare metal or VMs will use the root password cobbler
.
- Using
plaintext
:ksmeta='rootpw="--plaintext mypassword"'
- Using
encrypted
:ksmeta='rootpw="--iscrypted laskdjfaklkmcLKMCSDNKJANDF"'
Simply provide a space or comma separated list of the disks to use in the partition as a ksmeta
variable lvmDisks
. As an example assume you wish to use sda
, sdc
and sdd
: ksmeta='lvmDisks="sda sdc sdd"'
For more concrete examples, please see Flossy's Cobbler Scripts for his home network.