Skip to content

Cobbler Installation

David Carver edited this page May 8, 2020 · 6 revisions

LosF both heavily relies on Cobbler and becomes a wrapper-script for replacing common Cobbler tasks. This is probably the most complicated step in the LosF installation.

Add the EPEL repository

yum install -y epel-release
#or
#rpm -i http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Required packages

yum -y install cobbler httpd wget bind dhcp xinetd

Configure cobbler kickstart password in /etc/cobbler/settings

# The simplest way to change the password is to run 
# openssl passwd -1
# and put the output between the "" below.
default_password_crypted: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac."

Configure cobbler to enable dns management in /etc/cobbler/settings

manage_dns: 1

Configure cobbler server address in /etc/cobbler/settings

server: 192.168.100.2

Configure cobbler to manage forward and reverse dns zones in /etc/cobbler/settings

manage_forward_zones: ['clustername.tacc.utexas.edu']
manage_reverse_zones: ['192.168.100']

Configure cobbler to send PXE booting clients to the master node

next_server: 192.168.100.2

Configure cobbler to manage dhcp

manage_dhcp: 1

Configure the dhcp server through cobbler in /etc/cobbler/dhcp.template You should only really need to modify this block

subnet 192.168.100.0 netmask 255.255.255.0 {
     option routers             192.168.100.1;
     option domain-name-servers 192.168.100.2;
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        192.168.100.10 192.168.100.125;

Configure the name server through cobbler in /etc/cobbler/named.template You should only really need to modify this block

options {
          listen-on port 53 { 192.168.100.2; };
          directory       "/var/named";
          dump-file       "/var/named/data/cache_dump.db";
          statistics-file "/var/named/data/named_stats.txt";
          memstatistics-file "/var/named/data/named_mem_stats.txt";
          allow-query     { 192.168.100.0/24; };
          allow-transfer  { 129.100.100.50; };
          recursion yes;
};

For tftp, start xinetd

[root@master ~]# service xinetd start
[root@master ~]# chkconfig xinetd on

Start cobbler for the first time

[root@master ~]# service httpd start
Starting httpd: 
[root@master ~]# service cobblerd start
Starting cobbler daemon:                                   [  OK  ]

Always start cobbler and httpd

[root@master ~]# chkconfig cobblerd on
[root@master ~]# chkconfig httpd on

Get the network bootloaders for cobbler

[root@master ~]# cobbler get-loaders

You can now cobbler sync for the first time

[root@master ~]# cobbler sync

Create a distribution in Cobbler, in this example we are using 6 (rolling) There are a few ways to do this, rsync is probably the best in most situations

[root@master ~]# cobbler import --path=rsync://ftp.utexas.edu/CentOS/6/os/x86_64/ --name=centos6 --arch=x86_64
or
[root@master ~]# wget http://ftp.utexas.edu/centos/6/isos/x86_64/CentOS-6-x86_64-DVD-2003.iso
[root@master ~]# mkdir /mnt/dvd
[root@master ~]# mount -o loop CentOS-6-x86_64-DVD-2003.iso /mnt/dev
[root@master ~]# cobbler import --path=/mnt/dvd --name=centos6 --arch=x86_64

Make a mirror for the main operating system, EPEL, updates, and extras.

[root@master ~]# cobbler repo add --mirror=http://mirror.utexas.edu/centos/6/extras/x86_64/ --name=centos6
[root@master ~]# cobbler repo add --mirror=http://mirror.utexas.edu/epel/6/x86_64 --name=epel6
[root@master ~]# cobbler repo add --mirror=http://mirror.utexas.edu/centos/6/updates/x86_64 --name=updates6
[root@master ~]# cobbler repo add --mirror=http://mirror.utexas.edu/centos/6/extras/x86_64/ --name=extras6

It is a good habit to run cobbler sync after making changes to cobbler.

[root@master ~]# cobbler sync

Mirror the repositories we have added to the local machine.

[root@master ~]# cobbler reposync

Add the mirrors to our system profile in cobbler

[root@master ~]# cobbler profile edit --name=centos6-x86_64 --repos="centos6 epel6 updates6 extras6"