CobblerTest

From WBITT's Cooker!

(Difference between revisions)
Jump to: navigation, search
(==)
Line 36: Line 36:
<pre>
<pre>
-
[root@test-plccg ~]# vi /etc/yum.repos.d/CentOS-Base.repo  
+
[root@headnode ~]# vi /etc/yum.repos.d/CentOS-Base.repo  
. . .
. . .
. . .  
. . .  
Line 48: Line 48:
. . .
. . .
. . .   
. . .   
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
</pre>
</pre>
Line 54: Line 54:
Now, install cobbler:-
Now, install cobbler:-
-
[root@test-plccg ~]# yum -y install cobbler koan cman
+
[root@headnode ~]# yum -y install cobbler koan cman
Line 60: Line 60:
<pre>
<pre>
-
[root@test-plccg cdimages]# ls
+
[root@headnode cdimages]# ls
CentOS-5.3-i386.DVD.iso         
CentOS-5.3-i386.DVD.iso         
CentOS-5.4-x86_64               
CentOS-5.4-x86_64               
CentOS-5.4-x86_64-bin-DVD.iso   
CentOS-5.4-x86_64-bin-DVD.iso   
-
[root@test-plccg cdimages]#
+
[root@headnode cdimages]#
</pre>
</pre>
Line 82: Line 82:
                      
                      
<pre>
<pre>
-
[root@test-plccg cdimages]# cobbler import --mirror=/data/cdimages/CentOS-5.4-x86_64 --name=Centos5.4-x86_64
+
[root@headnode cdimages]# cobbler import --mirror=/data/cdimages/CentOS-5.4-x86_64 --name=Centos5.4-x86_64
. . .
. . .
  . . .
  . . .
Line 130: Line 130:
- found content (breed=redhat) at /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/xen
- found content (breed=redhat) at /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/xen
- found content (breed=redhat) at /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/pxeboot
- found content (breed=redhat) at /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/pxeboot
-
[root@test-plccg cdimages]#
+
[root@headnode cdimages]#
</pre>
</pre>
Line 138: Line 138:
<pre>
<pre>
-
[root@test-plccg ~]# vi /etc/cobbler/settings  
+
[root@headnode ~]# vi /etc/cobbler/settings  
server = 192.168.1.203
server = 192.168.1.203
nextserver=192.168.1.203
nextserver=192.168.1.203
Line 247: Line 247:
-
[root@test-plccg ~]# cobbler check
+
[root@headnode ~]# cobbler check
The following potential problems were detected:
The following potential problems were detected:
#0: service dhcpd is not running
#0: service dhcpd is not running
Line 253: Line 253:
#2: yum-utils need to be at least version 1.1.17 for reposync -l, current version is 1.1.16
#2: yum-utils need to be at least version 1.1.17 for reposync -l, current version is 1.1.16
#3: 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
#3: 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
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
-
[root@test-plccg ~]# cobbler list
+
[root@headnode ~]# cobbler list
distro Centos5.4-x86_64
distro Centos5.4-x86_64
   profile Centos5.4-x86_64
   profile Centos5.4-x86_64
Line 263: Line 263:
distro Centos5.4-xen-x86_64
distro Centos5.4-xen-x86_64
   profile Centos5.4-xen-x86_64
   profile Centos5.4-xen-x86_64
