CobblerTest
From WBITT's Cooker!
(Cobbler Testing on a 4 node 1950 Cluster) |
(→==) |
||
Line 135: | Line 135: | ||
End of day 1. | End of day 1. | ||
+ | |||
+ | ========================================================== | ||
+ | |||
+ | Day 2: | ||
+ | |||
+ | Cobbler howto-2 | ||
+ | ============= | ||
+ | |||
+ | |||
+ | [root@test-plccg ~]# cobbler check | ||
+ | The following potential problems were detected: | ||
+ | #0: service dhcpd is not running | ||
+ | #1: since iptables may be running, ensure 69, 80, and 25151 are unblocked | ||
+ | #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 | ||
+ | [root@test-plccg ~]# | ||
+ | |||
+ | |||
+ | |||
+ | [root@test-plccg ~]# 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@test-plccg ~]# | ||
+ | |||
+ | |||
+ | [root@test-plccg ~]# cobbler distro list | ||
+ | Centos5.4-x86_64 | ||
+ | Centos5.4-xen-x86_64 | ||
+ | [root@test-plccg ~]# | ||
+ | |||
+ | |||
+ | [root@test-plccg ~]# cobbler profile list | ||
+ | Centos5.4-x86_64 | ||
+ | Centos5.4-xen-x86_64 | ||
+ | rescue-Centos5.4-x86_64 | ||
+ | [root@test-plccg ~]# | ||
+ | |||
+ | |||
+ | No systems are registered with cobbler at the moment:- | ||
+ | |||
+ | [root@test-plccg ~]# cobbler system list | ||
+ | [root@test-plccg ~]# | ||
+ | |||
+ | |||
+ | Lets create a profile for compute-nodes:- | ||
+ | |||
+ | [root@test-plccg ~]# cobbler profile copy --name=Centos5.4-x86_64 --newname=ComputeNodes | ||
+ | |||
+ | |||
+ | [root@test-plccg ~]# cobbler profile list | ||
+ | Centos5.4-x86_64 | ||
+ | Centos5.4-xen-x86_64 | ||
+ | ComputeNodes # <------------ Newly added profile! | ||
+ | rescue-Centos5.4-x86_64 | ||
+ | [root@test-plccg ~]# | ||
+ | |||
+ | |||
+ | [root@test-plccg ~]# 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@test-plccg ~]# | ||
+ | |||
+ | |||
+ | [root@test-plccg ~]# cat /var/lib/cobbler/kickstarts/default.ks | ||
+ | # this file intentionally left blank | ||
+ | # admins: edit it as you like, or leave it blank for non-interactive install | ||
+ | |||
+ | |||
+ | [root@test-plccg ~]# cat /var/lib/cobbler/kickstarts/sample.ks | ||
+ | #platform=x86, AMD64, or Intel EM64T | ||
+ | # System authorization information | ||
+ | auth --useshadow --enablemd5 | ||
+ | # System bootloader configuration | ||
+ | bootloader --location=mbr | ||
+ | # Partition clearing information | ||
+ | clearpart --all --initlabel | ||
+ | # Use text mode install | ||
+ | text | ||
+ | # Firewall configuration | ||
+ | firewall --enabled | ||
+ | # Run the Setup Agent on first boot | ||
+ | firstboot --disable | ||
+ | # System keyboard | ||
+ | keyboard us | ||
+ | # System language | ||
+ | lang en_US | ||
+ | # Use network installation | ||
+ | url --url=$tree | ||
+ | # If any cobbler repo definitions were referenced in the kickstart profile, include them here. | ||
+ | $yum_repo_stanza | ||
+ | # Network information | ||
+ | $SNIPPET('network_config') | ||
+ | # Reboot after installation | ||
+ | reboot | ||
+ | |||
+ | #Root password | ||
+ | rootpw --iscrypted $default_password_crypted | ||
+ | # SELinux configuration | ||
+ | selinux --disabled | ||
+ | # Do not configure the X Window System | ||
+ | skipx | ||
+ | # System timezone | ||
+ | timezone America/New_York | ||
+ | # Install OS instead of upgrade | ||
+ | install | ||
+ | # Clear the Master Boot Record | ||
+ | zerombr | ||
+ | # Allow anaconda to partition the system as needed | ||
+ | autopart | ||
+ | |||
+ | |||
+ | %pre | ||
+ | $SNIPPET('log_ks_pre') | ||
+ | $kickstart_start | ||
+ | $SNIPPET('pre_install_network_config') | ||
+ | # Enable installation monitoring | ||
+ | $SNIPPET('pre_anamon') | ||
+ | |||
+ | %packages | ||
+ | $SNIPPET('func_install_if_enabled') | ||
+ | |||
+ | %post | ||
+ | $SNIPPET('log_ks_post') | ||
+ | # Start yum configuration | ||
+ | $yum_config_stanza | ||
+ | # 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') | ||
+ | # Enable post-install boot notification | ||
+ | $SNIPPET('post_anamon') | ||
+ | # Start final steps | ||
+ | $kickstart_done | ||
+ | # End final steps | ||
+ | [root@test-plccg ~]# | ||
+ | |||
+ | |||
+ | |||
+ | [root@test-plccg ~]# cd /var/lib/cobbler/kickstarts/ | ||
+ | |||
+ | [root@test-plccg kickstarts]# cp sample.ks Compute.ks | ||
+ | |||
+ | [root@test-plccg kickstarts]# vi Compute.ks | ||
+ | #platform=x86, AMD64, or Intel EM64T | ||
+ | # System authorization information | ||
+ | auth --useshadow --enablemd5 | ||
+ | # System bootloader configuration | ||
+ | bootloader --location=mbr | ||
+ | # Partition clearing information | ||
+ | clearpart --all --initlabel | ||
+ | # Use text mode install | ||
+ | text | ||
+ | # Firewall configuration | ||
+ | firewall --disabled | ||
+ | # Run the Setup Agent on first boot | ||
+ | firstboot --disable | ||
+ | # System keyboard | ||
+ | keyboard us | ||
+ | # System language | ||
+ | lang en_US | ||
+ | # Use network installation | ||
+ | url --url=$tree | ||
+ | # If any cobbler repo definitions were referenced in the kickstart profile, include them here. | ||
+ | $yum_repo_stanza | ||
+ | # Network information | ||
+ | $SNIPPET('network_config') | ||
+ | # Reboot after installation | ||
+ | reboot | ||
+ | |||
+ | #Root password | ||
+ | rootpw --iscrypted $default_password_crypted | ||
+ | # SELinux configuration | ||
+ | selinux --disabled | ||
+ | # Do not configure the X Window System | ||
+ | skipx | ||
+ | # System timezone | ||
+ | timezone Asia/Riyadh | ||
+ | # Install OS instead of upgrade | ||
+ | install | ||
+ | # Clear the Master Boot Record | ||
+ | zerombr | ||
+ | # Allow anaconda to partition the system as needed | ||
+ | autopart | ||
+ | |||
+ | |||
+ | %pre | ||
+ | $SNIPPET('log_ks_pre') | ||
+ | $kickstart_start | ||
+ | $SNIPPET('pre_install_network_config') | ||
+ | # Enable installation monitoring | ||
+ | $SNIPPET('pre_anamon') | ||
+ | |||
+ | %packages | ||
+ | @base | ||
+ | $SNIPPET('func_install_if_enabled') | ||
+ | |||
+ | %post | ||
+ | $SNIPPET('log_ks_post') | ||
+ | # Start yum configuration | ||
+ | $yum_config_stanza | ||
+ | # 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') | ||
+ | # Enable post-install boot notification | ||
+ | $SNIPPET('post_anamon') | ||
+ | # Start final steps | ||
+ | $kickstart_done | ||
+ | # End final steps | ||
+ | [root@test-plccg kickstarts]# | ||
+ | |||
+ | |||
+ | [root@test-plccg kickstarts]# cobbler profile edit --name=ComputeNodes --kickstart=/var/lib/cobbler/kickstarts/Compute.ks | ||
+ | [root@test-plccg kickstarts]# | ||
+ | |||
+ | |||
+ | Verify the change:- | ||
+ | |||
+ | [root@test-plccg kickstarts]# cobbler profile report --name=ComputeNodes | grep kickstart | ||
+ | kickstart : /var/lib/cobbler/kickstarts/Compute.ks | ||
+ | [root@test-plccg kickstarts]# | ||
+ | |||
+ | |||
+ | Now define/ add compute nodes:- | ||
+ | |||
+ | [root@test-plccg ~]# 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@test-plccg ~]# | ||
+ | |||
+ | |||
+ | ------------- Note ---------- | ||
+ | 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 | ||
+ | An object already exists with that name. Try 'edit'? | ||
+ | |||
+ | ------------------------------ | ||
+ | |||
+ | [root@test-plccg ~]# cobbler system list | ||
+ | compute1 | ||
+ | compute2 | ||
+ | [root@test-plccg ~]# | ||
+ | |||
+ | |||
+ | 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" | ||
+ | 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@test-plccg ~]# | ||
+ | |||
+ | 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@test-plccg ~]# cobbler system edit --name=compute2 --interface=eth1 --power-type=ipmitool --power-user=root --power-pass=calvin | ||
+ | [root@test-plccg ~]# | ||
+ | |||
+ | |||
+ | [root@test-plccg ~]# 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@test-plccg ~]# | ||
+ | |||
+ | |||
+ | [root@test-plccg ~]# 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@test-plccg ~]# | ||
+ | |||
+ | |||
+ | service cobblerd restart | ||
+ | |||
+ | [root@test-plccg ~]# service dhcpd restart | ||
+ | Starting dhcpd: [FAILED] | ||
+ | [root@test-plccg ~]# | ||
+ | |||
+ | |||
+ | Wasted all my day. This is the fix:- | ||
+ | |||
+ | [root@test-plccg ~]# cobbler sync | ||
+ | Shutting down dhcpd: [ OK ] | ||
+ | Starting dhcpd: [ OK ] | ||
+ | |||
+ | |||
+ | [root@test-plccg ~]# cat /etc/dhcpd.conf | ||
+ | # ****************************************************************** | ||
+ | # Cobbler managed dhcpd.conf file | ||
+ | # generated from cobbler dhcp.conf template (Tue Feb 2 11:47:35 2010) | ||
+ | # 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.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; | ||
+ | } | ||
+ | |||
+ | # 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@test-plccg ~]# |
Revision as of 12:44, 7 February 2010
Cobbler Howto:-
======
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/
Centos 5.4 x86_64
yum -y update
Using the link: https://fedorahosted.org/cobbler/wiki/DownloadInstructions
Setup Cobbler Repositories:-
[root@test-plccg ~]# 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@test-plccg ~]#
Install cobbler:-
[root@test-plccg ~]# yum -y install cobbler koan
[root@test-plccg cdimages]# ls CentOS-5.3-i386.DVD.iso CentOS-5.4-x86_64 CentOS-5.4-x86_64-bin-DVD.iso [root@test-plccg cdimages]#
service httpd restart
Import repository:-
cobbler import --mirror=/data/cdimages/CentOS-5.4-x86_64 --name=Centos5.4-x86_64
[root@test-plccg 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@test-plccg cdimages]#
Install the following using yum :-
yum -y install reposync yum-utils cman
Time for some configurations:-
vi /etc/cobbler/settings
(some settings)
service cobblerd restart
chkconfig --level 35 cobblerd on
cobbler check # important
End of day 1.
==============================================
Day 2:
Cobbler howto-2
=
[root@test-plccg ~]# cobbler check The following potential problems were detected:
- 0: service dhcpd is not running
- 1: since iptables may be running, ensure 69, 80, and 25151 are unblocked
- 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
[root@test-plccg ~]#
[root@test-plccg ~]# 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@test-plccg ~]#
[root@test-plccg ~]# cobbler distro list
Centos5.4-x86_64
Centos5.4-xen-x86_64
[root@test-plccg ~]#
[root@test-plccg ~]# cobbler profile list
Centos5.4-x86_64
Centos5.4-xen-x86_64
rescue-Centos5.4-x86_64
[root@test-plccg ~]#
No systems are registered with cobbler at the moment:-
[root@test-plccg ~]# cobbler system list [root@test-plccg ~]#
Lets create a profile for compute-nodes:-
[root@test-plccg ~]# cobbler profile copy --name=Centos5.4-x86_64 --newname=ComputeNodes
[root@test-plccg ~]# cobbler profile list
Centos5.4-x86_64
Centos5.4-xen-x86_64
ComputeNodes # <------------ Newly added profile!
rescue-Centos5.4-x86_64
[root@test-plccg ~]#
[root@test-plccg ~]# 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@test-plccg ~]#
[root@test-plccg ~]# cat /var/lib/cobbler/kickstarts/default.ks
- this file intentionally left blank
- admins: edit it as you like, or leave it blank for non-interactive install
[root@test-plccg ~]# cat /var/lib/cobbler/kickstarts/sample.ks
- platform=x86, AMD64, or Intel EM64T
- System authorization information
auth --useshadow --enablemd5
- System bootloader configuration
bootloader --location=mbr
- Partition clearing information
clearpart --all --initlabel
- Use text mode install
text
- Firewall configuration
firewall --enabled
- Run the Setup Agent on first boot
firstboot --disable
- System keyboard
keyboard us
- System language
lang en_US
- Use network installation
url --url=$tree
- If any cobbler repo definitions were referenced in the kickstart profile, include them here.
$yum_repo_stanza
- Network information
$SNIPPET('network_config')
- Reboot after installation
reboot
- Root password
rootpw --iscrypted $default_password_crypted
- SELinux configuration
selinux --disabled
- Do not configure the X Window System
skipx
- System timezone
timezone America/New_York
- Install OS instead of upgrade
install
- Clear the Master Boot Record
zerombr
- Allow anaconda to partition the system as needed
autopart
%pre
$SNIPPET('log_ks_pre')
$kickstart_start
$SNIPPET('pre_install_network_config')
- Enable installation monitoring
$SNIPPET('pre_anamon')
%packages $SNIPPET('func_install_if_enabled')
%post $SNIPPET('log_ks_post')
- Start yum configuration
$yum_config_stanza
- 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')
- Enable post-install boot notification
$SNIPPET('post_anamon')
- Start final steps
$kickstart_done
- End final steps
[root@test-plccg ~]#
[root@test-plccg ~]# cd /var/lib/cobbler/kickstarts/
[root@test-plccg kickstarts]# cp sample.ks Compute.ks
[root@test-plccg kickstarts]# vi Compute.ks
- platform=x86, AMD64, or Intel EM64T
- System authorization information
auth --useshadow --enablemd5
- System bootloader configuration
bootloader --location=mbr
- Partition clearing information
clearpart --all --initlabel
- Use text mode install
text
- Firewall configuration
firewall --disabled
- Run the Setup Agent on first boot
firstboot --disable
- System keyboard
keyboard us
- System language
lang en_US
- Use network installation
url --url=$tree
- If any cobbler repo definitions were referenced in the kickstart profile, include them here.
$yum_repo_stanza
- Network information
$SNIPPET('network_config')
- Reboot after installation
reboot
- Root password
rootpw --iscrypted $default_password_crypted
- SELinux configuration
selinux --disabled
- Do not configure the X Window System
skipx
- System timezone
timezone Asia/Riyadh
- Install OS instead of upgrade
install
- Clear the Master Boot Record
zerombr
- Allow anaconda to partition the system as needed
autopart
%pre
$SNIPPET('log_ks_pre')
$kickstart_start
$SNIPPET('pre_install_network_config')
- Enable installation monitoring
$SNIPPET('pre_anamon')
%packages @base $SNIPPET('func_install_if_enabled')
%post $SNIPPET('log_ks_post')
- Start yum configuration
$yum_config_stanza
- 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')
- Enable post-install boot notification
$SNIPPET('post_anamon')
- Start final steps
$kickstart_done
- End final steps
[root@test-plccg kickstarts]#
[root@test-plccg kickstarts]# cobbler profile edit --name=ComputeNodes --kickstart=/var/lib/cobbler/kickstarts/Compute.ks
[root@test-plccg kickstarts]#
Verify the change:-
[root@test-plccg kickstarts]# cobbler profile report --name=ComputeNodes | grep kickstart kickstart : /var/lib/cobbler/kickstarts/Compute.ks [root@test-plccg kickstarts]#
Now define/ add compute nodes:-
[root@test-plccg ~]# 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@test-plccg ~]#
Note ----------
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 An object already exists with that name. Try 'edit'?
[root@test-plccg ~]# cobbler system list compute1 compute2 [root@test-plccg ~]#
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" 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@test-plccg ~]#
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@test-plccg ~]# cobbler system edit --name=compute2 --interface=eth1 --power-type=ipmitool --power-user=root --power-pass=calvin [root@test-plccg ~]#
[root@test-plccg ~]# 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@test-plccg ~]#
[root@test-plccg ~]# 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@test-plccg ~]#
service cobblerd restart
[root@test-plccg ~]# service dhcpd restart Starting dhcpd: [FAILED] [root@test-plccg ~]#
Wasted all my day. This is the fix:-
[root@test-plccg ~]# cobbler sync Shutting down dhcpd: [ OK ] Starting dhcpd: [ OK ]
[root@test-plccg ~]# cat /etc/dhcpd.conf
- ******************************************************************
- Cobbler managed dhcpd.conf file
- generated from cobbler dhcp.conf template (Tue Feb 2 11:47:35 2010)
- 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.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;
}
- 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@test-plccg ~]#