Difference between revisions of "Cobbler installation on Ubuntu"
(Created page with "== Pre-Requisits == For this installation, we will need to have the following services installed: '''dhcp''', '''bind''' & '''apache'''. Install with the following yum comman...") |
|||
| Line 4: | Line 4: | ||
Install with the following yum command: | Install with the following yum command: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| − | apt-get install apache2 isc-dhcp-server bind9 | + | root@ubuntu:~# apt-get install apache2 isc-dhcp-server bind9 |
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 10: | Line 10: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
INTERFACES="eth1" | INTERFACES="eth1" | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | == Install Cobbler == | ||
| + | <syntaxhighlight> | ||
| + | root@ubuntu:~# apt-get install cobbler cobbler-web | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | == Restart Apache == | ||
| + | <syntaxhighlight> | ||
| + | root@ubuntu:~# service apache2 restart | ||
| + | * Restarting web server apache2 | ||
| + | apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName | ||
| + | ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | == Add a few more packages to satisfy some cobbler requirements == | ||
| + | Install '''debmirror''' with yum (needed to manage debian deployments): | ||
| + | <syntaxhighlight> | ||
| + | root@ubuntu:~# apt-get install debmirror | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | Install '''pykickstart''' with yum (A python library for manipulating kickstart files): | ||
| + | <syntaxhighlight> | ||
| + | root@ubuntu:~# apt-get install pykickstart | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | == Configure cobbler == | ||
| + | Get cobbler to manage '''dhcp''' and '''dns''' by setting the following in '''/etc/cobbler/settings''': | ||
| + | <syntaxhighlight> | ||
| + | manage_dhcp: 1 | ||
| + | manage_dns: 1 | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | Set server ip addresses in '''/etc/cobbler/settings''': | ||
| + | <syntaxhighlight> | ||
| + | next_server: 172.28.0.100 | ||
| + | server: 172.28.0.100 | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | Confirm the following are set in '''/etc/cobbler/modules.conf''': | ||
| + | <syntaxhighlight> | ||
| + | [dns] | ||
| + | module = manage_bind | ||
| + | |||
| + | [dhcp] | ||
| + | module = manage_isc | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | Edit '''/etc/cobbler/dhcp.template''' with relevant network information (for example): | ||
| + | <syntaxhighlight> | ||
| + | # ****************************************************************** | ||
| + | # Cobbler managed dhcpd.conf file | ||
| + | # | ||
| + | # generated from cobbler dhcp.conf template ($date) | ||
| + | # Do NOT make changes to /etc/dhcpd.conf. Instead, make your changes | ||
| + | # in /etc/cobbler/dhcp.template, as /etc/dhcpd.conf will be | ||
| + | # overwritten. | ||
| + | # | ||
| + | # ****************************************************************** | ||
| + | |||
| + | ddns-update-style interim; | ||
| + | |||
| + | allow booting; | ||
| + | allow bootp; | ||
| + | |||
| + | ignore client-updates; | ||
| + | set vendorclass = option vendor-class-identifier; | ||
| + | |||
| + | subnet 192.168.42.0 netmask 255.255.255.0 { | ||
| + | option routers 192.168.42.1; | ||
| + | option domain-name-servers 192.168.42.1; | ||
| + | option subnet-mask 255.255.255.0; | ||
| + | range dynamic-bootp 192.168.42.100 192.168.42.150; | ||
| + | filename "/pxelinux.0"; | ||
| + | default-lease-time 21600; | ||
| + | max-lease-time 43200; | ||
| + | next-server $next_server; | ||
| + | } | ||
| + | . . . . . | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | Attempt to start '''dhcpd''': | ||
| + | <syntaxhighlight> | ||
| + | service dhcpd restart | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | '''NB''': if the dhcpd service isn't running and it fails to start, it may be because the default '''/etc/dhcpd.conf''' file is blank. Enter the above information and start the dhcpd service (it needs to be running for cobbler sync (below) to complete fully). The content of '''/etc/dhcpd.conf''' will be overwritten with the contents of '''/etc/cobbler/dhcp.template''' once <code>cobbler sync</code> has been performed. | ||
| + | |||
| + | Run cobbler check: | ||
| + | <syntaxhighlight> | ||
| + | cobbler check | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | Run cobbler sync: | ||
| + | <syntaxhighlight> | ||
| + | cobbler sync | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 12:01, 3 May 2013
Pre-Requisits
For this installation, we will need to have the following services installed: dhcp, bind & apache.
Install with the following yum command:
root@ubuntu:~# apt-get install apache2 isc-dhcp-server bind9If necessary, the dhcpd service can be restricted to servicing dhcp requests on just one port. To do this, edit the /etc/default/isc-dhcp-server file and set the following line:
INTERFACES="eth1"Install Cobbler
root@ubuntu:~# apt-get install cobbler cobbler-webRestart Apache
root@ubuntu:~# service apache2 restart
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerNameAdd a few more packages to satisfy some cobbler requirements
Install debmirror with yum (needed to manage debian deployments):
root@ubuntu:~# apt-get install debmirrorInstall pykickstart with yum (A python library for manipulating kickstart files):
root@ubuntu:~# apt-get install pykickstartConfigure cobbler
Get cobbler to manage dhcp and dns by setting the following in /etc/cobbler/settings:
manage_dhcp: 1
manage_dns: 1Set server ip addresses in /etc/cobbler/settings:
next_server: 172.28.0.100
server: 172.28.0.100Confirm the following are set in /etc/cobbler/modules.conf:
[dns]
module = manage_bind
[dhcp]
module = manage_iscEdit /etc/cobbler/dhcp.template with relevant network information (for example):
# ******************************************************************
# Cobbler managed dhcpd.conf file
#
# generated from cobbler dhcp.conf template ($date)
# Do NOT make changes to /etc/dhcpd.conf. Instead, make your changes
# in /etc/cobbler/dhcp.template, as /etc/dhcpd.conf will be
# overwritten.
#
# ******************************************************************
ddns-update-style interim;
allow booting;
allow bootp;
ignore client-updates;
set vendorclass = option vendor-class-identifier;
subnet 192.168.42.0 netmask 255.255.255.0 {
option routers 192.168.42.1;
option domain-name-servers 192.168.42.1;
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.42.100 192.168.42.150;
filename "/pxelinux.0";
default-lease-time 21600;
max-lease-time 43200;
next-server $next_server;
}
. . . . .Attempt to start dhcpd:
service dhcpd restartNB: if the dhcpd service isn't running and it fails to start, it may be because the default /etc/dhcpd.conf file is blank. Enter the above information and start the dhcpd service (it needs to be running for cobbler sync (below) to complete fully). The content of /etc/dhcpd.conf will be overwritten with the contents of /etc/cobbler/dhcp.template once cobbler sync has been performed.
Run cobbler check:
cobbler checkRun cobbler sync:
cobbler sync