Cobbler Summary of host Automation deployment

Source: Internet
Author: User

Cobbler's Related advantages:

Cobbler Support Command line management, web interface management, also provides API interface, can be easily used two times development.

Cobbler does not cause some machines to start terminating because DHCP is started on the LAN because the TFTP content is loaded by default from PXE boot after restarting the server .

Cobbler as a preparation tool to make it easier to deploy Redhat/centos/fedora systems and also to support the deployment of SUSE and Debian systems

Service Integration:

PXE Service Support

DHCP Service Management

DNS Service Management

Kickstart Service Support

Yum Warehouse Management

Cobbler client Koan support for virtual machine installation and operating system reinstallation

Cobbler Web interface to better manage user interface

The installation process boots:


preparation of the Yum Source:
Installation of the repo package.
# wget http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
# # RPM-IVH epel-release-6-8.noarch.rpm



Cobbler Network installation:
# yum Install cobbler cobbler-web httpd xinetd tftp-server rsync koan dhcpd debmirror (Debian Mirror package) Pykickstart Cman Fen Ce-agent-y

Related directory information for cobbler:
/var/lib/cobbler stores the configuration information for imported mirrors, the Kickstarts directory holds kickstarts scripts (multiple. KS installation templates), and the snippets directory holds scripts that can be executed in the Kickstat configuration file. The Config directory provides configuration information (such as distros and profile-related information), and other directories are basically not configured.

/var/www/cobbler is the data directory of the operating system that imports the release version, Ks_mirror inside is the import distribution system, images inside is all the distribution version kernel (vmlinuz) and INITRD (INITRD.IMG), For remote network boot
/var/log/cobbler is the log directory
/etc/cobbler is the Cobbler profile directory, settings is the main configuration file, there are some related configuration template, users.conf is the user, Users.digest is the user and password


Cobbler Related commands:
#cobbler list lists related cobber elements (distros and profile)
#cobbler Check cobbler configuration (usually prompts for what configuration is required)
#cobbler Report lists Cobbler details
#cobbler distro View the relevant system release information for the import
#cobbler profile View related Pofile information created by cobbler
#cobbler Sync Sync Cobbler related configuration (preferably modified every time the configuration is completed)
#cobbler Reposync Synchronous Repo source

Configuration detection first before configuration
# Cobbler Check