-
[root@test-plccg ~]#
+
[root@headnode ~]#
   
   
-
[root@test-plccg ~]# cobbler distro list
+
[root@headnode ~]# cobbler distro list
Centos5.4-x86_64
Centos5.4-x86_64
Centos5.4-xen-x86_64
Centos5.4-xen-x86_64
-
[root@test-plccg ~]#
+
[root@headnode ~]#
-
[root@test-plccg ~]# cobbler profile list
+
[root@headnode ~]# cobbler profile list
Centos5.4-x86_64
Centos5.4-x86_64
Centos5.4-xen-x86_64
Centos5.4-xen-x86_64
rescue-Centos5.4-x86_64
rescue-Centos5.4-x86_64
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
No systems are registered with cobbler at the moment:-
No systems are registered with cobbler at the moment:-
-
[root@test-plccg ~]# cobbler system list
+
[root@headnode ~]# cobbler system list
-
[root@test-plccg ~]#
+
[root@headnode ~]#
Lets create a profile for compute-nodes:-
Lets create a profile for compute-nodes:-
-
[root@test-plccg ~]# cobbler profile copy --name=Centos5.4-x86_64 --newname=ComputeNodes
+
[root@headnode ~]# cobbler profile copy --name=Centos5.4-x86_64 --newname=ComputeNodes
-
[root@test-plccg ~]# cobbler profile list
+
[root@headnode ~]# cobbler profile list
Centos5.4-x86_64
Centos5.4-x86_64
Centos5.4-xen-x86_64
Centos5.4-xen-x86_64
ComputeNodes                # <------------ Newly added profile!
ComputeNodes                # <------------ Newly added profile!
rescue-Centos5.4-x86_64
rescue-Centos5.4-x86_64
-
[root@test-plccg ~]#
+
[root@headnode ~]#
-
[root@test-plccg ~]# cobbler profile report --name=ComputeNodes
+
[root@headnode ~]# cobbler profile report --name=ComputeNodes
profile              : ComputeNodes
profile              : ComputeNodes
distro              : Centos5.4-x86_64
distro              : Centos5.4-x86_64
Line 326: Line 326:
virt type            : qemu
virt type            : qemu
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
-
[root@test-plccg ~]# cat /var/lib/cobbler/kickstarts/default.ks
+
[root@headnode ~]# cat /var/lib/cobbler/kickstarts/default.ks
# this file intentionally left blank
# this file intentionally left blank
# admins:  edit it as you like, or leave it blank for non-interactive install
# admins:  edit it as you like, or leave it blank for non-interactive install
-
[root@test-plccg ~]# cat /var/lib/cobbler/kickstarts/sample.ks
+
[root@headnode ~]# cat /var/lib/cobbler/kickstarts/sample.ks
#platform=x86, AMD64, or Intel EM64T
#platform=x86, AMD64, or Intel EM64T
# System authorization information
# System authorization information
Line 403: Line 403:
$kickstart_done
$kickstart_done
# End final steps
# End final steps
-
[root@test-plccg ~]#
+
[root@headnode ~]#
-
[root@test-plccg ~]# cd /var/lib/cobbler/kickstarts/
+
[root@headnode ~]# cd /var/lib/cobbler/kickstarts/
-
[root@test-plccg kickstarts]# cp sample.ks Compute.ks
+
[root@headnode kickstarts]# cp sample.ks Compute.ks
-
[root@test-plccg kickstarts]# vi Compute.ks
+
[root@headnode kickstarts]# vi Compute.ks
#platform=x86, AMD64, or Intel EM64T
#platform=x86, AMD64, or Intel EM64T
# System authorization information
# System authorization information
Line 485: Line 485:
$kickstart_done
$kickstart_done
# End final steps
# End final steps
-
[root@test-plccg kickstarts]#  
+
[root@headnode kickstarts]#  
-
[root@test-plccg kickstarts]# cobbler profile edit --name=ComputeNodes --kickstart=/var/lib/cobbler/kickstarts/Compute.ks
+
[root@headnode kickstarts]# cobbler profile edit --name=ComputeNodes --kickstart=/var/lib/cobbler/kickstarts/Compute.ks
-
[root@test-plccg kickstarts]#  
+
[root@headnode kickstarts]#  
Verify the change:-
Verify the change:-
-
[root@test-plccg kickstarts]# cobbler profile report --name=ComputeNodes | grep kickstart
+
[root@headnode kickstarts]# cobbler profile report --name=ComputeNodes | grep kickstart
kickstart            : /var/lib/cobbler/kickstarts/Compute.ks
kickstart            : /var/lib/cobbler/kickstarts/Compute.ks
-
[root@test-plccg kickstarts]#   
+
[root@headnode kickstarts]#   
Now define/ add compute nodes:-
Now define/ add compute nodes:-
-
[root@test-plccg ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6A:27:91
+
[root@headnode ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6A:27:91
-
[root@test-plccg ~]# cobbler system add --name=compute2 --profile=ComputeNodes --mac=00:1D:09:6B:06:81
+
[root@headnode ~]# cobbler system add --name=compute2 --profile=ComputeNodes --mac=00:1D:09:6B:06:81
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
Line 510: Line 510:
In case you try to make a duplicate entry:-
In case you try to make a duplicate entry:-
-
[root@test-plccg ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6B:06:7F
+
[root@headnode ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6B:06:7F
An object already exists with that name.  Try 'edit'?
An object already exists with that name.  Try 'edit'?
------------------------------  
------------------------------  
-
[root@test-plccg ~]# cobbler system list
+
[root@headnode ~]# cobbler system list
compute1
compute1
compute2
compute2
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
You can check report of the nodes now. I am only interested in few parameters.
You can check report of the nodes now. I am only interested in few parameters.
-
[root@test-plccg ~]# cobbler system report | egrep "system|profile|power type|interface|mac"
+
[root@headnode ~]# cobbler system report | egrep "system|profile|power type|interface|mac"
system                : compute1
system                : compute1
profile              : ComputeNodes
profile              : ComputeNodes
Line 534: Line 534:
interface        : eth0
interface        : eth0
   mac address    : 00:1D:09:6B:06:7F
   mac address    : 00:1D:09:6B:06:7F
-
[root@test-plccg ~]#                       
+
[root@headnode ~]#                       
I need to change the interface from eth0 to eth1.  
I need to change the interface from eth0 to eth1.  
Line 540: Line 540:
-
[root@test-plccg ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6A:27:91 --hostname=compute1.example.com --interface=eth1 --ip=192.168.1.1 --subnet=255.255.255.0 --kopts=noipv6  --power-address=192.168.0.1 --power-user=root --power-pass=power
+
[root@headnode ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6A:27:91 --hostname=compute1.example.com --interface=eth1 --ip=192.168.1.1 --subnet=255.255.255.0 --kopts=noipv6  --power-address=192.168.0.1 --power-user=root --power-pass=power
-
[root@test-plccg ~]# cobbler system add --name=compute2 --profile=ComputeNodes --mac=00:1D:09:6B:06:81 --hostname=compute2.example.com --interface=eth1 --ip=192.168.1.2 --subnet=255.255.255.0 --kopts=noipv6 --power-address=192.168.0.2  --power-user=root --power-pass=power
+
[root@headnode ~]# cobbler system add --name=compute2 --profile=ComputeNodes --mac=00:1D:09:6B:06:81 --hostname=compute2.example.com --interface=eth1 --ip=192.168.1.2 --subnet=255.255.255.0 --kopts=noipv6 --power-address=192.168.0.2  --power-user=root --power-pass=power
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
-
[root@test-plccg ~]# cobbler system report | egrep "system|profile|power type|interface|mac"
+
[root@headnode ~]# cobbler system report | egrep "system|profile|power type|interface|mac"
system                : compute1
system                : compute1
profile              : ComputeNodes
profile              : ComputeNodes
Line 557: Line 557:
interface        : eth0
interface        : eth0
   mac address    : 00:1D:09:6B:06:7F
   mac address    : 00:1D:09:6B:06:7F
-
[root@test-plccg ~]#
+
[root@headnode ~]#
-
[root@test-plccg ~]# cat /tftpboot/pxelinux.cfg/01-00-1d-09-6a-27-8f
+
[root@headnode ~]# cat /tftpboot/pxelinux.cfg/01-00-1d-09-6a-27-8f
default linux
default linux
prompt 0
prompt 0
Line 569: Line 569:
         append initrd=/images/Centos5.4-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.1.200/cblr/svc/op/ks/system/compute1
         append initrd=/images/Centos5.4-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.1.200/cblr/svc/op/ks/system/compute1
-
[root@test-plccg ~]#
+
[root@headnode ~]#
service cobblerd restart
service cobblerd restart
-
[root@test-plccg ~]# service dhcpd restart
+
[root@headnode ~]# service dhcpd restart
Starting dhcpd:                                            [FAILED]
Starting dhcpd:                                            [FAILED]
-
[root@test-plccg ~]#   
+
[root@headnode ~]#   
Wasted all my day. This is the fix:-
Wasted all my day. This is the fix:-
-
[root@test-plccg ~]# cobbler sync
+
[root@headnode ~]# cobbler sync
Shutting down dhcpd:                                      [  OK  ]
Shutting down dhcpd:                                      [  OK  ]
Starting dhcpd:                                            [  OK  ]
Starting dhcpd:                                            [  OK  ]
-
[root@test-plccg ~]# cat /etc/dhcpd.conf
+
[root@headnode ~]# cat /etc/dhcpd.conf
# ******************************************************************
# ******************************************************************
# Cobbler managed dhcpd.conf file
# Cobbler managed dhcpd.conf file
Line 623: Line 623:
}
}
-
[root@test-plccg ~]#   
+
[root@headnode ~]#   
-
[root@test-plccg ~]# ls  /tftpboot/pxelinux.cfg/ -l
+
[root@headnode ~]# ls  /tftpboot/pxelinux.cfg/ -l
total 12
total 12
-rw-r--r-- 1 root root  272 Feb  8 13:18 01-00-1d-09-6a-27-91
-rw-r--r-- 1 root root  272 Feb  8 13:18 01-00-1d-09-6a-27-91
-rw-r--r-- 1 root root  272 Feb  8 13:18 01-00-1d-09-6b-06-81
-rw-r--r-- 1 root root  272 Feb  8 13:18 01-00-1d-09-6b-06-81
-rw-r--r-- 1 root root 1091 Feb  8 13:18 default
-rw-r--r-- 1 root root 1091 Feb  8 13:18 default
-
[root@test-plccg ~]#
+
[root@headnode ~]#
Line 642: Line 642:
-
[root@test-plccg ~]# cd /etc/cobbler/power/
+
[root@headnode ~]# cd /etc/cobbler/power/
-
[root@test-plccg power]# ls
+
[root@headnode power]# ls
power_apc_snmp.template    power_ether_wake.template  power_ipmitool.template  power_wti.template
power_apc_snmp.template    power_ether_wake.template  power_ipmitool.template  power_wti.template
power_bladecenter.template  power_ilo.template        power_lpar.template
power_bladecenter.template  power_ilo.template        power_lpar.template
Line 650: Line 650:
-
[root@test-plccg power]# cat power_ipmitool.template
+
[root@headnode power]# cat power_ipmitool.template
/usr/bin/ipmitool -H $power_address -U $power_user -P $power_pass power $power_mode
/usr/bin/ipmitool -H $power_address -U $power_user -P $power_pass power $power_mode
-
[root@test-plccg power]#
+
[root@headnode power]#
The syntax of ipmitool and ipmipower are a bit different so this is not do-able. (Probably).
The syntax of ipmitool and ipmipower are a bit different so this is not do-able. (Probably).
Line 658: Line 658:
-
[root@test-plccg ~]# yum -y install OpenIPMI-tools
+
[root@headnode ~]# yum -y install OpenIPMI-tools
-
[root@test-plccg ~]# rpm -ql OpenIPMI-tools
+
[root@headnode ~]# rpm -ql OpenIPMI-tools
/etc/rc.d/init.d/ipmievd
/etc/rc.d/init.d/ipmievd
/etc/sysconfig/ipmievd
/etc/sysconfig/ipmievd
Line 670: Line 670:
Time to reboot these nodes and see if they are installed:
Time to reboot these nodes and see if they are installed:
-
[root@test-plccg power]# cobbler report --what=systems | egrep -i "hostname|netboot"
+
[root@headnode power]# cobbler report --what=systems | egrep -i "hostname|netboot"
hostname              : compute1.example.com
hostname              : compute1.example.com
netboot enabled?      : True
netboot enabled?      : True
hostname              : compute2.example.com
hostname              : compute2.example.com
netboot enabled?      : True
netboot enabled?      : True
-
[root@test-plccg power]#  
+
[root@headnode power]#  
-
[root@test-plccg power]# cobbler system reboot --name=compute1
+
[root@headnode power]# cobbler system reboot --name=compute1
cobbler power configuration is:
cobbler power configuration is:
Line 697: Line 697:
- /usr/bin/ipmitool -H 192.168.0.1 -U root -P power power on
- /usr/bin/ipmitool -H 192.168.0.1 -U root -P power power on
Chassis Power Control: Up/On
Chassis Power Control: Up/On
-
[root@test-plccg power]#     
+
[root@headnode power]#     
After reboot of node1, the installation started. However it got stuck in an install loop.  
After reboot of node1, the installation started. However it got stuck in an install loop.  
This happened, because PXE is the first boot device in the nodes.
This happened, because PXE is the first boot device in the nodes.
-
[root@test-plccg power]# cobbler report --what=systems | egrep -i "hostname|netboot"
+
[root@headnode power]# cobbler report --what=systems | egrep -i "hostname|netboot"
hostname              : compute1.example.com
hostname              : compute1.example.com
netboot enabled?      : True
netboot enabled?      : True
hostname              : compute2.example.com
hostname              : compute2.example.com
netboot enabled?      : True
netboot enabled?      : True
-
[root@test-plccg power]#   
+
[root@headnode power]#   
For such situations, there is a flag in /etc/cobbler/settings, which turns off the netboot flag, when the installation is done. It is "pxe_just_once" and is set to 0 by default. It needs to be turned to 1 in this situation.
For such situations, there is a flag in /etc/cobbler/settings, which turns off the netboot flag, when the installation is done. It is "pxe_just_once" and is set to 0 by default. It needs to be turned to 1 in this situation.
Line 728: Line 728:
1) Static IP:-
1) Static IP:-
-
[root@test-plccg ~]# cobbler system edit --name compute1 --interface=eth1 --static=1
+
[root@headnode ~]# cobbler system edit --name compute1 --interface=eth1 --static=1
This is the solution for setting static IP, post-reboot. The installation got done through PXE (good).
This is the solution for setting static IP, post-reboot. The installation got done through PXE (good).
Line 745: Line 745:
2) disable eth0
2) disable eth0
-
[root@test-plccg ~]# cobbler system edit --name=compute1 --delete-interface=eth0
+
[root@headnode ~]# cobbler system edit --name=compute1 --delete-interface=eth0
(I don't know, if it will work)
(I don't know, if it will work)
This did not work. Lets set eth0 as static. so it won't waste time on waiting for DHCP and failing.
This did not work. Lets set eth0 as static. so it won't waste time on waiting for DHCP and failing.
-
[root@test-plccg ~]# cobbler system edit --name compute1 --interface=eth0 --static=1
+
[root@headnode ~]# cobbler system edit --name compute1 --interface=eth0 --static=1
-
[root@test-plccg ~]# cobbler report system --name=compute1
+
[root@headnode ~]# cobbler report system --name=compute1
system                : compute1
system                : compute1
profile              : ComputeNodes
profile              : ComputeNodes
Line 772: Line 772:
   dhcp tag      :
   dhcp tag      :
-
[root@test-plccg ~]#                           
+
[root@headnode ~]#                           
This time it worked. I have lovely results!
This time it worked. I have lovely results!
Line 818: Line 818:
Trying this:-
Trying this:-
-
[root@test-plccg ~]# cobbler system edit --name=compute1 --delete-interface=eth0
+
[root@headnode ~]# cobbler system edit --name=compute1 --delete-interface=eth0
This did not help prevent eth0 asking for dhcp / IP.
This did not help prevent eth0 asking for dhcp / IP.
Line 830: Line 830:
How to pass console redirection options to TFTP file:-
How to pass console redirection options to TFTP file:-
-
[root@test-plccg ~]# cobbler distro list
+
[root@headnode ~]# cobbler distro list
Centos5.4-x86_64
Centos5.4-x86_64
Centos5.4-xen-x86_64
Centos5.4-xen-x86_64
-
[root@test-plccg ~]#
+
[root@headnode ~]#
Centos5.4-x86_64 is the distro we are using for provisioning the nodes.
Centos5.4-x86_64 is the distro we are using for provisioning the nodes.
-
[root@test-plccg ~]# cobbler distro report --name=Centos5.4-x86_64
+
[root@headnode ~]# cobbler distro report --name=Centos5.4-x86_64
distro              : Centos5.4-x86_64
distro              : Centos5.4-x86_64
architecture        : x86_64
architecture        : x86_64
Line 858: Line 858:
template files      : {}
template files      : {}
-
[root@test-plccg ~]#
+
[root@headnode ~]#
-
[root@test-plccg ~]# cobbler distro edit --name=Centos5.4-x86_64 --kopts="console=ttyS1,115200"
+
[root@headnode ~]# cobbler distro edit --name=Centos5.4-x86_64 --kopts="console=ttyS1,115200"
-
[root@test-plccg ~]# cobbler distro report --name=Centos5.4-x86_64
+
[root@headnode ~]# cobbler distro report --name=Centos5.4-x86_64
distro              : Centos5.4-x86_64
distro              : Centos5.4-x86_64
architecture        : x86_64
architecture        : x86_64
Line 882: Line 882:
template files      : {}
template files      : {}
-
[root@test-plccg ~]#
+
[root@headnode ~]#
Line 888: Line 888:
Now check the profiles:-
Now check the profiles:-
-
[root@test-plccg ~]# cobbler profile list
+
[root@headnode ~]# cobbler profile list
Centos5.4-x86_64
Centos5.4-x86_64
Centos5.4-xen-x86_64
Centos5.4-xen-x86_64
ComputeNodes
ComputeNodes
rescue-Centos5.4-x86_64
rescue-Centos5.4-x86_64
-
[root@test-plccg ~]#
+
[root@headnode ~]#
We are interested in profile named "ComputeNodes":-
We are interested in profile named "ComputeNodes":-
-
[root@test-plccg ~]# cobbler profile report --name=ComputeNodes
+
[root@headnode ~]# cobbler profile report --name=ComputeNodes
profile              : ComputeNodes
profile              : ComputeNodes
distro              : Centos5.4-x86_64
distro              : Centos5.4-x86_64
Line 926: Line 926:
virt type            : qemu
virt type            : qemu
-
[root@test-plccg ~]#     
+
[root@headnode ~]#     
-
[root@test-plccg ~]# cobbler profile edit --name=ComputeNodes --ksmeta="console=ttyS1,115200"
+
[root@headnode ~]# cobbler profile edit --name=ComputeNodes --ksmeta="console=ttyS1,115200"
-
[root@test-plccg ~]# cobbler sync
+
[root@headnode ~]# cobbler sync
Starting dhcpd:                                            [  OK  ]
Starting dhcpd:                                            [  OK  ]
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
-
[root@test-plccg ~]# cobbler system edit --name compute1 --netboot-enabled=1
+
[root@headnode ~]# cobbler system edit --name compute1 --netboot-enabled=1
-
[root@test-plccg ~]# cobbler sync
+
[root@headnode ~]# cobbler sync
Shutting down dhcpd:                                      [  OK  ]
Shutting down dhcpd:                                      [  OK  ]
Starting dhcpd:                                            [  OK  ]
Starting dhcpd:                                            [  OK  ]
-
[root@test-plccg ~]# cat /tftpboot/pxelinux.cfg/01-00-1d-09-6a-27-91
+
[root@headnode ~]# cat /tftpboot/pxelinux.cfg/01-00-1d-09-6a-27-91
default linux
default linux
prompt 0
prompt 0
Line 952: Line 952:
         append initrd=/images/Centos5.4-x86_64/initrd.img ksdevice=bootif lang=  console=ttyS1,115200 text noipv6 kssendmac  ks=http://192.168.1.200/cblr/svc/op/ks/system/compute1
         append initrd=/images/Centos5.4-x86_64/initrd.img ksdevice=bootif lang=  console=ttyS1,115200 text noipv6 kssendmac  ks=http://192.168.1.200/cblr/svc/op/ks/system/compute1
-
[root@test-plccg ~]#
+
[root@headnode ~]#
Line 958: Line 958:
ipmiconsole
ipmiconsole
-
[root@test-plccg ~]# ipmiconsole --hostname=192.168.0.1 --username=root --password=ipmisecret
+
[root@headnode ~]# ipmiconsole --hostname=192.168.0.1 --username=root --password=ipmisecret
ipmiconsole_submit_block: internal system error
ipmiconsole_submit_block: internal system error
-
[root@test-plccg ~]# ipmiconsole --hostname=192.168.0.1 --username=root --password=redhat
+
[root@headnode ~]# ipmiconsole --hostname=192.168.0.1 --username=root --password=redhat
ipmiconsole_submit_block: internal system error
ipmiconsole_submit_block: internal system error
-
[root@test-plccg ~]# ifconfig
+
[root@headnode ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1D:09:69:F3:BB
eth0      Link encap:Ethernet  HWaddr 00:1D:09:69:F3:BB
           inet6 addr: fe80::21d:9ff:fe69:f3bb/64 Scope:Link
           inet6 addr: fe80::21d:9ff:fe69:f3bb/64 Scope:Link
Line 975: Line 975:
           inet6 addr: ::1/128 Scope:Host
           inet6 addr: ::1/128 Scope:Host
-
[root@test-plccg ~]# ifconfig eth0 192.168.0.201 netmask 255.255.255.0 up
+
[root@headnode ~]# ifconfig eth0 192.168.0.201 netmask 255.255.255.0 up
-
[root@test-plccg ~]# ifconfig
+
[root@headnode ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1D:09:69:F3:BB
eth0      Link encap:Ethernet  HWaddr 00:1D:09:69:F3:BB
           inet addr:192.168.0.201  Bcast:192.168.0.255  Mask:255.255.255.0
           inet addr:192.168.0.201  Bcast:192.168.0.255  Mask:255.255.255.0
Line 989: Line 989:
           inet6 addr: ::1/128 Scope:Host
           inet6 addr: ::1/128 Scope:Host
-
[root@test-plccg ~]# ipmiconsole --hostname=192.168.0.1 --username=root --password=ipmisecret
+
[root@headnode ~]# ipmiconsole --hostname=192.168.0.1 --username=root --password=ipmisecret
[SOL established]
[SOL established]
Line 996: Line 996:
Also if the node is off, cycle may not work:-
Also if the node is off, cycle may not work:-
-
[root@test-plccg ~]# ipmipower --hostname=192.168.0.1 --username=root --password=ipmisecret --cycle
+
[root@headnode ~]# ipmipower --hostname=192.168.0.1 --username=root --password=ipmisecret --cycle
192.168.0.1: operation invalid
192.168.0.1: operation invalid
-
[root@test-plccg ~]# ipmipower --hostname=192.168.0.1 --username=root --password=ipmisecret --off
+
[root@headnode ~]# ipmipower --hostname=192.168.0.1 --username=root --password=ipmisecret --off
192.168.0.1: ok
192.168.0.1: ok
-
[root@test-plccg ~]# ipmipower --hostname=192.168.0.1 --username=root --password=ipmisecret --on
+
[root@headnode ~]# ipmipower --hostname=192.168.0.1 --username=root --password=ipmisecret --on
192.168.0.1: ok
192.168.0.1: ok
-
[root@test-plccg ~]#
+
[root@headnode ~]#
-----------------------------------
-----------------------------------
Line 1,034: Line 1,034:
-
[root@test-plccg ~]# cobbler check
+
[root@headnode ~]# cobbler check
The following potential problems were detected:
The following potential problems were detected:
#0: service dhcpd is not running
#0: service dhcpd is not running
Line 1,040: Line 1,040:
#2: yum-utils need to be at least version 1.1.17 for reposync -l, current version is 1.1.16
#2: yum-utils need to be at least version 1.1.17 for reposync -l, current version is 1.1.16
#3: 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
#3: 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
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
-
[root@test-plccg ~]# cobbler list
+
[root@headnode ~]# cobbler list
distro Centos5.4-x86_64
distro Centos5.4-x86_64
   profile Centos5.4-x86_64
   profile Centos5.4-x86_64
Line 1,050: Line 1,050:
distro Centos5.4-xen-x86_64
distro Centos5.4-xen-x86_64
   profile Centos5.4-xen-x86_64
   profile Centos5.4-xen-x86_64
-
[root@test-plccg ~]#
+
[root@headnode ~]#
   
   
-
[root@test-plccg ~]# cobbler distro list
+
[root@headnode ~]# cobbler distro list
Centos5.4-x86_64
Centos5.4-x86_64
Centos5.4-xen-x86_64
Centos5.4-xen-x86_64
-
[root@test-plccg ~]#
+
[root@headnode ~]#
-
[root@test-plccg ~]# cobbler profile list
+
[root@headnode ~]# cobbler profile list
Centos5.4-x86_64
Centos5.4-x86_64
Centos5.4-xen-x86_64
Centos5.4-xen-x86_64
rescue-Centos5.4-x86_64
rescue-Centos5.4-x86_64
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
No systems are registered with cobbler at the moment:-
No systems are registered with cobbler at the moment:-
-
[root@test-plccg ~]# cobbler system list
+
[root@headnode ~]# cobbler system list
-
[root@test-plccg ~]#
+
[root@headnode ~]#
Lets create a profile for compute-nodes:-
Lets create a profile for compute-nodes:-
-
[root@test-plccg ~]# cobbler profile copy --name=Centos5.4-x86_64 --newname=ComputeNodes
+
[root@headnode ~]# cobbler profile copy --name=Centos5.4-x86_64 --newname=ComputeNodes
-
[root@test-plccg ~]# cobbler profile list
+
[root@headnode ~]# cobbler profile list
Centos5.4-x86_64
Centos5.4-x86_64
Centos5.4-xen-x86_64
Centos5.4-xen-x86_64
ComputeNodes                # <------------ Newly added profile!
ComputeNodes                # <------------ Newly added profile!
rescue-Centos5.4-x86_64
rescue-Centos5.4-x86_64
-
[root@test-plccg ~]#
+
[root@headnode ~]#
-
[root@test-plccg ~]# cobbler profile report --name=ComputeNodes
+
[root@headnode ~]# cobbler profile report --name=ComputeNodes
profile              : ComputeNodes
profile              : ComputeNodes
distro              : Centos5.4-x86_64
distro              : Centos5.4-x86_64
Line 1,113: Line 1,113:
virt type            : qemu
virt type            : qemu
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
-
[root@test-plccg ~]# cat /var/lib/cobbler/kickstarts/default.ks
+
[root@headnode ~]# cat /var/lib/cobbler/kickstarts/default.ks
# this file intentionally left blank
# this file intentionally left blank
# admins:  edit it as you like, or leave it blank for non-interactive install
# admins:  edit it as you like, or leave it blank for non-interactive install
-
[root@test-plccg ~]# cat /var/lib/cobbler/kickstarts/sample.ks
+
[root@headnode ~]# cat /var/lib/cobbler/kickstarts/sample.ks
#platform=x86, AMD64, or Intel EM64T
#platform=x86, AMD64, or Intel EM64T
# System authorization information
# System authorization information
Line 1,191: Line 1,191:
$kickstart_done
$kickstart_done
# End final steps
# End final steps
-
[root@test-plccg ~]#
+
[root@headnode ~]#
-
[root@test-plccg ~]# cd /var/lib/cobbler/kickstarts/
+
[root@headnode ~]# cd /var/lib/cobbler/kickstarts/
-
[root@test-plccg kickstarts]# cp sample.ks Compute.ks
+
[root@headnode kickstarts]# cp sample.ks Compute.ks
-
[root@test-plccg kickstarts]# vi Compute.ks
+
[root@headnode kickstarts]# vi Compute.ks
#platform=x86, AMD64, or Intel EM64T
#platform=x86, AMD64, or Intel EM64T
# System authorization information
# System authorization information
Line 1,270: Line 1,270:
$kickstart_done
$kickstart_done
# End final steps
# End final steps
-
[root@test-plccg kickstarts]#  
+
[root@headnode kickstarts]#  
-
[root@test-plccg kickstarts]# cobbler profile edit --name=ComputeNodes --kickstart=/var/lib/cobbler/kickstarts/Compute.ks
+
[root@headnode kickstarts]# cobbler profile edit --name=ComputeNodes --kickstart=/var/lib/cobbler/kickstarts/Compute.ks
-
[root@test-plccg kickstarts]#  
+
[root@headnode kickstarts]#  
Verify the change:-
Verify the change:-
-
[root@test-plccg kickstarts]# cobbler profile report --name=ComputeNodes | grep kickstart
+
[root@headnode kickstarts]# cobbler profile report --name=ComputeNodes | grep kickstart
kickstart            : /var/lib/cobbler/kickstarts/Compute.ks
kickstart            : /var/lib/cobbler/kickstarts/Compute.ks
-
[root@test-plccg kickstarts]#   
+
[root@headnode kickstarts]#   
Now define/ add compute nodes:-
Now define/ add compute nodes:-
-
[root@test-plccg ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6A:27:8F
+
[root@headnode ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6A:27:8F
-
[root@test-plccg ~]# cobbler system add --name=compute2 --profile=ComputeNodes --mac=00:1D:09:6B:06:7F
+
[root@headnode ~]# cobbler system add --name=compute2 --profile=ComputeNodes --mac=00:1D:09:6B:06:7F
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
Line 1,295: Line 1,295:
In case you try to make a duplicate entry:-
In case you try to make a duplicate entry:-
-
[root@test-plccg ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6B:06:7F
+
[root@headnode ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6B:06:7F
An object already exists with that name.  Try 'edit'?
An object already exists with that name.  Try 'edit'?
------------------------------  
------------------------------  
-
[root@test-plccg ~]# cobbler system list
+
[root@headnode ~]# cobbler system list
compute1
compute1
compute2
compute2
-
[root@test-plccg ~]#  
+
[root@headnode ~]#  
You can check report of the nodes now. I am only interested in few parameters.
You can check report of the nodes now. I am only interested in few parameters.
-
[root@test-plccg ~]# cobbler system report | egrep "system|profile|power type|interface|mac"
+
[root@headnode ~]# cobbler system report | egrep "system|profile|power type|interface|mac"
system                : compute1
system                : compute1
profile              : ComputeNodes
profile              : ComputeNodes
Line 1,319: Line 1,319:
interface        : eth0
interface        : eth0
   mac address    : 00:1D:09:6B:06:7F
   mac address    : 00:1D:09:6B:06:7F
-
[root@test-plccg ~]#                       
+
[root@headnode ~]#                       
I need to change the interface from eth0 to eth1.  
I need to change the interface from eth0 to eth1.  
-
[root@test-plccg ~]# cobbler system edit --name=compute1 --interface=eth1  --power-type=ipmitool --power-user=root --power-pass=calvin
+
[root@headnode ~]# cobbler system edit --name=compute1 --interface=eth1  --power-type=ipmitool --power-user=root --power-pass=calvin
-
[root@test-plccg ~]# cobbler system edit --name=compute2 --interface=eth1  --power-type=ipmitool --power-user=root --power-pass=calvin
+
[root@headnode ~]# cobbler system edit --name=compute2 --interface=eth1  --power-type=ipmitool --power-user=root --power-pass=calvin
-
[root@test-plccg ~]#   
+
[root@headnode ~]#   
-
[root@test-plccg ~]# cobbler system report | egrep "system|profile|power type|interface|mac"
+
[root@headnode ~]# cobbler system report | egrep "system|profile|power type|interface|mac"
system                : compute1
system                : compute1
profile              : ComputeNodes
profile              : ComputeNodes
Line 1,340: Line 1,340:
interface        : eth0
interface        : eth0
   mac address    : 00:1D:09:6B:06:7F
   mac address    : 00:1D:09:6B:06:7F
-
[root@test-plccg ~]#
+
[root@headnode ~]#
-
[root@test-plccg ~]# cat /tftpboot/pxelinux.cfg/01-00-1d-09-6a-27-8f
+
[root@headnode ~]# cat /tftpboot/pxelinux.cfg/01-00-1d-09-6a-27-8f
default linux
default linux
prompt 0
prompt 0
Line 1,352: Line 1,352:
         append initrd=/images/Centos5.4-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.1.200/cblr/svc/op/ks/system/compute1
         append initrd=/images/Centos5.4-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.1.200/cblr/svc/op/ks/system/compute1
-
[root@test-plccg ~]#
+
[root@headnode ~]#
service cobblerd restart
service cobblerd restart
-
[root@test-plccg ~]# service dhcpd restart
+
[root@headnode ~]# service dhcpd restart
Starting dhcpd:                                            [FAILED]
Starting dhcpd:                                            [FAILED]
-
[root@test-plccg ~]#   
+
[root@headnode ~]#   
Wasted all my day. This is the fix:-
Wasted all my day. This is the fix:-
-
[root@test-plccg ~]# cobbler sync
+
[root@headnode ~]# cobbler sync
Shutting down dhcpd:                                      [  OK  ]
Shutting down dhcpd:                                      [  OK  ]
Starting dhcpd:                                            [  OK  ]
Starting dhcpd:                                            [  OK  ]
-
[root@test-plccg ~]# cat /etc/dhcpd.conf
+
[root@headnode ~]# cat /etc/dhcpd.conf
# ******************************************************************
# ******************************************************************
# Cobbler managed dhcpd.conf file
# Cobbler managed dhcpd.conf file
Line 1,406: Line 1,406:
}
}
-
[root@test-plccg ~]#
+
[root@headnode ~]#

Revision as of 21:28, 10 February 2010

Cobbler Howto:- =Cobbler install on Dell 1950 Servers. This setup consists of four Dell PowerEdge 1950 servers, connected to each other in a cluster form. The intended purpose of this excercise is to find a way to provision compute nodes, without hassle. This should be ideal for data centers (both HPCC and non-HPCC).


Help from:-

http://www.openskill.info/blog.php?ID=16 http://magazine.redhat.com/2007/08/10/cobbler-how-to-set-up-a-network-boot-server-in-10-minutes/ http://www.enterprisenetworkingplanet.com/netsysm/article.php/3773596 http://www.kanarip.com/courses/Deploying_Linux_Using_Cobbler/


The system has Centos 5.4 x86_64 installed as base OS. You might want to update it before continuing.

yum -y  update


After this you should make sure that you have the following installed, from your distribution media / repository.

  • httpd
  • tftp-server
  • xinetd
  • reposync (yum-utils provides reposync)

yum -y install httpd yum-utils tftp-server xinetd dhcp

Make sure you are not running kernel-xen on your base OS. (Although it does not matter, but I just want to keep things simple). My scenario requires me not to run kernel-xen. (We are not using virtualization features. These are pure compute nodes.)

Using the link: https://fedorahosted.org/cobbler/wiki/DownloadInstructions

Setup Cobbler Repositories:- (Needs internet connection).


[root@headnode ~]# vi /etc/yum.repos.d/CentOS-Base.repo 
. . .
. . . 
[cobbler-stable]
name=Cobbler-Stable
baseurl=http://download.fedora.redhat.com/pub/epel/5/x86_64

[cobbler-testing]
name=Cobbler-Testing
baseurl=http://download.fedora.redhat.com/pub/epel/testing/5/x86_64
. . .
. . .  
[root@headnode ~]# 


Now, install cobbler:-

[root@headnode ~]# yum -y install cobbler koan cman


I have various CD images in my /data/cdimages location. I expanded the ISO image and copied it in CentOS-5.4-x86_64 .

[root@headnode cdimages]# ls
CentOS-5.3-i386.DVD.iso        
CentOS-5.4-x86_64              
CentOS-5.4-x86_64-bin-DVD.iso  
[root@headnode cdimages]#

Assuming you have entire CD media copied in your /data/cdimages/CentOS-5.4-x86_64 , you are now ready to import the repository.

cobbler import --mirror=/data/cdimages/CentOS-5.4-x86_64 --name=Centos5.4-x86_64

or

cobbler import --path=/data/cdimages/CentOS-5.4-x86_64 --name=Centos5.4-x86_64

During import you should get some screen out put as:

[root@headnode cdimages]# cobbler import --mirror=/data/cdimages/CentOS-5.4-x86_64 --name=Centos5.4-x86_64
. . .
 . . .

repodata/primary.sqlite.bz2                                                                                           
     2141520 100%    3.07MB/s    0:00:00 (xfer#3468, to-check=2/3478)                                                 
repodata/primary.xml.gz                                                                                               
     1189512 100%    1.67MB/s    0:00:00 (xfer#3469, to-check=1/3478)                                                 
repodata/repomd.xml                                                                                                   
        2142 100%    3.09kB/s    0:00:00 (xfer#3470, to-check=0/3478)                                                 

sent 4333936317 bytes  received 76408 bytes  39580024.89 bytes/sec
total size is 4333090152  speedup is 1.00
---------------- (adding distros)
- found content (breed=redhat) at /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/xen
- creating new distro: Centos5.4-xen-x86_64
- creating new profile: Centos5.4-xen-x86_64
- found content (breed=redhat) at /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/pxeboot
- creating new distro: Centos5.4-x86_64
- creating new profile: Centos5.4-x86_64
- creating new profile: rescue-Centos5.4-x86_64
---------------- (associating repos)
- traversing distro Centos5.4-xen-x86_64
- found content (breed=redhat) at /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/xen
- descent into /var/www/cobbler/ks_mirror/Centos5.4-x86_64
- processing repo at : /var/www/cobbler/ks_mirror/Centos5.4-x86_64
- need to process repo/comps: /var/www/cobbler/ks_mirror/Centos5.4-x86_64
- looking for /var/www/cobbler/ks_mirror/Centos5.4-x86_64/repodata/*comps*.xml
- createrepo -c cache --groupfile /var/www/cobbler/ks_mirror/Centos5.4-x86_64/repodata/comps.xml /var/www/cobbler/ks_mirror/Centos5.4-x86_64
3309/3309 - CentOS/sblim-cim-client-javadoc-1-35.el5.x86_64.rpm                 rpm64.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
- traversing distro Centos5.4-x86_64
- found content (breed=redhat) at /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/pxeboot
- descent into /var/www/cobbler/ks_mirror/Centos5.4-x86_64
- processing repo at : /var/www/cobbler/ks_mirror/Centos5.4-x86_64
- need to process repo/comps: /var/www/cobbler/ks_mirror/Centos5.4-x86_64
- looking for /var/www/cobbler/ks_mirror/Centos5.4-x86_64/repodata/*comps*.xml
- createrepo -c cache --groupfile /var/www/cobbler/ks_mirror/Centos5.4-x86_64/repodata/comps.xml /var/www/cobbler/ks_mirror/Centos5.4-x86_64
3309/3309 - CentOS/sblim-cim-client-javadoc-1-35.el5.x86_64.rpm                 rpm64.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
---------------- (associating kickstarts)
- found content (breed=redhat) at /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/pxeboot
- found content (breed=redhat) at /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/xen
- found content (breed=redhat) at /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/pxeboot
[root@headnode cdimages]#


Time for cobbler configurations:-

[root@headnode ~]# vi /etc/cobbler/settings 
server = 192.168.1.203
nextserver=192.168.1.203
pxe_just_once = 1
. . .

Now you should start the cobblerd service along httpd, dhcpd and tftp server.


chkconfig --level 35 cobblerd on
chkconfig --level 35 httpd on
chkconfig --level 35 xinetd on
chkconfig --level 35 dhcpd on


service cobblerd restart 
service httpd restart 
service dhcpd restart 
service xinetd restart 

Should enable the tftp service in /etc/xinetd.d/tftp , and change disabled=no .

Now run cobbler check and fix any obvious errors.

cobbler check # important


You may want to disable un-necessary services on this server before moving on:

chkconfig --level 35  NetworkManager  off                                                          
chkconfig --level 35  autofs  off                                                                  
chkconfig --level 35  avahi-daemon  off                                                            
chkconfig --level 35  avahi-dnsconfd  off                                                          
chkconfig --level 35  bluetooth  off                                                               
chkconfig --level 35  cups  off                                                                    
chkconfig --level 35  dc_client  off                                                               
chkconfig --level 35  dc_server  off                                                               
chkconfig --level 35  dhcrelay  off                                                                
chkconfig --level 35  dnsmasq  off                                                                 
chkconfig --level 35  dund  off                                                                    
chkconfig --level 35  firstboot  off                                                               
chkconfig --level 35  gpm  off                                                                     
chkconfig --level 35  hidd  off                                                                    
chkconfig --level 35  ip6tables  off                                                               
chkconfig --level 35  iptables  off                                                                
chkconfig --level 35  irda  off                                                                    
chkconfig --level 35  iscsi  off                                                                   
chkconfig --level 35  iscsid  off                                                                  
chkconfig --level 35  kdump  off                                                                   
chkconfig --level 35  libvirtd  off                                                                
chkconfig --level 35  lisa  off                                                                    
chkconfig --level 35  lvm2-monitor  off                                                            
chkconfig --level 35  mdmonitor  off                                                               
chkconfig --level 35  mdmpd  off                                                                   
chkconfig --level 35  multipathd  off                                                              
chkconfig --level 35  mysqld  off                                                                  
chkconfig --level 35  named  off                                                                   
chkconfig --level 35  netconsole  off                                                              
chkconfig --level 35  netfs  off                                                                   
chkconfig --level 35  netplugd  off                                                                
chkconfig --level 35  nfs  off                                                                     
chkconfig --level 35  nfslock  off                                                                 
chkconfig --level 35  nscd  off                                                                    
chkconfig --level 35  ntpd  off                                                                    
chkconfig --level 35  oddjobd  off                                                                 
chkconfig --level 35  pand  off                                                                    
chkconfig --level 35  pcscd  off
chkconfig --level 35  psacct  off
chkconfig --level 35  qemu  off
chkconfig --level 35  rawdevices  off
chkconfig --level 35  rdisc  off
chkconfig --level 35  readahead_later  off
chkconfig --level 35  restorecond  off
chkconfig --level 35  rpcgssd  off
chkconfig --level 35  rpcidmapd  off
chkconfig --level 35  rpcsvcgssd  off
chkconfig --level 35  saslauthd  off
chkconfig --level 35  sendmail  off
chkconfig --level 35  setroubleshoot  off
chkconfig --level 35  smartd  off
chkconfig --level 35  smb  off
chkconfig --level 35  squid  off
chkconfig --level 35  tcsd  off
chkconfig --level 35  tux  off
chkconfig --level 35  vncserver  off
chkconfig --level 35  wdaemon  off
chkconfig --level 35  winbind  off
chkconfig --level 35  wpa_supplicant  off
chkconfig --level 35  xend  off
chkconfig --level 35  xendomains  off
chkconfig --level 35  ypbind  off
chkconfig --level 35  yum-updatesd  off

End of day 1.

Contents

=============

Day 2: Cobbler howto-2

=

[root@headnode ~]# cobbler check The following potential problems were detected:

  1. 0: service dhcpd is not running
  2. 1: since iptables may be running, ensure 69, 80, and 25151 are unblocked
  3. 2: yum-utils need to be at least version 1.1.17 for reposync -l, current version is 1.1.16
  4. 3: 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

[root@headnode ~]#


[root@headnode ~]# cobbler list distro Centos5.4-x86_64

  profile Centos5.4-x86_64
  profile rescue-Centos5.4-x86_64

distro Centos5.4-xen-x86_64

  profile Centos5.4-xen-x86_64

[root@headnode ~]#


[root@headnode ~]# cobbler distro list Centos5.4-x86_64 Centos5.4-xen-x86_64 [root@headnode ~]#


[root@headnode ~]# cobbler profile list Centos5.4-x86_64 Centos5.4-xen-x86_64 rescue-Centos5.4-x86_64 [root@headnode ~]#


No systems are registered with cobbler at the moment:-

[root@headnode ~]# cobbler system list [root@headnode ~]#


Lets create a profile for compute-nodes:-

[root@headnode ~]# cobbler profile copy --name=Centos5.4-x86_64 --newname=ComputeNodes


[root@headnode ~]# cobbler profile list Centos5.4-x86_64 Centos5.4-xen-x86_64 ComputeNodes # <------------ Newly added profile! rescue-Centos5.4-x86_64 [root@headnode ~]#


[root@headnode ~]# cobbler profile report --name=ComputeNodes profile  : ComputeNodes distro  : Centos5.4-x86_64 comment  : created  : Tue Feb 2 09:06:50 2010 dhcp tag  : default enable menu  : True kernel options  : {} kickstart  : /var/lib/cobbler/kickstarts/default.ks # < ------------ Notice this default Kickstart. ks metadata  : {} mgmt classes  : [] modified  : Tue Feb 2 09:06:50 2010 name servers  : [] name servers search  : [] owners  : ['admin'] post kernel options  : {} redhat mgmt key  : <<inherit>> redhat mgmt server  : <<inherit>> repos  : [] server  : <<inherit>> template_files  : {} virt bridge  : xenbr0 virt cpus  : 1 virt file size  : 5 virt path  : virt ram  : 512 virt type  : qemu

[root@headnode ~]#


[root@headnode ~]# cat /var/lib/cobbler/kickstarts/default.ks

  1. this file intentionally left blank
  2. admins: edit it as you like, or leave it blank for non-interactive install


[root@headnode ~]# cat /var/lib/cobbler/kickstarts/sample.ks

  1. platform=x86, AMD64, or Intel EM64T
  2. System authorization information

auth --useshadow --enablemd5

  1. System bootloader configuration

bootloader --location=mbr

  1. Partition clearing information

clearpart --all --initlabel

  1. Use text mode install

text

  1. Firewall configuration

firewall --enabled

  1. Run the Setup Agent on first boot

firstboot --disable

  1. System keyboard

keyboard us

  1. System language

lang en_US

  1. Use network installation

url --url=$tree

  1. If any cobbler repo definitions were referenced in the kickstart profile, include them here.

$yum_repo_stanza

  1. Network information

$SNIPPET('network_config')

  1. Reboot after installation

reboot

  1. Root password

rootpw --iscrypted $default_password_crypted

  1. SELinux configuration

selinux --disabled

  1. Do not configure the X Window System

skipx

  1. System timezone

timezone America/New_York

  1. Install OS instead of upgrade

install

  1. Clear the Master Boot Record

zerombr

  1. Allow anaconda to partition the system as needed

autopart

%pre $SNIPPET('log_ks_pre') $kickstart_start $SNIPPET('pre_install_network_config')

  1. Enable installation monitoring

$SNIPPET('pre_anamon')

%packages $SNIPPET('func_install_if_enabled')

%post $SNIPPET('log_ks_post')

  1. Start yum configuration

$yum_config_stanza

  1. End yum configuration

$SNIPPET('post_install_kernel_options') $SNIPPET('post_install_network_config') $SNIPPET('func_register_if_enabled') $SNIPPET('download_config_files') $SNIPPET('koan_environment') $SNIPPET('redhat_register') $SNIPPET('cobbler_register')

  1. Enable post-install boot notification

$SNIPPET('post_anamon')

  1. Start final steps

$kickstart_done

  1. End final steps

[root@headnode ~]#


[root@headnode ~]# cd /var/lib/cobbler/kickstarts/

[root@headnode kickstarts]# cp sample.ks Compute.ks

[root@headnode kickstarts]# vi Compute.ks

  1. platform=x86, AMD64, or Intel EM64T
  2. System authorization information

auth --useshadow --enablemd5

  1. System bootloader configuration

bootloader --location=mbr

  1. Partition clearing information

clearpart --all --initlabel

  1. Use text mode install

text

  1. Firewall configuration

firewall --disabled

  1. Run the Setup Agent on first boot

firstboot --disable

  1. System keyboard

keyboard us

  1. System language

lang en_US

  1. Use network installation

url --url=$tree

  1. If any cobbler repo definitions were referenced in the kickstart profile, include them here.

$yum_repo_stanza

  1. Network information

$SNIPPET('network_config')

  1. Reboot after installation

reboot

  1. Root password

rootpw --iscrypted $default_password_crypted

  1. SELinux configuration

selinux --disabled

  1. Do not configure the X Window System

skipx

  1. System timezone

timezone Asia/Riyadh

  1. Install OS instead of upgrade

install

  1. Clear the Master Boot Record

zerombr

  1. Allow anaconda to partition the system as needed
  2. autopart

part /boot --size 512 part swap --size 1024 part / --size 4096


%pre $SNIPPET('log_ks_pre') $kickstart_start $SNIPPET('pre_install_network_config')

  1. Enable installation monitoring

$SNIPPET('pre_anamon')

%packages @core $SNIPPET('func_install_if_enabled')

%post $SNIPPET('log_ks_post')

  1. Start yum configuration

$yum_config_stanza

  1. End yum configuration

$SNIPPET('post_install_kernel_options') $SNIPPET('post_install_network_config') $SNIPPET('func_register_if_enabled') $SNIPPET('download_config_files') $SNIPPET('koan_environment') $SNIPPET('redhat_register') $SNIPPET('cobbler_register')

  1. Enable post-install boot notification

$SNIPPET('post_anamon')

  1. Start final steps

$kickstart_done

  1. End final steps

[root@headnode kickstarts]#


[root@headnode kickstarts]# cobbler profile edit --name=ComputeNodes --kickstart=/var/lib/cobbler/kickstarts/Compute.ks [root@headnode kickstarts]#


Verify the change:-

[root@headnode kickstarts]# cobbler profile report --name=ComputeNodes | grep kickstart kickstart  : /var/lib/cobbler/kickstarts/Compute.ks [root@headnode kickstarts]#


Now define/ add compute nodes:-

[root@headnode ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6A:27:91

[root@headnode ~]# cobbler system add --name=compute2 --profile=ComputeNodes --mac=00:1D:09:6B:06:81 [root@headnode ~]#



Note ----------

In case you try to make a duplicate entry:-

[root@headnode ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6B:06:7F An object already exists with that name. Try 'edit'?


[root@headnode ~]# cobbler system list compute1 compute2 [root@headnode ~]#


You can check report of the nodes now. I am only interested in few parameters.

[root@headnode ~]# cobbler system report | egrep "system|profile|power type|interface|mac" system  : compute1 profile  : ComputeNodes power type  : ipmitool interface  : eth0

 mac address    : 00:1D:09:6A:27:8F

system  : compute2 profile  : ComputeNodes power type  : ipmitool interface  : eth0

 mac address    : 00:1D:09:6B:06:7F

[root@headnode ~]#

I need to change the interface from eth0 to eth1.


[root@headnode ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6A:27:91 --hostname=compute1.example.com --interface=eth1 --ip=192.168.1.1 --subnet=255.255.255.0 --kopts=noipv6 --power-address=192.168.0.1 --power-user=root --power-pass=power

[root@headnode ~]# cobbler system add --name=compute2 --profile=ComputeNodes --mac=00:1D:09:6B:06:81 --hostname=compute2.example.com --interface=eth1 --ip=192.168.1.2 --subnet=255.255.255.0 --kopts=noipv6 --power-address=192.168.0.2 --power-user=root --power-pass=power [root@headnode ~]#


[root@headnode ~]# cobbler system report | egrep "system|profile|power type|interface|mac" system  : compute1 profile  : ComputeNodes power type  : ipmitool interface  : eth0

 mac address    : 00:1D:09:6A:27:8F

system  : compute2 profile  : ComputeNodes power type  : ipmitool interface  : eth0

 mac address    : 00:1D:09:6B:06:7F

[root@headnode ~]#


[root@headnode ~]# cat /tftpboot/pxelinux.cfg/01-00-1d-09-6a-27-8f default linux prompt 0 timeout 1 label linux

       kernel /images/Centos5.4-x86_64/vmlinuz
       ipappend 2
       append initrd=/images/Centos5.4-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.1.200/cblr/svc/op/ks/system/compute1

[root@headnode ~]#


service cobblerd restart

[root@headnode ~]# service dhcpd restart Starting dhcpd: [FAILED] [root@headnode ~]#


Wasted all my day. This is the fix:-

[root@headnode ~]# cobbler sync Shutting down dhcpd: [ OK ] Starting dhcpd: [ OK ]


[root@headnode ~]# cat /etc/dhcpd.conf

  1. ******************************************************************
  2. Cobbler managed dhcpd.conf file
  3. generated from cobbler dhcp.conf template (Tue Feb 2 11:47:35 2010)
  4. Do NOT make changes to /etc/dhcpd.conf. Instead, make your changes
  5. in /etc/cobbler/dhcp.template, as /etc/dhcpd.conf will be
  6. overwritten.
  7. ******************************************************************

ddns-update-style interim;

allow booting; allow bootp;

ignore client-updates; set vendorclass = option vendor-class-identifier;

subnet 192.168.1.0 netmask 255.255.255.0 {

    option routers             192.168.1.200;
    option domain-name-servers 192.168.1.200;
    option subnet-mask         255.255.255.0;
    range dynamic-bootp        192.168.1.1 192.168.1.10;
    filename                   "/pxelinux.0";
    default-lease-time         21600;
    max-lease-time             43200;
    next-server                192.168.1.200;

}

  1. group for Cobbler DHCP tag: default

group {

   host generic1 {
       hardware ethernet 00:1D:09:6B:06:91;
       filename "/pxelinux.0";
       next-server 192.168.1.200;
   }

}

[root@headnode ~]#


[root@headnode ~]# ls /tftpboot/pxelinux.cfg/ -l total 12 -rw-r--r-- 1 root root 272 Feb 8 13:18 01-00-1d-09-6a-27-91 -rw-r--r-- 1 root root 272 Feb 8 13:18 01-00-1d-09-6b-06-81 -rw-r--r-- 1 root root 1091 Feb 8 13:18 default [root@headnode ~]#


A bit of power issue.

ipmitool, which is supported by CentOS, could not be found on the system. Instead, ipmipower was there, from freeipmi-rpm.

/etc/cobbler/settings mention something about the power scripts/templates. These are in /etc/cobbler/power directory.


[root@headnode ~]# cd /etc/cobbler/power/ [root@headnode power]# ls power_apc_snmp.template power_ether_wake.template power_ipmitool.template power_wti.template power_bladecenter.template power_ilo.template power_lpar.template power_bullpap.template power_integrity.template power_rsa.template power_drac.template power_ipmilan.template power_virsh.template


[root@headnode power]# cat power_ipmitool.template /usr/bin/ipmitool -H $power_address -U $power_user -P $power_pass power $power_mode [root@headnode power]#

The syntax of ipmitool and ipmipower are a bit different so this is not do-able. (Probably).


[root@headnode ~]# yum -y install OpenIPMI-tools


[root@headnode ~]# rpm -ql OpenIPMI-tools /etc/rc.d/init.d/ipmievd /etc/sysconfig/ipmievd /usr/bin/ipmitool

Ahaa!!!

Time to reboot these nodes and see if they are installed:

[root@headnode power]# cobbler report --what=systems | egrep -i "hostname|netboot" hostname  : compute1.example.com netboot enabled?  : True hostname  : compute2.example.com netboot enabled?  : True [root@headnode power]#


[root@headnode power]# cobbler system reboot --name=compute1 cobbler power configuration is:

     type   : ipmitool
     address: 192.168.0.1
     user   : root
     id     :

- /usr/bin/ipmitool -H 192.168.0.1 -U root -P power power off Chassis Power Control: Down/Off cobbler power configuration is:

     type   : ipmitool
     address: 192.168.0.1
     user   : root
     id     :

- /usr/bin/ipmitool -H 192.168.0.1 -U root -P power power on Chassis Power Control: Up/On [root@headnode power]#

After reboot of node1, the installation started. However it got stuck in an install loop. This happened, because PXE is the first boot device in the nodes.

[root@headnode power]# cobbler report --what=systems | egrep -i "hostname|netboot" hostname  : compute1.example.com netboot enabled?  : True hostname  : compute2.example.com netboot enabled?  : True [root@headnode power]#

For such situations, there is a flag in /etc/cobbler/settings, which turns off the netboot flag, when the installation is done. It is "pxe_just_once" and is set to 0 by default. It needs to be turned to 1 in this situation.

pxe_just_once: 1

This worked!

===============================

Now the few other issues.

1) Static IP for eth1, and see if it still installs from DHCP server. 2) disable eth0 so it does not wait for dhcp when the node reboots in to local os /disk. 3) How to check if the nodes are installed? 4) Console redirection during TFTP and installation.


1) Static IP:-

[root@headnode ~]# cobbler system edit --name compute1 --interface=eth1 --static=1

This is the solution for setting static IP, post-reboot. The installation got done through PXE (good).

Here is what cobbler did:-

[root@compute1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 HWADDR=00:1D:09:6A:27:91 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.1.1 NETMASK=255.255.255.0 [root@compute1 ~]#


2) disable eth0 [root@headnode ~]# cobbler system edit --name=compute1 --delete-interface=eth0 (I don't know, if it will work)

This did not work. Lets set eth0 as static. so it won't waste time on waiting for DHCP and failing.

[root@headnode ~]# cobbler system edit --name compute1 --interface=eth0 --static=1

[root@headnode ~]# cobbler report system --name=compute1 system  : compute1 profile  : ComputeNodes comment  : . . . interface  : eth0

 mac address    :
 is static?     : True
 ip address     :
 subnet         :
 static routes  : []
 dhcp tag       :

interface  : eth1

 mac address    : 00:1D:09:6A:27:91
 is static?     : True
 ip address     : 192.168.1.1
 subnet         : 255.255.255.0
 static routes  : []
 dhcp tag       :

[root@headnode ~]#

This time it worked. I have lovely results!

[root@compute1 ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:1D:09:6A:27:8F

         inet6 addr: fe80::21d:9ff:fe6a:278f/64 Scope:Link

eth1 Link encap:Ethernet HWaddr 00:1D:09:6A:27:91

         inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
         inet6 addr: fe80::21d:9ff:fe6a:2791/64 Scope:Link

lo Link encap:Local Loopback

         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host

[root@compute1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=00:1D:09:6A:27:8F ONBOOT=yes BOOTPROTO=none

[root@compute1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 HWADDR=00:1D:09:6A:27:91 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.1.1 NETMASK=255.255.255.0 [root@compute1 ~]#


Notice that Cobbler set BOOTPROTO=none for eth0.

However the node was not able to ping any other node on IPMI interface. hmmmmmmm.

[root@compute1 ~]# ping 192.168.0.200 connect: Network is unreachable

[root@compute1 ~]# ping 192.168.0.201 connect: Network is unreachable [root@compute1 ~]#


Trying this:- [root@headnode ~]# cobbler system edit --name=compute1 --delete-interface=eth0

This did not help prevent eth0 asking for dhcp / IP.



Day n+1 (3?)


How to pass console redirection options to TFTP file:-

[root@headnode ~]# cobbler distro list Centos5.4-x86_64 Centos5.4-xen-x86_64 [root@headnode ~]#


Centos5.4-x86_64 is the distro we are using for provisioning the nodes.

[root@headnode ~]# cobbler distro report --name=Centos5.4-x86_64 distro  : Centos5.4-x86_64 architecture  : x86_64 breed  : redhat created  : Mon Feb 1 15:06:46 2010 comment  : rhel5.4 initrd  : /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/pxeboot/initrd.img kernel  : /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/pxeboot/vmlinuz kernel options  : {} ks metadata  : {'tree': 'http://@@http_server@@/cblr/links/Centos5.4-x86_64'} tree build time  : Thu Oct 1 19:57:55 2009 modified  : Mon Feb 1 15:10:12 2010 mgmt classes  : [] os version  : rhel5 owners  : ['admin'] post kernel options  : {} redhat mgmt key  : <<inherit>> redhat mgmt server  : <<inherit>> template files  : {}

[root@headnode ~]#

[root@headnode ~]# cobbler distro edit --name=Centos5.4-x86_64 --kopts="console=ttyS1,115200"

[root@headnode ~]# cobbler distro report --name=Centos5.4-x86_64 distro  : Centos5.4-x86_64 architecture  : x86_64 breed  : redhat created  : Mon Feb 1 15:06:46 2010 comment  : rhel5.4 initrd  : /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/pxeboot/initrd.img kernel  : /var/www/cobbler/ks_mirror/Centos5.4-x86_64/images/pxeboot/vmlinuz kernel options  : {'console': 'ttyS1,115200'} ks metadata  : {'tree': 'http://@@http_server@@/cblr/links/Centos5.4-x86_64'} tree build time  : Thu Oct 1 19:57:55 2009 modified  : Tue Feb 9 08:24:51 2010 mgmt classes  : [] os version  : rhel5 owners  : ['admin'] post kernel options  : {} redhat mgmt key  : <<inherit>> redhat mgmt server  : <<inherit>> template files  : {}

[root@headnode ~]#


Now check the profiles:-

[root@headnode ~]# cobbler profile list Centos5.4-x86_64 Centos5.4-xen-x86_64 ComputeNodes rescue-Centos5.4-x86_64 [root@headnode ~]#


We are interested in profile named "ComputeNodes":-

[root@headnode ~]# cobbler profile report --name=ComputeNodes profile  : ComputeNodes distro  : Centos5.4-x86_64 comment  : created  : Tue Feb 2 09:06:50 2010 dhcp tag  : default enable menu  : True kernel options  : {} kickstart  : /var/lib/cobbler/kickstarts/Compute.ks ks metadata  : {} mgmt classes  : [] modified  : Tue Feb 2 09:16:28 2010 name servers  : [] name servers search  : [] owners  : ['admin'] post kernel options  : {} redhat mgmt key  : <<inherit>> redhat mgmt server  : <<inherit>> repos  : [] server  : <<inherit>> template_files  : {} virt bridge  : xenbr0 virt cpus  : 1 virt file size  : 5 virt path  : virt ram  : 512 virt type  : qemu

[root@headnode ~]#


[root@headnode ~]# cobbler profile edit --name=ComputeNodes --ksmeta="console=ttyS1,115200"


[root@headnode ~]# cobbler sync Starting dhcpd: [ OK ] [root@headnode ~]#


[root@headnode ~]# cobbler system edit --name compute1 --netboot-enabled=1

[root@headnode ~]# cobbler sync Shutting down dhcpd: [ OK ] Starting dhcpd: [ OK ]

[root@headnode ~]# cat /tftpboot/pxelinux.cfg/01-00-1d-09-6a-27-91 default linux prompt 0 timeout 1 label linux

       kernel /images/Centos5.4-x86_64/vmlinuz
       ipappend 2
       append initrd=/images/Centos5.4-x86_64/initrd.img ksdevice=bootif lang=  console=ttyS1,115200 text noipv6 kssendmac  ks=http://192.168.1.200/cblr/svc/op/ks/system/compute1

[root@headnode ~]#



ipmiconsole

[root@headnode ~]# ipmiconsole --hostname=192.168.0.1 --username=root --password=ipmisecret ipmiconsole_submit_block: internal system error

[root@headnode ~]# ipmiconsole --hostname=192.168.0.1 --username=root --password=redhat ipmiconsole_submit_block: internal system error

[root@headnode ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:1D:09:69:F3:BB

         inet6 addr: fe80::21d:9ff:fe69:f3bb/64 Scope:Link

eth1 Link encap:Ethernet HWaddr 00:1D:09:69:F3:BD

         inet addr:192.168.1.200  Bcast:192.168.1.255  Mask:255.255.255.0

lo Link encap:Local Loopback

         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host

[root@headnode ~]# ifconfig eth0 192.168.0.201 netmask 255.255.255.0 up

[root@headnode ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:1D:09:69:F3:BB

         inet addr:192.168.0.201  Bcast:192.168.0.255  Mask:255.255.255.0

eth1 Link encap:Ethernet HWaddr 00:1D:09:69:F3:BD

         inet addr:192.168.1.200  Bcast:192.168.1.255  Mask:255.255.255.0
         inet6 addr: fe80::21d:9ff:fe69:f3bd/64 Scope:Link

lo Link encap:Local Loopback

         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host

[root@headnode ~]# ipmiconsole --hostname=192.168.0.1 --username=root --password=ipmisecret [SOL established]


Also if the node is off, cycle may not work:-

[root@headnode ~]# ipmipower --hostname=192.168.0.1 --username=root --password=ipmisecret --cycle 192.168.0.1: operation invalid

[root@headnode ~]# ipmipower --hostname=192.168.0.1 --username=root --password=ipmisecret --off 192.168.0.1: ok

[root@headnode ~]# ipmipower --hostname=192.168.0.1 --username=root --password=ipmisecret --on 192.168.0.1: ok [root@headnode ~]#



When using console=ttyS1,57600n8r , we get a node install time slowed down 5 times. Without it, the node install time was 1 minute. With it the node install time reached 5+ minutes.

Using 115200 as console bnaud rate shows too much garbage on ipmiconsole as soon as the TFTP boot image is read. Before that, the BIOS display part is ok.

Why is that?


Why two console= options in Scali and CVOS?

Gilbert suggests to use console ttyS0 as well, along ttyS1. This is because ttyS1 is redirected to SOL. Whereas ttyS0 is not redirected, thus the messages should appear on the normal VGA console as well.

This did not work. I lost console on both the IPMI console and the node itself.


How to get rid of garbage on console when using 115200 baud rate?

==============================================

Day 2:

Cobbler howto-2

=

[root@headnode ~]# cobbler check The following potential problems were detected:

  1. 0: service dhcpd is not running
  2. 1: since iptables may be running, ensure 69, 80, and 25151 are unblocked
  3. 2: yum-utils need to be at least version 1.1.17 for reposync -l, current version is 1.1.16
  4. 3: 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

[root@headnode ~]#


[root@headnode ~]# cobbler list distro Centos5.4-x86_64

  profile Centos5.4-x86_64
  profile rescue-Centos5.4-x86_64

distro Centos5.4-xen-x86_64

  profile Centos5.4-xen-x86_64

[root@headnode ~]#


[root@headnode ~]# cobbler distro list Centos5.4-x86_64 Centos5.4-xen-x86_64 [root@headnode ~]#


[root@headnode ~]# cobbler profile list Centos5.4-x86_64 Centos5.4-xen-x86_64 rescue-Centos5.4-x86_64 [root@headnode ~]#


No systems are registered with cobbler at the moment:-

[root@headnode ~]# cobbler system list [root@headnode ~]#


Lets create a profile for compute-nodes:-

[root@headnode ~]# cobbler profile copy --name=Centos5.4-x86_64 --newname=ComputeNodes


[root@headnode ~]# cobbler profile list Centos5.4-x86_64 Centos5.4-xen-x86_64 ComputeNodes # <------------ Newly added profile! rescue-Centos5.4-x86_64 [root@headnode ~]#


[root@headnode ~]# cobbler profile report --name=ComputeNodes profile  : ComputeNodes distro  : Centos5.4-x86_64 comment  : created  : Tue Feb 2 09:06:50 2010 dhcp tag  : default enable menu  : True kernel options  : {} kickstart  : /var/lib/cobbler/kickstarts/default.ks # < ------------ Notice this default Kickstart. ks metadata  : {} mgmt classes  : [] modified  : Tue Feb 2 09:06:50 2010 name servers  : [] name servers search  : [] owners  : ['admin'] post kernel options  : {} redhat mgmt key  : <<inherit>> redhat mgmt server  : <<inherit>> repos  : [] server  : <<inherit>> template_files  : {} virt bridge  : xenbr0 virt cpus  : 1 virt file size  : 5 virt path  : virt ram  : 512 virt type  : qemu

[root@headnode ~]#


[root@headnode ~]# cat /var/lib/cobbler/kickstarts/default.ks

  1. this file intentionally left blank
  2. admins: edit it as you like, or leave it blank for non-interactive install


[root@headnode ~]# cat /var/lib/cobbler/kickstarts/sample.ks

  1. platform=x86, AMD64, or Intel EM64T
  2. System authorization information

auth --useshadow --enablemd5

  1. System bootloader configuration

bootloader --location=mbr

  1. Partition clearing information

clearpart --all --initlabel

  1. Use text mode install

text

  1. Firewall configuration

firewall --enabled

  1. Run the Setup Agent on first boot

firstboot --disable

  1. System keyboard

keyboard us

  1. System language

lang en_US

  1. Use network installation

url --url=$tree

  1. If any cobbler repo definitions were referenced in the kickstart profile, include them here.

$yum_repo_stanza

  1. Network information

$SNIPPET('network_config')

  1. Reboot after installation

reboot

  1. Root password

rootpw --iscrypted $default_password_crypted

  1. SELinux configuration

selinux --disabled

  1. Do not configure the X Window System

skipx

  1. System timezone

timezone America/New_York

  1. Install OS instead of upgrade

install

  1. Clear the Master Boot Record

zerombr

  1. Allow anaconda to partition the system as needed

autopart


%pre $SNIPPET('log_ks_pre') $kickstart_start $SNIPPET('pre_install_network_config')

  1. Enable installation monitoring

$SNIPPET('pre_anamon')

%packages $SNIPPET('func_install_if_enabled')

%post $SNIPPET('log_ks_post')

  1. Start yum configuration

$yum_config_stanza

  1. End yum configuration

$SNIPPET('post_install_kernel_options') $SNIPPET('post_install_network_config') $SNIPPET('func_register_if_enabled') $SNIPPET('download_config_files') $SNIPPET('koan_environment') $SNIPPET('redhat_register') $SNIPPET('cobbler_register')

  1. Enable post-install boot notification

$SNIPPET('post_anamon')

  1. Start final steps

$kickstart_done

  1. End final steps

[root@headnode ~]#


[root@headnode ~]# cd /var/lib/cobbler/kickstarts/

[root@headnode kickstarts]# cp sample.ks Compute.ks

[root@headnode kickstarts]# vi Compute.ks

  1. platform=x86, AMD64, or Intel EM64T
  2. System authorization information

auth --useshadow --enablemd5

  1. System bootloader configuration

bootloader --location=mbr

  1. Partition clearing information

clearpart --all --initlabel

  1. Use text mode install

text

  1. Firewall configuration

firewall --disabled

  1. Run the Setup Agent on first boot

firstboot --disable

  1. System keyboard

keyboard us

  1. System language

lang en_US

  1. Use network installation

url --url=$tree

  1. If any cobbler repo definitions were referenced in the kickstart profile, include them here.

$yum_repo_stanza

  1. Network information

$SNIPPET('network_config')

  1. Reboot after installation

reboot

  1. Root password

rootpw --iscrypted $default_password_crypted

  1. SELinux configuration

selinux --disabled

  1. Do not configure the X Window System

skipx

  1. System timezone

timezone Asia/Riyadh

  1. Install OS instead of upgrade

install

  1. Clear the Master Boot Record

zerombr

  1. Allow anaconda to partition the system as needed

autopart


%pre $SNIPPET('log_ks_pre') $kickstart_start $SNIPPET('pre_install_network_config')

  1. Enable installation monitoring

$SNIPPET('pre_anamon')

%packages @base $SNIPPET('func_install_if_enabled')

%post $SNIPPET('log_ks_post')

  1. Start yum configuration

$yum_config_stanza

  1. End yum configuration

$SNIPPET('post_install_kernel_options') $SNIPPET('post_install_network_config') $SNIPPET('func_register_if_enabled') $SNIPPET('download_config_files') $SNIPPET('koan_environment') $SNIPPET('redhat_register') $SNIPPET('cobbler_register')

  1. Enable post-install boot notification

$SNIPPET('post_anamon')

  1. Start final steps

$kickstart_done

  1. End final steps

[root@headnode kickstarts]#


[root@headnode kickstarts]# cobbler profile edit --name=ComputeNodes --kickstart=/var/lib/cobbler/kickstarts/Compute.ks [root@headnode kickstarts]#


Verify the change:-

[root@headnode kickstarts]# cobbler profile report --name=ComputeNodes | grep kickstart kickstart  : /var/lib/cobbler/kickstarts/Compute.ks [root@headnode kickstarts]#


Now define/ add compute nodes:-

[root@headnode ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6A:27:8F

[root@headnode ~]# cobbler system add --name=compute2 --profile=ComputeNodes --mac=00:1D:09:6B:06:7F [root@headnode ~]#



Note ----------

In case you try to make a duplicate entry:-

[root@headnode ~]# cobbler system add --name=compute1 --profile=ComputeNodes --mac=00:1D:09:6B:06:7F An object already exists with that name. Try 'edit'?


[root@headnode ~]# cobbler system list compute1 compute2 [root@headnode ~]#


You can check report of the nodes now. I am only interested in few parameters.

[root@headnode ~]# cobbler system report | egrep "system|profile|power type|interface|mac" system  : compute1 profile  : ComputeNodes power type  : ipmitool interface  : eth0

 mac address    : 00:1D:09:6A:27:8F

system  : compute2 profile  : ComputeNodes power type  : ipmitool interface  : eth0

 mac address    : 00:1D:09:6B:06:7F

[root@headnode ~]#

I need to change the interface from eth0 to eth1.

[root@headnode ~]# cobbler system edit --name=compute1 --interface=eth1 --power-type=ipmitool --power-user=root --power-pass=calvin

[root@headnode ~]# cobbler system edit --name=compute2 --interface=eth1 --power-type=ipmitool --power-user=root --power-pass=calvin [root@headnode ~]#


[root@headnode ~]# cobbler system report | egrep "system|profile|power type|interface|mac" system  : compute1 profile  : ComputeNodes power type  : ipmitool interface  : eth0

 mac address    : 00:1D:09:6A:27:8F

system  : compute2 profile  : ComputeNodes power type  : ipmitool interface  : eth0

 mac address    : 00:1D:09:6B:06:7F

[root@headnode ~]#


[root@headnode ~]# cat /tftpboot/pxelinux.cfg/01-00-1d-09-6a-27-8f default linux prompt 0 timeout 1 label linux

       kernel /images/Centos5.4-x86_64/vmlinuz
       ipappend 2
       append initrd=/images/Centos5.4-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.1.200/cblr/svc/op/ks/system/compute1

[root@headnode ~]#


service cobblerd restart

[root@headnode ~]# service dhcpd restart Starting dhcpd: [FAILED] [root@headnode ~]#


Wasted all my day. This is the fix:-

[root@headnode ~]# cobbler sync Shutting down dhcpd: [ OK ] Starting dhcpd: [ OK ]


[root@headnode ~]# cat /etc/dhcpd.conf

  1. ******************************************************************
  2. Cobbler managed dhcpd.conf file
  3. generated from cobbler dhcp.conf template (Tue Feb 2 11:47:35 2010)
  4. Do NOT make changes to /etc/dhcpd.conf. Instead, make your changes
  5. in /etc/cobbler/dhcp.template, as /etc/dhcpd.conf will be
  6. overwritten.
  7. ******************************************************************

ddns-update-style interim;

allow booting; allow bootp;

ignore client-updates; set vendorclass = option vendor-class-identifier;

subnet 192.168.1.0 netmask 255.255.255.0 {

    option routers             192.168.1.200;
    option domain-name-servers 192.168.1.200;
    option subnet-mask         255.255.255.0;
    range dynamic-bootp        192.168.1.1 192.168.1.10;
    filename                   "/pxelinux.0";
    default-lease-time         21600;
    max-lease-time             43200;
    next-server                192.168.1.200;

}

  1. group for Cobbler DHCP tag: default

group {

   host generic1 {
       hardware ethernet 00:1D:09:6B:06:91;
       filename "/pxelinux.0";
       next-server 192.168.1.200;
   }

}

[root@headnode ~]#

Personal tools