Puppet building notes

Source: Internet
Author: User

Puppet building notes

I. Introduction

Puppet is a C/S structure software that centrally manages files, packages, servers, cron, user, group, exec (execute shell commands), yumrepo, and other common resources of multiple servers.

 

Ii. puppet Workflow

  1. Puppet client collects client information through facter (host name, memory, IP address, system information ......) Concurrently sent to the server

  2. The server detects the client host name, and then parses the corresponding node configuration in manifest (syntax detection, pseudo code generation, and pseudo code sending to the client), only parses and modifies the node configuration.

  3. The client receives the code and then executes it. Then, the client passes the execution result to the server.

  4. The server then writes the execution result of the client to the log.

     

 

Iii. installation and configuration

Puppet server: 192.168.1.10 master.puppet.com

Puppet agent: 192.168.1.11 agent.puppet.com

The Host Name and IP address must be resolved. You can manually modify the hosts file or use DNS resolution.

 

  1. Configure the epel Source:

    Rpm-ivh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

  2. Operations on puppet server:

    Yum install puppet-server-y

     

    Generate the configuration file:

    Puppet master -- genconfig>/etc/puppet. conf

    Touch/etc/puppet/manifests/site. pp

    This file is equivalent to an index file, which records the agent configuration and can also define global variables.

    Example:

    Cat/etc/puppet/manifests/site. pp

    Import 'nodes. PP'

    Import 'nodes/*. PP'

    $ Puppetserver = 'master .puppet.com'

  3. Operations on puppet agent:

    Yum install puppet-y

    Vim/etc/puppet. conf

    Add

    Server = master.puppet.com (master host name, which must be pinged, hosts or dns resolution bound)

    Add in agent

    Runinterval = 10 (query interval to master, in seconds)

     

 

Iv. Test

Puppet server is started for the first time:

Puppet master -- verbose -- no-daemonize

 

Puppet agent is started for the first time:

Puppet agent -- server = master.puppet.com -- no-daemonize -- verbose -- noop -- onetime

 

If no authentication is reported, run on the CA server (CA and puppet server are on the same stage ):

Puppet cert -- list displays unauthenticated clients

Puppet cert -- sign agent.puppet.com

 

If the restart command runs normally again, the service is enabled separately.

/Etc/init. d/puppetmaster start

Chkconfig puppetmaster on

 

/Etc/init. d/puppet start

Chkconfig puppet on

Puppet Learning Series:

Puppet Learning 1: Installation and simple instance applications

Puppet 2: simple module configuration and application

Research on three Backup Recovery solutions for Puppet agent
Register your Puppet node in a safer way
Deep understanding of Puppet syntax and working mechanism through SSH Configuration
Puppet uses Nginx multiple ports for Load Balancing
C/S mode instance of Puppet in CentOS (5 and 6)

For more information about Puppet, click here.
Puppet: click here

This article permanently updates the link address:

 

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.