Setting up a network environment can involve many steps to prepare for starting the installation. You must:
Configure services such as DHCP, TFTP, DNS, HTTP, FTP, and NFS
Fill in DHCP and TFTP configuration files with information about each client machine
Create automatic deployment files (such as Kickstart and Autoinst)
Unzip the installation media into the Http/ftp/nfs repository.
This process is not simple, and manually registering each client machine that must be configured can be cumbersome. Any parameter changes to configure a machine (for example, to use a different operating system) require manual intervention of the configuration and the possibility of manual intervention on the automated deployment file. When the number of machines increases, if you do not attach importance to the organization of the file, the TFTP directory and other elements can become confusing.
Cobbler addresses these deficiencies by creating a central management point for all aspects of machine configuration. Cobbler can reconfigure services, create repositories, decompress operating system media, broker or integrate a configuration management system, and control power management. Cobbler creates an abstraction layer in which you can run commands such as add new repository or change client machine operating system. Cobbler handles everything: Create or update configuration files, restart services, or extract media into a newly created directory. Its purpose is to hide all system-related problems so that you can focus on the task itself.
This article describes how cobbler is designed, its main features, and examples of using these features to quickly and easily configure a machine. First, the characteristics of cobbler are introduced.
Tivoli Configuration Manager
IBM Tivoli Configuration Manager is an integrated software distribution and asset Management suite that includes two major components Software distribution and Inventory, as well as a variety of services. Tivoli Configuration Manager Controls configuration, distribution, change, versioning, and asset management in a multi-platform environment.
The functionality provided by the tool
With cobbler, you can install a machine without manual intervention. Cobbler sets up a PXE boot environment (which also uses Yaboot to support PowerPC) and controls all aspects of the installation, such as network boot services (DHCP and TFTP) and repository mirroring. When you want to install a new machine, cobbler can:
Configure the DHCP service using a previously defined template (if administrative DHCP is enabled)
Create a mirror or extract a medium for a repository (yum or rsync) to register a new operating system
Create an entry in the DHCP configuration file for the machine that you want to install and use the parameters you specify (IP and MAC address)
Create the appropriate PXE file under the TFTFP service directory
Restart the DHCP service to reflect changes
Reboot the machine to start the installation (if power management is enabled)
Cobbler supports numerous distributions: Red Hat, Fedora, CentOS, Debian, Ubuntu, and SuSE. When adding an operating system (usually by using an ISO file), cobbler knows how to extract the appropriate files and adjust the network service to properly boot the machine.
Cobbler can use the Kickstart template. Systems based on Red Hat or Fedora use Kickstart files to automate the installation process. By using a template, you will have a basic kickstart template, and then define how to replace the variables in one configuration file or machine configuration. For example, a template might contain two variables $domain and $machine _name. In the Cobbler configuration, a configuration file specifies Domain=mydomain.com, and each machine that uses the profile specifies its name in the machine_name variable. All machines in this configuration file use the same kickstart installation and are configured for domain=mydomain.com, but each machine has its own machine name. You can still use the Kickstart template to install other machines in different domains and use different machine names.
To assist with the management system, cobbler can be connected to a variety of power management environments through fence scripts. Cobbler supports APC_SNMP, BladeCenter, Bullpap, Drac, Ether_wake, ILO, Integrity, Ipmilan, Ipmitool, Lpar, RSA, Virsh, and WTI. To reinstall a machine, run the reboot system foo command, and cobbler will use the necessary credentials and information to run the appropriate fence scripts (such as the number of machine slots) for you.
In addition to these features, you can use a configuration management system (CMS). You have two options: an internal system within the tool, or an existing external CMS, such as Chef or Puppet. With internal systems, you can specify file templates that are processed according to configuration parameters (as the Kickstart template is handled), and then copied to the location you specify. This is useful if you must automatically deploy the configuration file to a specific machine.
With the Koan client, cobbler can configure the virtual machine from the client and reinstall the system. I will not discuss configuration management and Koan features because they are outside the scope of this article. However, they are useful features worth studying.
The design method of cobbler
The Cobbler configuration structure is based on a set of registered objects. Each object represents an entity associated with another entity that points to another object, or another object points to the object. When an object points to another object, it inherits the data that is pointed to the object and can overwrite or add more specific information. The following object types are defined as:
Release: Represents an operating system. It hosts the kernel and INITRD information, as well as other data such as kernel parameters.
Configuration file: Contains a distribution, a kickstart file, and a possible repository, as well as additional data such as specific kernel parameters.
System: Represents the machine to be rationed. It contains a configuration file or a mirror, as well as information such as IP and MAC addresses, power management (address, credentials, type), and more professional data.
Repository: Holds mirror information for a yum or rsync repository.
Mirroring: You can replace a distribution object that contains files that do not belong to this category (for example, objects that cannot be divided into kernels and initrd).
Cobbler knows how to change the file system to reflect the specific configuration, based on the registered objects and the associations between the objects. Because the internals of the system configuration are abstract, you can focus on only the actions you want to perform.
Figure 1. Cobbler Object Relationships
Using Cobbler
The way you configure and use cobbler includes the command line, APIs, XML-RPC, and Web UI. I'll highlight command-line options.
This article URL address: http://www.bianceng.cn/OS/Linux/201410/45339.htm