The following is potential configuration items and that's want to fix:
1:the ' server ' field in/etc/cobbler/settings must is set to something other than localhost, or kickstarting feature  s won't work. This should is a resolvable hostname or IP for the boot server as reachable by all machines that would use it.
2:for PXE to be functional, the ' next_server ' field in/etc/cobbler/settings must is set to something other than 127 .0.0.1, and should match the IP of the boot server on the PXE network.
3:some network boot-loaders is missing from/var/lib/cobbler/loaders, you could run ' cobbler get-loaders ' to download them, or, if you are want to handle x86/x86_64 netbooting, your may ensure so you have installed a *recent* version  Of the Syslinux package installed and can ignore this message entirely. Files in the This directory, should want to support all architectures, should include pxelinux.0, MENU.C32, Elilo.efi, and Yaboot. The ' Cobbler get-loaders ' command is the easiest-to resolve these requirements.
4:change ' disable ' to ' no ' in/etc/xinetd.d/rsync
5:since Iptables May is running, ensure, 80/443, and 25151 are unblocked
6:debmirror package isn't installed, it'll be required to manage Debian deployments and repositories
7:ksvalidator is not found, install Pykickstart
8:the default password used by the sample templates for newly installed machines (default_password_crypted in/etc/c Obbler/settings) is still set to ' cobbler ' and should be changed, try: "OpenSSL passwd-1-salt ' Random-phrase-here ' Your-password-here ' "To generate new one
9:fencing tools were not found, and is 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.
1. Tip You need to configure the server option in/etc/cobbler/settings. Specify IP or host name
2. Modify the Next_server option in the master configuration file to use the PXE feature
3. Lack of network boot Boot-loader, you can perform "Cobbler get-loaders" to download
4. Turn on the Rsync function (select Enable in/etc/xinetd.d/rsync)
5. Enable Iptables to allow 69,80,443 and other ports to be accessed (can be closed directly using IPTABLES-F)
6.debmirror package is not installed (this is used to manage the Debian system configuration and repo)
7. Prompt to install Pykickstart
8. The default_password_crypted in the master profile needs to be set (use ' OpenSSL passwd-1-salt ' any character "" password ") Note that this password will be used by default to make the system root password
9.fence tools are not installed and need to be used to manage power. Can install Cman or fence-agents
Note: After performing the related actions, please restart the Cobbler service and perform the ' Cobbler Sync ' operation.

Restart Cobbler, restart httpd, perform cobbler check execution detection.

# OpenSSL Passwd-1New Cobbler Password
(# OpenSSL passwd-1-salt ' wyadmin ' wyadmin 'Password is wyadmin, generating an encrypted character
$1$WYADMIN$EC7GVOUYR0IKHPQO5.FLG0)
Note: (This block is the root password)
Details can be observed in the/VAR/LIB/COBBLER/KICKSTART/SAMPLE.KS password file ($default _password_crypted) and this is the password generated using OpenSSL (in/etc/cobbler/ configured in Settings)

Master configuration file Details:
# vim/etc/cobbler/settings
Server:10.45.249.101
Next_server:10.45.249.101
default_password_crypted: "$1$wyadmin$ec7gvouyr0ikhpqo5.flg0"
Manage_dhcp:1 enable DHCP (Allow cobbler to control DHCP)
Default_kickstart:/VAR/LIB/COBBLER/KICKSTARTS/DEFAULT.KS When using kickstart new operating system (in fact, this file is empty, the default is SAMPLE.KS)

Enable TFTP (disabled = no)
Enable Rsync
Start cobbler,dhcpd,httpd. Turn off SELinux (Setenforce 0 temporarily off)

# Cobbler Get-loaders will go to PXE boot required loader (boot-loader), execute this command will download Boot-loader
# Cobbler Check again to detect the configuration required by cobbler

Restart cobbler and perform cobbler sync


Configure DHCP:
Modify the DHCP proxy file (simple DHCP modification)

# vim/etc/cobbler/dhcp.templateWhere modifications are required (subnets, network management, and range settings)
Subnet 10.45.249.0 netmask 255.255.255.0 {
Option routers 10.45.249.102;
Option Domain-name-servers 10.45.249.102;
Option Subnet-mask 255.255.255.0;
Range DYNAMIC-BOOTP 10.45.249.10 10.45.249.0;
Default-lease-time 21600;
Max-lease-time 43200;
Next-server $next _server; A variable is used here.

# vim/etc/dhcp/dhcpd.confA simple configuration is available to restart all services and you will see that this file is synchronized with the file above.
However, DHCP is not started in many cases when DHCP is initially configured.
# CAT/ETC/SYSCONFIG/DHCPD
Dhcpdargs=eth1

Synchronous Cobbler Configuration:
/etc/init.d/cobblerd Restart Restart after restarting the DHCP
/etc/init.d/xinetd restart
/ETC/INIT.D/DHCPD restart
/ETC/INIT.D/HTTPD Restart


# # #cobbler SyncThe associated service startup is displayed after the sync command is executed
Note that after each modification of the DHCP configuration, perform cobbler sync sync
Note: Sometimes the DHCP service does not get up and needs to be cobbler sync to start

#mount/dev/cdrom/mntMount image File

# Cobbler Import--path=/mnt--name=rhel6.6_x86-64Import System Media (named Distros) import the/var/www/cobbler/ksmirror directory by default
Task Started:2015-03-25_040449_import
Task started (Id=media import, time=wed Mar 25 04:04:49 2015)
Found a candidate signature:breed=redhat, version=rhel6
Found a matching signature:breed=redhat, version=rhel6
Adding distros from path/var/www/cobbler/ks_mirror/rhel6.6_x86-64:
Creating new distro:rhel6.6-64-x86_64
Trying symlink:/var/www/cobbler/ks_mirror/rhel6.6_x86-64-/var/www/cobbler/links/rhel6.6-64-x86_64
Creating new profile:rhel6.6-64-x86_64
Associating repos
Checking for rsync repo (s)
Checking for portal repo (s)
Checking for Yum repo (s)
Starting Descent into/var/www/cobbler/ks_mirror/rhel6.6_x86-64 for rhel6.6-64-x86_64
Processing repo at:/var/www/cobbler/ks_mirror/rhel6.6_x86-64
DIRECTORY/VAR/WWW/COBBLER/KS_MIRROR/RHEL6.6_X86-64 is missing XML comps file, skipping
TASK Complete * * *


Restart the following services:
xinted cobblerd httpd dhcpd


# Cobbler List View Cobbler Properties
Distros: Available Distributions
Rhel6.6-64-x86_64
Profiles: The corresponding configuration file (actually is the system startup template)
Rhel6.6-64-x86_64
Systems: System setup, for system-specific host names. Ip.mac system Installation
Repos: Software Warehouse
Images
Mgmtclasses:
Packages

Files

define the Kickstart file:
Set profile, associate image, and Kickstart file, which can be understood as categorized by role

When installing the operating system with cobbler, the kickstart file that cobbler actually executes is not/VAR/LIB/COBBLER/KICKSTARTS/DEFAULT.KS,
Instead, it is/VAR/LIB/COBBLER/KICKSTARTS/SAMPLE.KS and can be seen in configuration file/etc/cobbler/settings.
In this block you can actually define multiple KS files to correlate multiple profile templates.


to configure profile and system, use a Kickstart file:
1. Add profile (you will actually see the rhel6.6.x86 and rhel6.6-64-x86_64 options when the machine starts)
# Cobbler Profile Add--name=rhel6.6.x86--distro=rhel6.6-64-x86_64--kickstart=/var/lib/cobbler/kickstarts/ Esxi4-ks.cfg
(from the rhel6.6-64-x86_64 image, generate an installation template according to the ks.cfg file)

Set distro to its own image (Cobbler list)
(Note that this is actually equivalent to modifying an installed template, which is used to select the newly added esxi4-ks.cfg in the installation)

2. Change profile configuration Name
# Cobbler Profile rename--name=centos6.6--newname=rhel6.6-x86_64
(Cobbler list can be viewed with two profiles)

3. Delete profile configuration
# Cobbler Profile Remove--name=rhel6.6-x86_64

Test installation, similar to PXE, can be installed directly.

You can see two installation options, which is the two profiles created previously. The installation step is no longer mapped.

Optimization: In the entire installation need to manually manage a few parts, this block can actually customize the KS file, for fully automated installation.

Virtual Machine creation succeeded!

Note: If the installed host is hacked in a certain time period, or if the system wants to be unified, you can use the Koan in cobbler to reinstall it.

Re-installed:
1. Install Koan on the client
#yum Install Koan-y
2. View the optional installation list on the Cobbler server
# Koan--list=profiles--server=10.45.249.102
-Looking for Cobbler at Http://10.45.249.102:80/cobbler_api
Rhel6.6-x86_64
Rhel6.6-64-x86_64
3. Under load Loading template (prompt restart after download)
# koan--replace-self--server=10.45.249.102--profile=rhel6.6-64-x86_64
4. Perform a reboot installation
#reboot
Re-install the system after restarting the main opportunity to re-initialize settings!



Cobbler Summary of host Automation deployment

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.