Puppet Simple Installation

Source: Internet
Author: User
Tags yum repolist

Operating system environment used for this installation: Centos6.5 x86_64,puppet3.8.3


# #服务器端

1. Modify the hostname (very important)

The service side and each client should ensure that the domain name can be resolved to the corresponding server correctly!

With the use of DNS services, this is simplified by the way the hosts are modified.

#vim/etc/hosts

192.168.0.26 maseter.puppet.com

#vim/etc/sysconfig/network

Modify hostname

Hostname=maseter.puppet.com

If you don't want to restart, the temporary hostname will be changed.

#hostname maseter.puppet.com

Verify the result of the modification

#hostname

Seeing that the results and settings are consistent is correct, and other clients modify them themselves.



2. Configure the Yum source

puppetlabs:http://yum.puppetlabs.com/

This image is mainly used to download the Puppet class package;

The Yum source auto-Configuration package puppetlabs-release-el-6.noarch.rpm is given on the page.

Downloading and installing to the system will automatically install the configuration Yum Source address.

#yum Repolist Enabled

Refresh the Yum source and view the configuration results for the available feeds



3. Server-side installation configuration puppetmaster

3.1 Installation

#rpm-Q puppet puppet-server Facter

#yum-y install puppet puppet-server facter


#ls/etc/puppet/

auth.conf #定义puppet Master ACL file

fileserver.conf #定义puppet The Master file server configuration file

Manifests #puppet脚本主文件目录

MANIFESTS/SITE.PP #文件必须存在

Modules #puppet模块目录

Puppet.conf #puppet主配置文件

/var/lib/puppet/ssl #存放ssl证书的目录


3.2 Configuring Puppetmaster

#vim/ETC/PUPPET/PUPPET.COF

Note: Add outside the default configuration

[Agent]

Report=true

Pluginsync=true

masterport=8140

Server=maseter.puppet.com

Listen=true

runinterval=1800


[Master]

Certname=maseter.puppet.com

Reports=log,foreman

Environment=production

Reports=store,http,tagmail,log


3.3 Start puppetmaster

#service puppetmaster Start

#service puppet Start

Or

#/etc/init.d/puppetmaster start

#/etc/init.d/puppet start


See if Port 8140 is enabled

#lsof-i:8140

Port enable Basic is normal, you can also go to open the log whether there are errors.




#客户端

1. Preparation before installation

Configure the Yum source to modify the host name

The domain name of the agent in this example is:

192.168.0.27 agent.puppet.com


2. Installing the Configuration Client

2.1 Installation

Rpm-q puppet Facter

Yum Install puppet Facter


2.2 Configuring the Client

#vim/ETC/PUPPET/PUPPET.COF

Note: Add outside the default configuration

[Agent]

#开启报告汇总给服务端

Report=true

#开启插件同步

Pluginsync = True

#服务端端口

masterport=8140

#服务端地址

Server = maseter.puppet.com

#开启监听8139, the server can proactively initiate updates

Listen=true

#周期同步时间, unit of seconds

runinterval=1800


2.3 Start Puppet

#service puppet Start

Or

#/etc/init.d/puppet start


3. Configure the Certificate

3.1 Client Request Certificate

#puppet Agent--no-daemonize--onetime--verbose--debug--server=maseter.puppet.com


3.2 Service-Side approval certificate

#puppet cert--sign agent.puppet.com


4. Simple synchronization Verification

4.1 Server-side Configuration synchronization files

4.1.1

#vim/etc/puppet/fileserver.conf

Additional

[Test]

Path/etc/puppet

Allow *


4.1.2

Create and edit synchronization node information

Vim/etc/puppet/manifests/site.pp

Node Default {

file {"/tmp/helloworld.txt":

Source=> "Puppet:///opencdn/helloworld.txt",

Owner=> "Root",

Group=> "Root",

mode=>777,

}

}


4.1.3

Create a new file Helloworld.txt under/etc/puppet/and write the content as you wish.


4.2 Client Synchronization files

#puppet Agent--test--server=maseter.puppet.com

View client/tmp/will have helloworld.txt generated, the content is consistent with the server.


At this point, the puppet Server client is simply configured and can be used normally.


Note: If you are receiving an installation, you need to prepare the following basic packages:

Puppet Puppet-server Facter Rubyshadow



Acknowledgement: I refer to a number of articles after summing up, in this thank you network share!

This article is from the "4699096" blog, please be sure to keep this source http://4709096.blog.51cto.com/4699096/1710692

Puppet Simple Installation

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.