Skip to content

FlossWare/cobbler

Repository files navigation

FlossWare Cobbler Kickstarts and Snippets

Welcome to the FlossWare Cobbler kickstarts and snippets project!

Build Status

Concepts

Kickstarts

All defined kickstarts are simple wrappers that call a corresponding snippet of a similar name (without the flossware_ prefix and .ks file extension):

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 and anaconda 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

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.

Kickstart Counterparts

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:

Options

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

Modules

Module snippets represent logically related snippets contained in a file (think of them like a subroutine):

Please note we are investigating using Cheetah defs, per issue #18, as a replacement for modules.

Sections

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"'

How To

Installing

Manual

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.

Yum

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

Default Use

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.

Define the Root Password

  • Using plaintext: ksmeta='rootpw="--plaintext mypassword"'
  • Using encrypted: ksmeta='rootpw="--iscrypted laskdjfaklkmcLKMCSDNKJANDF"'

Layout LVM partitions

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"'

Examples

For more concrete examples, please see Flossy's Cobbler Scripts for his home network.