2. Install cobbler and prerequisites
We’ll be focusing on installing on a RPM based system such as Fedora or CentOS.
Enable EPEL repositories
[root@master ~]# yum update [root@master ~]# yum install epel-release
Install cobbler via
yum
[root@master ~]# yum install cobbler
Note
This will install the stable version of Cobbler, v2.8. While there is a newer version 3.x, this course does not support it due to many incompatible changes. The current v3.x is still under heavy development and not ready for production.
Enable and start services needed for cobbler
enable Apache and cobbler service
[root@master ~]# systemctl enable httpd [root@master ~]# systemctl enable cobblerd [root@master ~]# systemctl start httpd [root@master ~]# systemctl start cobblerd
Run
cobbler check
to verify installation[root@master ~]# cobbler check The following are potential configuration items that you may want to fix: 1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work. This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it. 2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network. 3 : Some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements. 4 : enable and start rsyncd.service with systemctl 5 : debmirror package is not installed, it will be required to manage debian deployments and repositories 6 : ksvalidator was not found, install pykickstart 7 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one 8 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them Restart cobblerd and then run 'cobbler sync' to apply changes.
The output of this check is self-explanatory. Several default settings should be adjusted and some missing pieces need to be installed. Some things, like Debian support are optional.
Set the
server
andnext_server
to your master server IPThe main configuration file for cobbler is
/etc/cobbler/settings
and is in YAML format.Your cobbler server is responsible for the installation process. This will happen over the cluster network subnet we configured
192.168.16.0/20
. Configure cobbler to use themaster.hpc
IP address.server: 192.168.16.1 ... next_server: 192.168.16.1
Download boot loaders (optional)
Enable rsyncd
[root@master ~]# yum install rsync [root@master ~]# systemctl enable rsyncd [root@master ~]# systemctl start rsyncd
Install pykickstart to validate Kickstart files
[root@master ~]# yum install pykickstart
Restart
cobblerd
daemon[root@master ~]# cobbler sync task started: 2019-02-18_094935_sync task started (id=Sync, time=Mon Feb 18 09:49:35 2019) running pre-sync triggers cleaning trees removing: /var/lib/tftpboot/grub/images copying bootloaders trying hardlink /usr/share/syslinux/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0 trying hardlink /usr/share/syslinux/menu.c32 -> /var/lib/tftpboot/menu.c32 copying: /boot/memtest86+-5.01 -> /var/lib/tftpboot/images/memtest86+-5.01 trying hardlink /usr/share/syslinux/memdisk -> /var/lib/tftpboot/memdisk copying distros to tftpboot copying images generating PXE configuration files generating PXE menu structure rendering TFTPD files generating /etc/xinetd.d/tftp cleaning link caches running post-sync triggers running python triggers from /var/lib/cobbler/triggers/sync/post/* running python trigger cobbler.modules.sync_post_restart_services running shell triggers from /var/lib/cobbler/triggers/sync/post/* running python triggers from /var/lib/cobbler/triggers/change/* running python trigger cobbler.modules.manage_genders running python trigger cobbler.modules.scm_track running shell triggers from /var/lib/cobbler/triggers/change/* *** TASK COMPLETE ***
[root@master tftpboot]# tree /var/lib/tftpboot/ /var/lib/tftpboot/ ├── boot │ └── grub │ └── menu.lst ├── etc ├── grub │ ├── efidefault │ └── images -> ../images ├── images │ └── memtest86+-5.01 ├── images2 ├── memdisk ├── menu.c32 ├── ppc ├── pxelinux.0 ├── pxelinux.cfg │ └── default └── s390x └── profile_list 10 directories, 8 files
By default cobbler only manages TFTP and generates the necessary files in
/var/lib/tftpboot/
. The rest of the exercise will be about how to configure cobbler to manage DHCP and DNS for us.