Centos7 uses cobbler (2.8) to deploy one of the operating systems in batches. centos7cobbler

Source: Internet
Author: User
Tags aliyun

Centos7 uses cobbler (2.8) to deploy one of the operating systems in batches. centos7cobbler
1. Introduction to cobbler

O & M automation includes standardization, tool-based, Web-based, service-oriented, and intelligent layers. In a production environment with a large scale, thousands or even tens of thousands of servers, to achieve O & M automation, tool-based system installation procedures and unified system installation specifications are the most important aspects. Normal automatic deployment can be implemented using pxe + dhcp + tftp with kickstart. However, in the face of Multi-version and multi-deployment requirements, this common deployment method cannot meet our requirements; at this time, we need to use the cobbler open-source automated deployment tool.

Cobbler is a fast network system deployment tool. Its biggest feature is that it integrates all the services required for system deployment, such as DHCP, DNS, TFTP, in this way, you do not need to coordinate the switchover before deploying an operating system. Cobbler can be managed for you. Cobbler integrates an image version repository, you can customize configuration files to select different system installation requirements. Of course, Cobbler also provides yum source management, Web Interface Management, API interface, power management, and other functions, it is convenient for you to customize development management.

Cobbler Design Method

 

    • Distribution ):
Indicates an operating system. It carries information about the kernel and initrd, as well as other data such as kernel parameters.
  • Profile ):
Contains a release, a kickstart file, and a possible repository, as well as more specific kernel parameters and other data.
  • System ):
Indicates the machine to be assigned. It contains a configuration file or an image, as well as IP and MAC addresses, power management (addresses, creden, types), and more professional data.
  • Repository (Repository ):
Saves the image information of a yum or rsync repository.
  • Image ):
You can replace a release object that contains files that do not belong to this category (for example, objects that cannot be divided into kernel and initrd). 2. cobbler Installation
1. cobbler is in the epel source. If no EPELi source exists in the system, install

[Root @ External Store py-9] # yum search epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* Base: mirrors.aliyun.com
* Epel: mirrors.aliyun.com
* Extras: mirrors.aliyun.com
* Updates: mirrors.aliyun.com
======================================== N/S matched: epel-release ==============================
Epel-release.noarch: Extra Packages for Enterprise Linux repository configuration

Name and summary matches only, use "search all" for everything.
[Root @ External Store py-9] # yum-y install epel-release

2. Install cobbler

[Root @ External Store py-9] # yum-y install cobbler

View the installed files and locations

[Root @ External Store py-9] # rpm-ql cobbler

The following are some important configuration files and descriptions:

/Etc/cobbler # configuration file directory/etc/cobbler/settings # cobbler master configuration file/etc/cobbler/dhcp. template # DHCP service configuration template/etc/cobbler/tftpd. template # tftp service configuration template/etc/cobbler/rsync. template # rsync service configuration template/etc/cobbler/iso # iso template configuration file directory/etc/cobbler/pxe # pxe template file directory/etc/cobbler/power # power configuration file directory/etc/cobbler/users. conf # Web Service Authorization configuration file/etc/cobbler/users. digest # user name and password configuration file for web Access/etc/cobbler/dnsmasq. template # DNS service configuration template/etc/cobbler/modules. conf # Cobbler module configuration file/var/lib/cobbler # Cobbler data directory/var/lib/cobbler/config # configuration file/var/lib/cobbler/kickstarts # kickstart files are stored by default /var/lib/cobbler/loaders # various stored boot programs/var/www/cobbler # system installation image directory/var/www/cobbler/ks_mirror # list of imported system images/ var/www/cobbler/images # imported system image Startup file/var/www/cobbler/repo_mirror # yum source storage directory/var/log/cobbler # log directory/var/log /cobbler/install. log # Client System Installation log/var/log/cobbler. log # cobbler log


 

3. Initial cobbler configuration 1. Start the cobbler Service

Cobbler depends on the httpd service, so you must first start httpd; otherwise, an error is reported.

[Root @ mongostore] # systemctl start cobbler

2. Run cobbler check to modify the configuration as prompted

[Root @ External Store] # cobbler check

[Root @ mongostore ~] # Cobbler check
The following are potential configuration items that you may be want to fix:

1: The 'server' field in/etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work. this shoshould be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.

# The prompt is to modify the IP address next to server in the/etc/cobbler/settings file. The default IP address is 127.0.0.1 and needs to be changed to the actual NIC address of the local machine that can communicate with each other, to provide DHCP and other services.

2: For PXE to be functional, the 'next _ Server' field in/etc/cobbler/settings must be set to something other than 127.0.0.1, and shoshould match the IP of the boot server on the PXE network.

# This prompt indicates that to enable PXE to work, you need to set the next_server IP address in/etc/cobbler/settings, which also requires the IP address that can be communicated.
3: SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:
Https://github.com/cobbler/cobbler/wiki/Selinux

# This prompt requires selinux to be disabled
4: change 'disable' to 'no' in/etc/xinetd. d/tftp

# Prompt to enable tftp
5: some network boot-loaders are missing from/var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a * recent * version of the syslinux package installed and can ignore this message entirely. files in this directory, shocould you want to support all ubuntures, shocould include pxelinux.0, menu. c32, elilo. efi, and yaboot. the 'cobbler get-loaders' command is the easiest way to resolve these requirements.

# The system prompts you to use cobbler get-loaders to download the boot program from the Internet.
6: enable and start rsyncd. service with systemctl

# Prompted to start the rsyncd Service
7: debmirror package is not installed, it will be required to manage debian deployments and repositories
8: ksvalidator was not found, install pykickstart

# The system prompts you to install pykickstart by using yum-y pykickstart.
9: The default password used by the sample templates for newly installed machines (default_password_crypted in/etc/cobbler/settings) is still set to 'jobbler' and shocould be changed, try: default_password_crypted "openssl passwd-1-salt 'random-phrase-here ''your-password-here'" to generate new one

# You are prompted to change the default password "openssl passwd-1-salt 'random-phrase-here'' your-password-here '"and replace the content in the ult_password_crypted quotation marks in settings.

10: fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

Restart cobblerd and then run 'cobbler sync' to apply changes.

# Prompt if the power management module is used, install cman or fence-agents

After all the preceding steps are completed, restart the cobbler service and use cobbler sync to save the changes. You can also execute each modification prompt. Until no prompt is displayed or some prompts can be ignored.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.