Linux O & M automation-Cobbler management and usage

Source: Internet
Author: User

Outline
I. Preface
Ii. Explanation of Cobbler commands
3. Import the image file to be installed
4. Install the operating system on the client
Note: The operating system CentOS 6.4 x86_64 and software version Cobbler-2.4.0-1. (Latest Version)


I. Preface
In the previous blog (), we explained in detail the Cobbler installation and basic configuration. In the final experiment, we have installed Cobbler. In this blog, we will mainly explain how to use the Cobbler command and related configuration directories. Okay. Let's talk about the following nonsense. (Note: The content of this blog is followed by the content of the previous blog. For those who do not know how to install it, refer to the previous blog .)


Ii. Explanation of Cobbler commands
1. Check the Cobbler command.
[Root @ node2 ~] # Cobbler
Usage
=====
Cobbler <distro | profile | system | repo | image | mgmtclass | package | file>...
[Add | edit | copy | getks * | list | remove | rename | report] [options | -- help]
Cobbler <aclsetup | buildiso | import | list | replicate | report | reposync | sync | validateks | version> [options | -- help]
Note: You can see that the cobbler command has many options in the above display. To get help with related options, you only need to add -- help.
[Root @ node2 ~] # Cobbler profile -- help
Usage
=====
Cobbler profile add
Cobbler profile copy
Cobbler profile dumpvars
Cobbler profile edit
Cobbler profile find
Cobbler profile getks
Cobbler profile list
Cobbler profile remove
Cobbler profile rename
Cobbler profile report
[Root @ node2 ~] # Cobbler profile add -- help
Usage: cobbler [options]
Options:
-H, -- help show this help message and exit
-- Name = NAME Name (Ex: F10-i386-webserver)
-- Uid = UID
-- Owners = OWNERS Owners (Owners list for authz_ownership (space
Delimited ))
-- Distro = DISTRO Distribution (Parent distribution)
-- Parent = PARENT Parent Profile
-- Enable-gpxe = ENABLE_GPXE
Enable gPXE? (Use gPXE instead of PXELINUX
Advanced booting options)
-- Enable-menu = ENABLE_MENU
Enable PXE Menu? (Show this profile in the PXE menu ?)
-- Kickstart = KICKSTART
Kickstart (Path to kickstart template)
-- Kopts = KERNEL_OPTIONS
Kernel Options (Ex: selinux = permissive)
-- Kopts-post = KERNEL_OPTIONS_POST
Kernel Options (Post Install) (Ex: clocksource = pit
Noapic)
-- Ksmeta = KS_META Kickstart Metadata (Ex: dog = fang agent = 86)
-- Proxy = PROXY Proxy (Proxy URL)
-- Repos = REPOS Repos (Repos to auto-assign to this profile)
-- Comment = COMMENT Comment (Free form text description)
-- Virt-auto-boot = pai_auto_boot
Virt Auto Boot (Auto boot this VM ?)
-- Virt-cpus = pai_cpus
Virt CPUs (integer)
-- Virt-file-size = pai_file_size
Virt File Size (GB)
-- Virt-disk-driver = pai_disk_driver
Virt Disk Driver Type (The on-disk format for
Virtualization disk)
-- Virt-ram = pai_ram Virt RAM (MB)
-- Depth = DEPTH
-- Virt-type = pai_type
Virt Type (Virtualization technology to use) (valid
Options: xenpv, xenfv, qemu, kvm, vmware, openvz)
-- Virt-path = pai_path
Virt Path (Ex:/directory OR VolGroup00)
-- Virt-bridge = pai_bridge
Virt Bridge
-- Dhcp-tag = DHCP_TAG DHCP Tag (See manpage or leave blank)
-- Server = SERVER Server Override (See manpage or leave blank)
-- Ctime = CTIME
-- Mtime = MTIME
-- Name-servers = NAME_SERVERS
Name Servers (space delimited)
-- Name-servers-search = NAME_SERVERS_SEARCH
Name Servers Search Path (space delimited)
-- Mgmt-classes = MGMT_CLASSES
Management Classes (For external configuration
Management)
-- Mgmt-parameters = MGMT_PARAMETERS
Management Parameters (Parameters which will be handed
To your management application (Must be valid YAML
Dictionary ))
-- Boot-files = BOOT_FILES
TFTP Boot Files (Files copied into tftpboot beyond
Kernel/initrd)
-- Fetchable-files = FETCHABLE_FILES
Fetchable Files (Templates for tftp or wget)
-- Template-files = TEMPLATE_FILES
Template Files (File mappings for built-in config
Management)
-- RedHat-management-key = REDHAT_MANAGEMENT_KEY
Red Hat Management Key (Registration key for RHN,
Spacewalk, or Satellite)
-- Redhat-management-server = REDHAT_MANAGEMENT_SERVER
Red Hat Management Server (Address of Spacewalk or
Satellite Server)
-- Template-remote-kickstarts = TEMPLATE_REMOTE_KICKSTARTS
-- Clobber allow add to overwrite existing objects
-- In-place edit items in kopts or ksmeta without clearing
Other items

2. Explanation of common Cobbler commands
Cobbler check # check cobbler Configuration

Cobbler sync # synchronize configuration to dhcp/pxe and Data Directory

Cobbler list # list all cobbler Elements

Cobbler import # import the installed system image

Cobbler report # list details of each element

Cobbler distro # view imported Release System Information

Cobbler profile # view configuration information

Cobbler system # view the added system information

Cobbler reposync # synchronize the yum repository to a local device

(1). cobbler check
12 [root @ node2 ~] # Cobbler check
No configuration problems found. All systems go.

