What is 1.Cobbler?
Cobbler is a Linux installation server that can quickly set up a network installation environment. It automates and slipstreams many Linux-related tasks, so you don't need to switch back and forth between a wide variety of commands and applications when you deploy a new (operational) system or change an already existing operating system. Cobbler can help (users, managers) provision and manage DNS, DHCP, package updates, power management, configuration management, and more.
Cobbler is a Linux installation server, allows for rapid setup of network installation environments. It glues together and automates many associated Linux tasks so don't have the to hop between many various commands and AP Plications when deploying new systems, and, in some cases, changing existing ones. Cobbler can help with provisioning, managing DNS and DHCP, package updates, power management, configuration management orc Hestration, and much more. "--http://cobbler.github.io/
More about:
1) wiki:https://fedorahosted.org/cobbler/
2) Others: Https://github.com/cobbler/cobbler/wiki
3) kickstart:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/index.html
4) pxe:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/index.html
2. Why use Cobbler?
Cobbler there must be a reason, if before, to realize the automatic installation of the operating system through the network, you must use manual kickstart+pxe, and cobbler the two packages in their own software, These functions can be integrated by compiling or installing Yum, so if you want to implement a network to install multiple operating systems, cobbler is a better option than manually doing KICKSTART+PXE.
In addition, cobbler can be installed in a virtualized environment, supporting Xen, QEMU, KVM, and some VMware-like virtualization types, implemented by a name called "Koan (kickstart-over-a-network)".
In addition to the built-in lightweight configuration management system, configuration management can also integrate other configuration management systems, such as puppet.
Cobbler is written in the Python language, and in addition to the command line interface, it also supports Web management and API support, in addition to other advanced features such as creating an installation image (image), fence power management, and more.
3. How do I use cobbler?
1) Install Cobbler
If you want to use cobbler, you should install it first. Install cobbler in Ubuntu system only need to execute installation command, and in the CentOS system to install cobbler as long as there is epel it is not complicated, of course, can also be like fuel, cobbler into a docker container.
Ubuntu:
sudo apt-get install cobbler Cobbler-web
Centos:
# Install Epel repo yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm # Cobbler Yum Install Cobbler Cobbler-web-y
2) Configuration Cobbler
Next you need to configure the Cobbler configuration file, mainly according to the "Cobbler check" command results follow the prompts to do, or relatively easy.
The steps are as follows:
A. Primarily modify the/etc/cobbler/settings to set the Next_server and server in the/etc/cobbler/settings configuration file to the IP address of the Cobbler server.
ipaddr=$ (IP addr Show to 0.0.0.0/0 scope Global | awk '/[[:space:]]inet/{print gensub ("/.*", "", "G", $ $)} ') operationf Ile=/etc/cobbler/settings bakoperationfile= $operationfile $ (date +-%f-%h-%m-%s) "~" CP $operationfile $BAKOPERATIONFI Le chown-r--reference= $operationfile $bakoperationfile chcon-r--reference= $operationfile $bakoperationfile SE D-i "S/next_server:127.0.0.1/next_server: $ipaddr/g" $operationfile sed-i "s/server:127.0.0.1/server: $ipaddr/g" $ Operationfile
Change disable = Yes in/etc/xinetd.d/rsync and/etc/xinetd.d/tftp to Disable=no.
B. Get the boot loader
Although cobbler provides the "Cobbler get-loaders" command to automatically download the latest available loader from the network, the reason for the Cobbler URL change is no longer available , This can only be obtained from GitHub or an earlier installed Cobbler server (for example, fuel).
GitHub Address: Https://github.com/cobbler/cobbler.github.io/tree/master/loaders
Conversion method:
http://www.cobblerd.org/loaders/readme to /var/lib/cobbler/loaders/readme http://www.cobblerd.org/loaders/COPYING.elilo to /var/lib/cobbler/loaders/COPYING.elilo http://www.cobblerd.org/loaders/copying.yaboot to /var/lib/cobbler/loaders/ Copying.yaboot http://www.cobblerd.org/loaders/copying.syslinux to /var /lib/cobbler/loaders/copying.syslinux http://www.cobblerd.org/loaders/ elilo-3.8-ia64.efi to /var/lib/cobbler/loaders/elilo-ia64.efi http:// www.cobblerd.org/loaders/yaboot-1.3.14-12 to /var/lib/cobbler/loaders/yaboot http://www.cobblerd.org/loaders/pxelinux.0-3.86 to /var/lib/cobbler/loaders/pxelinux.0 http://www.cobblerd.org/loaders/menu.c32-3.86 to /var/lib/cobbler/loaders/ menu.c32 http://www.cobblerd.org/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x86.efi http://www.cobblerd.org/loaders/grub-0.97-x86_64.efi to /var/lib/ Cobbler/loaders/grub-x86_64.efi
The usual use is pxelinux.0.
C. Install some other necessary components
Yum install debmirror pykickstart fence-agents cman-y yum install DHCP dhcp-devel-y yum install Syslinux
D. Modifying a template
If you are using cobbler to manage DHCP, edit/etc/cobbler/dhcp.template, and set manage_dhcp:0 in/etc/cobbler/settings to Manage_dhcp:1, it is recommended to modify
Example:
subnet 10.20.0.0 netmask 255.255.255.0 { option routers 10.20.0.2; option domain-name-servers 114.114.114.114, 8.8.4.4; option subnet-mask 255.255.255.0; range dynamic-bootp 10.20.0.200 10.20.0.210; default-lease-time 21600; max-lease-time 43200; Next-server $next _server;
If you are using cobbler to manage TFTP, edit/etc/cobbler/tftpd.template, and set manage_tftp:0 in/etc/cobbler/settings to Manage_tftp:1, it is recommended to modify
If you are using cobbler to manage rsync, edit the/etc/cobbler/rsync.template, and set the manage_rsync:0 in/etc/cobbler/settings to Manage_rsync:1
If you are managing DNS with cobbler, edit the/etc/cobbler/dnsmasq.template, and set the manage_dns:0 in/etc/cobbler/settings to Manage_dns: 1, this item can also manage DHCP
E. Enabling, closing, and monitoring the results of related services
Setenforce 0 Service httpd start service cobblerd start service xinetd start service iptables Stop Ps-ef | grep $ (lsof | grep tftp | grep xinetd | awk ' {print $} ') Ps-ef | grep DHCP | grep-v grep cobbler Check Cobbler Sync
F. Import an operating system installation image
Mount-t iso9660 centos-6.6-x86_64-minimal.iso/mnt-o loop,ro Cobbler import--path=/mnt--name=centos-6.6-x86_64-minim Al
If you have a good kickstart file, you can perform cobbler import--path=/mnt--name=centos-6.6-x86_64-minimal--kickstart=kickstart_file
It doesn't matter if you don't have a good kickstart file, just know what the password is, and the default kickstart and password are defined in/etc/cobbler/settings:
Default_kickstart:/VAR/LIB/COBBLER/KICKSTARTS/DEFAULT.KS
In a CentOS system, a KS file is generated in the user's home directory each time a manual installation of an operating system is completed, which can be used as a reference.
default_password_crypted: "$1$mf86/uhc$wvcicx2t6crbz2onwxyac."
The password can be generated by the command or by using the default "Cobber" password.
Cobbler distro List Cobbler sync
Note: The Cobbler command Help system is cobbler–help, such as Cobbler Import–help
G. Test Cobbler
Conditions:
a). There are no other DHCP servers in the network, such as testing in VMware Workstation, to shut down the VMware Workstation DHCP service.
b). The client to install the operating system to the same network as cobbler, and the client supports PXE network boot, which usually requires the client's BIOS support.
H. Commissioning
Related commands
Cobbler Check
Related logs:
DHCP, TFTP-related logs,/var/log/messages
Cobbler's log:/var/log/cobbler/cobbler.log
Here are some of the successful
650) this.width=650; "title=" 2015-07-09_120345 "style=" border-top:0px;border-right:0px;border-bottom:0px; border-left:0px; "border=" 0 "alt=" 2015-07-09_120345 "src=" http://s3.51cto.com/wyfs02/M01/6F/81/ Wkiom1wej03grr5raaywnbztqrq862.jpg "height=" 601 "/>
Figure 1 Some success logs on the Cobbler host during client installation
650) this.width=650; "title=" 2015-07-09_115935 "style=" border-top:0px;border-right:0px;border-bottom:0px; border-left:0px; "border=" 0 "alt=" 2015-07-09_115935 "src=" http://s3.51cto.com/wyfs02/M02/6F/7E/wKioL1WeKR_S9EQ_ Aak23k4xbcq827.jpg "height=" 510 "/>
Figure 2 The client is in the process of automatic unattended installation
650) this.width=650; "title=" 2015-07-09_120323 "style=" border-top:0px;border-right:0px;border-bottom:0px; border-left:0px; "border=" 0 "alt=" 2015-07-09_120323 "src=" http://s3.51cto.com/wyfs02/M02/6F/7E/ Wkiol1weksdx4t0qaah8zqetoui120.jpg "height=" 511 "/>
Figure 3 The client completes the automatic installation and is ready to log in
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; " Border= "0" alt= "image" Src= "http://s3.51cto.com/wyfs02/M02/6F/81/wKiom1WeJ0_SLN8oAAFcuSdtjes124.jpg" height= "390" />
Figure 4 Cobbler Web Management interface, the address is generally http://cobbler_ip_address/cobbler_web/, user name cobbler, password cobbler.
Attached to other good references
Operation and maintenance Automation Cobbler system installation and use of detailed http://os.51cto.com/art/201405/439670.htm
Use cobbler to automate and manage system installation http://www.ibm.com/developerworks/cn/linux/l-cobbler/
Operation and maintenance automation of the Cobbler system installation detailed http://os.51cto.com/art/201109/288604_all.htm
End
This article is from "Communication, My Favorites" blog, please make sure to keep this source http://dgd2010.blog.51cto.com/1539422/1672569
Operation and maintenance automation deployment of Linux operating system using Cobbler automation