My Cobbler documentation

Personal notes on the tool Cobbler.

Cobbler Installation on Centos/Redhat 7

Cobbler version:
 2.6.0
Linux version:Centos/Redhat 7.0

Steps

  1. Set SELinux to “permissive” mode (Doc)

  2. EPEL repo configuration:

    sudo rpm -Uvh http://mir01.syntis.net/epel//7/x86_64/e/epel-release-7-5.noarch.rpm
    
  3. Installation

    yum install pykickstart cobbler cobbler-web
    
  4. Activate TFTP

    vim /etc/xinetd.d/tftp
    #   disable = yes                    <- Change this line to "no"
    chkconfig tftp on
    

    Note

    Configuration may be different according to Linux breed

  5. Configure the firewall:

    # For TFTP:
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p tcp --dport 69 -j ACCEPT
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p udp --dport 69 -j ACCEPT
    # For HTTP
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p tcp --dport 80 -j ACCEPT
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p tcp --dport 443 -j ACCEPT
    # For Cobbler XML-RPC
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p tcp --dport 25150 -j ACCEPT
    firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 -p tcp --dport 25151 -j ACCEPT
    
    firewall-cmd --reload
    

    Note

    If you want to check these rules are correctly saved:

    firewall-cmd --permanent --direct --get-rules ipv4 filter INPUT
    
  6. (optional) If you want to use command “cobbler replicate”, you have to configure rsync

    $ vi /etc/xinetd.d/rsync
    
    # default: off
    # description: The rsync server is a good addition to an ftp server, as it \
    #      allows crc checksumming etc.
    service rsync
    {
       disable= no # change
       flags= IPv6
       socket_type= stream
       wait= no
       user= root
       server= /usr/bin/rsync
       server_args= --daemon
       log_on_failure+= USERID
    }
    
    $ chkconfig rsync on
    
  7. Cobbler configuration:

    vim /etc/cobbler/settings
    

    Change following lines:

    # manage_rsync: 0   <---- set to 1 to enable Cobbler's RSYNC management features.
    # server: 127.0.0.1 <---- set to the real Cobbler ip address.
    # anamon_enabled: 0 <---- set to 1 to enable Anamon log.
    # next_server: 127.0.0.1 <---- set to the real Cobbler ip address.
    
  8. Start Cobbler service:

    service cobblerd start
    chkconfig cobblerd on
    
    service httpd start
    chkconfig httpd on
    
  9. Download loaders:

    cobbler get-loaders
    
  10. (optional) If you want to change the WEB interface password (cobbler/cobbler):

    openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'
    

    And put the key in /etc/cobbler/settings:

    # default_password_crypted: "$1$company$prqgnhJ6izx5.S9FVItCB/"
    

    Then change the web user interface setting:

    htdigest /etc/cobbler/users.digest "Cobbler" cobbler
    
  11. Sync all:

    cobbler sync
    

Note

You can check your installation with:

cobbler check

Cobbler usage

Warning

If you are not familiar with the Cobbler terminology, we strongly advise you to read the glossary :)

General usage

When you create a new “system”, Cobbler makes the following operations:

  • Reads the profile used by the system to create the installation ISO. The distribution (distro) is defined in the profile.
  • Generates the kickstart. The kickstart template is defined in the profile. The template is instantiate with the “profile” and the “system” informations.
  • The kickstart template may refer to several snippets.

How to view/modify a profile?

  1. Go to Cobbler

  2. Open the “profiles” view:

    _images/cobbler_profiles_view.png
  3. Choose a profile:

  4. Edit the profile:

The “virtualization” tab allows to set hardware resources:

_images/cobbler_profiles_virtualization.png

It may be used with Koan <http://cobbler.github.io/manuals/2.6.0/6/3_-_Installing-virtual-guests.html>_ to deploy virtual machine.

How to view/modify the kickstart?

  1. Go to Cobbler

  2. Open the “Kickstart Templates” view:

    _images/cobbler_kickstarts_view.png
  3. Choose the kickstart

  4. Edit the kickstart:

    _images/cobbler_kickstarts_edit.png

How to view/modify a snippet?

  1. Go to Cobbler

  2. Open the “Snippets” view:

    _images/cobbler_snippets_view.png
  3. Choose a snippet partitioning.conf

  4. Edit the snippet:

    _images/cobbler_snippets_edit.png

Glossary

distro
According to the Cobbler terminology, a “distro” is the configuration of an operating system. Ex: RHEL 6.5, Centos 7.2
kickstart
A file containing the answers to all the questions that would normally be asked during a typical OS installation (RHEL Linux type). Kickstart provides a way for users to automate any OS installation.
profile
A profile contains all configurations of the infrastructure and the platform (distro, CPU, RAM, Disk...). It’s like a model/template that can be refered by a system.
snippet
Snippets are a way of reusing common blocks of code between kickstarts. Its may be seen as function/macro. A snippet is saved in a separate file.
system
According the Cobbler terminology, a “system” contains the configuration of a particular machine. In other terms, it is an instance of a profile. For example, it contains specific network informations of a machine (IP, gateway, hostname...)

Advice for Software Testing

As a tester, if you need to often deploy OS for your testing activity then you shall use Cobbler :-)

Cobbler is a good tool to quickly OS-based test environments and manage their different versions/breeds/configurations.

Indices and tables