Note: It is mainly used to check whether the cobbler configuration is incorrect.
(2). cobbler sync
[Root @ node2 ~] # Cobbler sync
Task started: 2013-11-11_133827_sync
Task started( id = Sync, time = Mon Nov 11 13:38:27 2013)
Running pre-sync triggers
Cleaning trees
Removing:/var/lib/tftpboot/pxelinux. cfg/default
Removing:/var/lib/tftpboot/grub/grub-x86_64.efi
Removing:/var/lib/tftpboot/grub/images
Removing:/var/lib/tftpboot/grub/efidefault
Removing:/var/lib/tftpboot/grub/grub-x86.efi
Removing:/var/lib/tftpboot/s390x/profile_list
Copying bootloaders
Trying hardlink/var/lib/cobbler/loaders/grub-x86_64.efi->/var/lib/tftpboot/grub/grub-x86_64.efi
Trying hardlink/var/lib/cobbler/loaders/grub-x86.efi->/var/lib/tftpboot/grub/grub-x86.efi
Copying distros to tftpboot
Copying images
Generating PXE configuration files
Generating PXE menu structure
Rendering DHCP files
Generating/etc/dhcp/dhcpd. conf
Rendering TFTPD files
Generating/etc/xinetd. d/tftp
Cleaning link caches
Running post-sync triggers
Running python triggers from/var/lib/cobbler/triggers/sync/post /*
Running python trigger cobbler. modules. sync_post_restart_services
Running: dhcpd-t-q
Received on stdout:
Received on stderr:
Running: service dhcpd restart
Received on stdout: Disable dhcpd: [OK]
Starting dhcpd: [OK]
Received on stderr:
Running shell triggers from/var/lib/cobbler/triggers/sync/post /*
Running python triggers from/var/lib/cobbler/triggers/change /*
Running python trigger cobbler. modules. scm_track
Running shell triggers from/var/lib/cobbler/triggers/change /*
* ** Task complete ***

Note: To synchronize the cobbler configuration to the data directory, you must modify some configurations and then synchronize the configurations.
(3). cobbler list
[Root @ node2 ~] # Cobbler list
Distros: # imported release version
Profiles: # installed configuration information
Systems: # added system information
Repos: # yum Repository
Images: # stores all the Kernel and initrd images imported to the release for remote network startup.
Mgmtclasses:
Packages:
Files:

Note: The cobbler list command can be used to list all cobbler elements.
(4). cobbler import
[Root @ node2 ~] # Cobbler import -- help
Usage: cobbler [options]
Options:
-H, -- help show this help message and exit
-- Arch = arch OS architecture being imported
-- Breed = BREED the breed being imported
-- OS-version = OS _VERSION
The version being imported
-- Path = PATH local path or rsync location
-- Name = NAME, ex 'rhel-5'
-- Available-as = AVAILABLE_AS
Tree is here, don't mirror
-- Kickstart = KICKSTART_FILE
Assign this kickstart file
-- Rsync-flags = RSYNC_FLAGS
Pass additional flags to rsync

Note: The cobbler import command can import the image file (ISO file) to be installed ).
(5). cobbler report
[Root @ node2 ~] # Cobbler report
Distros:
============
Profiles:
============
Systems:
============
Repos:
============
Images:
============
Mgmtclasses:
============
Packages:
============
Files:
============

Note: As we have not imported any system image files, it is blank. After importing the system image, you can see the detailed information.
(6). cobbler distro
[Root @ node2 ~] # Cobbler distro
Usage
=====
Cobbler distro add
Cobbler distro copy
Cobbler distro edit
Cobbler distro find
Cobbler distro list
Cobbler distro remove
Cobbler distro rename
Cobbler distro report

Note: The cobbler distro command can not only view the imported release system information, but also add and modify the system information.
(7). cobbler profile
[Root @ node2 ~] # Cobbler profile
Usage
=====
Cobbler profile add
Cobbler profile copy
Cobbler profile dumpvars
Cobbler profile edit
Cobbler profile find
Cobbler profile getks
Cobbler profile list
Cobbler profile remove
Cobbler profile rename
Cobbler profile report

Note: The cobbler profile command can not only view the Kickstart file, but also edit and delete the file.
(8). cobbler system
[Root @ node2 ~] # Cobbler system
Usage
=====
Cobbler system add
Cobbler system copy
Cobbler system dumpvars
Cobbler system edit
Cobbler system find
Cobbler system getks
Cobbler system list
Cobbler system poweroff
Cobbler system poweron
Cobbler system powerstatus
Cobbler system reboot
Cobbler system remove
Cobbler system rename
Cobbler system report

Note: The cobbler system command can associate the configuration and installation file of cobbler with the client. The following is a specific case,
[Root @ node2 ~] # Cobbler system add -- name = desktop-xfce-1 \
-- Profile = Fedora17-xfce \
-- Mac = 52: 54: 00: b8: 5e: 8f \
-- Ip-address = 192.168.122.10
[Root @ node2 ~] # Cobbler system add -- name = desktop-gnome-1 \
-- Profile = Fedora17-gnome \
-- Mac = 52: 54: 00: 88: f3: 44 \
-- Ip-address = 192.168.122.11
[Root @ node2 ~] # Cobbler system report

(9). cobbler reposync
[Root @ node2 ~] # Cobbler reposync
Task started: 2013-11-11_144127_reposync
Task started( id = Reposync, time = Mon Nov 11 14:41:27 2013)
Hello, reposync
Run, reposync, run!
* ** Task complete ***

Note: The cobbler reposync command can synchronize remote yum sources to the local device.

For more details, please continue to read the highlights on the next page:

Cobbler installation and configuration for O & M Automation

Cobbler configuration in RHEL5.5

Automated O & M deployment of Cobbler Service Installation

Use Cobbler to quickly install CentOS in batches

Install and deploy Cobbler on CentOS 6.3

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next Page

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.