3. Why Cobbler?
Simple system to automate installation and
preparation of systems.
Reduces the amount of time needed to begin
an installation.
Provides a flexible, intuitive means to manage
a large number of systems to meet your needs.
4. Why Cobbler?
● Simple web UI and command line
● Robust template interface via Cheetah
● Built to save time
● Open source
● Mature
5. Cobbler history
Developed by DevOps engineer Michael
DeHaan (former Red Hat employee)
Primary goal to simplify installation
Software environments require frequent
reinstallations
6. Manual network kickstart method
● Set up DHCP server to point to TFTP server
● Configure TFTP with pxelinux.0 and
installation tree
● Either handwrite MAC addresses for each
host or present a menu and manually
choose
● No scaleability
● No templating
● No reporting
7. When do you need Cobbler?
Scenarios:
● Complex software with many components
● Testing clustering software
● Testing software suites with no reset option
available
● Continuous integration (CI) testing
● Isolated network environment
● Rapidly changing hardware
8. When Cobbler is not appropriate
Scenarios:
● Simple application development
● Legacy system development
● Where automation is not possible
● Windows
9. Continuous Integration
Overview:
● High pace development style
● Automated deployment
● Integrate and test software
● Test every commit
● Similar to production environment
12. CI example: Jenkins
Jenkins is a fork from Hudson
Java based
Supports many SCM formats, including:
● git
● subversion
● mercurial
● cvs
Automate testing based on SCM changes or
regular schedule
13. Typical Uses
● DNS/DHCP management of a company
infrastructure
● Automation of installation of servers via PXE
● Power cycling of systems via ipmitool
● Local package repository mirror
● Simplified, standard installation process
14. What you should know already
● How to build virtual machines
● How to configure a DHCP server
○ hostnames
○ MAC addresses
○ gateway
● Where to find installation media for your
system (DVD and/or package repositories)
15. Considerations
Scale:
● How many sites
● Concurrent installations
● Number of systems
Complexity:
● Linux distros
● System builds
● Localization
● Post-installation scripts
16. Simple case: single node with virt
Internet:
● Create a private OS files
package
virtual network repositories
● Two VMs
● VM 1 is CentOS VM 1
Linux host
● VM 2 is Ubuntu Cobbler server
VM 2
System
OS files
configurati
packages
on
17. Common use case: Development lab
Internet:
OS files
package
repositories
Development Lab
System1 System2
Cobbler server System3 System4
System5 System6
OS files System
packages configuration
19. Create kickstart file
● Set up install method
● Configure disks
● Configure language/keyboard/time
● Configure default package set
● Specify scripts in %post for automation
20. Example kickstart for installation
install
reboot
lang en_US
network --bootproto=dhcp
keyboard us
clearpart --all
part / --size 500 --grow
part swap --recommended
#set timezone
timezone --utc US/Eastern
21. Example kickstart for installation
#set root password
rootpw changeme
#rootpw --iscrypted $1$Rig3dbXb$OWcv00J/V2WsBGcgx0bmp1
%packages
@base
openssh-server
openssh-client
%post
#Your script here
27. Postinstallation script
● Custom downloaded files/settings/scripts
● Enable configuration management
● Set up SSH keys
● Custom authentication if not possible
through preseed/kickstart
28. Cobbler kickstart extra features
● You can store snippets and call them in multiple
kickstarts
● You can use Cheetah template code directly in a
kickstart (just prepend with '#'). Syntax similar to Python
Examples:
%post
$SNIPPET('ntp_register')
%packages
#set $hostname = $getVar('$hostname', None)
#if test in $hostname or devel in $hostname
@development
#end if
29. Working with variables
cobbler system dumpvars --name=system
Built-in variables:
● $mac_address
● $ip_address
● $hostname
● $distro
● $profile
● $server
30. Flexibility with variables
● Set custom variables in ksmeta section.
● Profile variables override distro variables.
● System variables override profile variables.
● Use getVar('var-name','default-value') in
cases where an empty string would break
your installation
○ RH: rootpw $getVar('rootpw','changeme')
○ Deb: d-i passwd/root-password-crypted password $getVar
('rootmd5','$1$Rig3dbXb$OWcv00J/V2WsBGcgx0bmp1')
32. Add your distro
● Download base OS media
● mount -oloop /mnt/iso /path/to/os.iso
● cobbler import --path /mnt/iso --
name=distro_name
33. Adding profiles to Cobbler
● Log into Cobbler
Web
● Add new profile with
your distro and
kickstart
34. Remote install options
● Manual entry of systems
○ Requires MAC address
● PXE menu
○ Requires manual interaction on boot
● koan/virt-install
○ Create a virtual machine or reinstall existing system
and specify Cobbler server and profile to use
35. Koan examples
Reinstall a host:
● koan --server=cobbler.example.org --
replace-self --profile=name
Create a new virtual machine:
● koan --server=cobbler.example.org --virt --
system=name
38. Summary
● Cobbler allows you to automate installations
● Cobbler fits into CI testing
● Cobbler saves time
● Cobbler is extendable via Cheetah template
engine