Puppet master/agent installation on RHEL7
======================================================================================================================================================
master 172.31.10.249 linux1 linux1.test.com
agent 172.31.10.220 linux2 linux2.test.com
======================================================================================================================================================
Install puppet master
======================================================================================================================================================
[root@linux1 puppet]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[root@linux1 ~]# hostname linux1
[root@linux1 ~]# rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
[root@linux1 ~]# yum list |grep puppet
puppet.noarch 3.7.2-1.el7 puppetlabs-products
puppet-server.noarch 3.7.2-1.el7 puppetlabs-products
puppetdb.noarch 2.2.2-1.el7 puppetlabs-products
puppetdb-terminus.noarch 2.2.2-1.el7 puppetlabs-products
puppetserver.noarch 0.3.0-1.el7 puppetlabs-products
ruby-shadow.x86_64 1:2.2.0-2.el7 puppetlabs-deps
rubygem-deep_merge.noarch 1.0.0-2.el7 puppetlabs-deps
rubygem-puppet-lint.noarch 0.3.2-1.el7 puppetlabs-deps
rubygem-stomp.noarch 1.3.2-1.el7 puppetlabs-deps
rubygem-stomp-doc.noarch 1.3.2-1.el7 puppetlabs-deps
[root@linux1 ~]# yum install puppet-server
Installed:
puppet-server.noarch 0:3.7.2-1.el7
Dependency Installed:
augeas-libs.x86_64 0:1.1.0-12.el7 facter.x86_64 1:2.2.0-1.el7 hiera.noarch 0:1.3.4-1.el7 libselinux-ruby.x86_64 0:2.2.2-6.el7 pciutils.x86_64 0:3.2.1-4.el7
puppet.noarch 0:3.7.2-1.el7 ruby.x86_64 0:2.0.0.353-20.el7 ruby-augeas.x86_64 0:0.5.0-1.el7 ruby-irb.noarch 0:2.0.0.353-20.el7 ruby-libs.x86_64 0:2.0.0.353-20.el7
ruby-shadow.x86_64 1:2.2.0-2.el7 rubygem-bigdecimal.x86_64 0:1.2.0-20.el7 rubygem-io-console.x86_64 0:0.4.2-20.el7 rubygem-json.x86_64 0:1.7.7-20.el7 rubygem-psych.x86_64 0:2.0.0-20.el7
rubygem-rdoc.noarch 0:4.0.0-20.el7 rubygems.noarch 0:2.0.14-20.el7
Complete!
[root@linux1 puppet]# vim /etc/puppet/puppet.conf
dns_alt_names = linux1,linux1.test.com
certname = linux1.test.com
server = linux1.test.com
[root@linux1 puppet]# ls -l /var/lib/puppet/
total 0
drwxr-x---. 2 puppet puppet 6 Oct 21 17:54 reports
drwxr-x---. 2 puppet puppet 6 Oct 21 17:54 state
[root@linux1 puppet]# puppet master --verbose --no-daemonize
Info: Creating a new SSL key for ca
Info: Creating a new SSL certificate request for ca
Info: Certificate Request fingerprint (SHA256): 72:8D:7B:70:02:59:01:F7:95:C1:77:49:87:28:F6:96:23:26:A1:27:A8:DC:58:CD:34:F9:44:69:4B:D5:46:60
Notice: Signed certificate request for ca
Info: Creating a new certificate revocation list
Info: Creating a new SSL key for linux1.cn-north-1.compute.internal
Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml
Info: Creating a new SSL certificate request for linux1.cn-north-1.compute.internal
Info: Certificate Request fingerprint (SHA256): 8E:8C:8C:C0:E1:88:2A:E1:FF:65:E3:06:25:79:8B:B4:E3:B3:FB:34:B1:97:4E:48:70:1E:F8:C4:FD:97:72:83
Notice: linux1.cn-north-1.compute.internal has a waiting certificate request
Notice: Signed certificate request for linux1.cn-north-1.compute.internal
Notice: Removing file Puppet::SSL::CertificateRequest linux1.cn-north-1.compute.internal at '/var/lib/puppet/ssl/ca/requests/linux1.cn-north-1.compute.internal.pem'
Notice: Removing file Puppet::SSL::CertificateRequest linux1.cn-north-1.compute.internal at '/var/lib/puppet/ssl/certificate_requests/linux1.cn-north-1.compute.internal.pem'
Notice: Starting Puppet master version 3.7.2
[root@linux1 puppet]# ls -l /var/lib/puppet/
total 4
drwxr-x---. 2 puppet puppet 6 Oct 29 23:49 bucket
drwxr-xr-x. 2 root root 6 Oct 29 23:49 facts.d
drwxr-xr-x. 2 root root 6 Oct 29 23:49 lib
drwxr-x---. 2 puppet puppet 6 Oct 21 17:54 reports
drwxr-x---. 2 puppet puppet 6 Oct 29 23:49 rrd
drwxr-x---. 2 puppet puppet 6 Oct 29 23:49 server_data
drwxrwx--x. 8 puppet puppet 4096 Oct 29 23:49 ssl
drwxr-xr-t. 2 puppet puppet 6 Oct 21 17:54 state
drwxr-x---. 2 puppet puppet 6 Oct 29 23:49 yaml
[root@linux1 public_keys]# service puppetmaster start
Redirecting to /bin/systemctl start puppetmaster.service
[root@linux1 public_keys]# puppet cert list
======================================================================================================================================================
Install puppet agent
======================================================================================================================================================
[root@linux2 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[root@linux2 ~]# rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
Retrieving http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
warning: /var/tmp/rpm-tmp.905Pmg: Header V4 RSA/SHA1 Signature, key ID 4bd6ec30: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:puppetlabs-release-7-11 ################################# [100%]
[root@linux2 ~]# yum install puppet
Installed:
puppet.noarch 0:3.7.2-1.el7
Dependency Installed:
augeas-libs.x86_64 0:1.1.0-12.el7 facter.x86_64 1:2.2.0-1.el7 hiera.noarch 0:1.3.4-1.el7 libselinux-ruby.x86_64 0:2.2.2-6.el7 pciutils.x86_64 0:3.2.1-4.el7
ruby.x86_64 0:2.0.0.353-20.el7 ruby-augeas.x86_64 0:0.5.0-1.el7 ruby-irb.noarch 0:2.0.0.353-20.el7 ruby-libs.x86_64 0:2.0.0.353-20.el7 ruby-shadow.x86_64 1:2.2.0-2.el7
rubygem-bigdecimal.x86_64 0:1.2.0-20.el7 rubygem-io-console.x86_64 0:0.4.2-20.el7 rubygem-json.x86_64 0:1.7.7-20.el7 rubygem-psych.x86_64 0:2.0.0-20.el7 rubygem-rdoc.noarch 0:4.0.0-20.el7
rubygems.noarch 0:2.0.14-20.el7
Complete!
[root@linux2 ~]# cat /etc/hosts
172.31.10.249 linux1 linux1.test.com
172.31.10.220 linux2 linux2.test.com
[root@linux2 ~]# vim /etc/puppet/puppet.conf
server = linux1.test.com
certname = linux2.test.com
[root@linux2 ~]# ls -l /var/lib/puppet/
total 0
drwxr-x---. 2 puppet puppet 6 Oct 21 17:54 reports
drwxr-x---. 2 puppet puppet 6 Oct 21 17:54 state
[root@linux2 ~]# service puppet start
Redirecting to /bin/systemctl start puppet.service
[root@linux2 ~]# ls -l /var/lib/puppet/
total 0
drwxr-x---. 2 root root 6 Oct 30 02:58 clientbucket
drwxr-x---. 2 root root 6 Oct 30 02:58 client_data
drwxr-x---. 2 root root 6 Oct 30 02:58 client_yaml
drwxr-xr-x. 2 root root 6 Oct 30 02:58 facts.d
drwxr-xr-x. 2 root root 6 Oct 30 02:58 lib
drwxr-x---. 2 puppet puppet 6 Oct 21 17:54 reports
drwxrwx--x. 7 puppet puppet 96 Oct 30 02:58 ssl
drwxr-xr-t. 3 puppet puppet 19 Oct 30 02:58 state
======================================================================================================================================================
Sign cert for the agent and verify connection
======================================================================================================================================================
[root@linux1 puppet]# puppet cert list
"linux2.test.com" (SHA256) 9B:00:2C:3F:44:F2:D7:E1:59:D9:50:4C:EE:34:A1:ED:34:BD:1F:2B:58:BF:B6:EA:3D:60:6F:1D:FB:5B:1F:EA
[root@linux1 puppet]# puppet cert sign linux2.test.com
Notice: Signed certificate request for linux2.test.com
Notice: Removing file Puppet::SSL::CertificateRequest linux2.test.com at '/var/lib/puppet/ssl/ca/requests/linux2.test.com.pem'
[root@linux1 puppet]# tail -f /var/log/puppet/masterhttp.log
[2014-10-30 03:09:01] 172.31.10.220 - - [30/Oct/2014:03:09:01 EDT] "GET /production/certificate/linux2.test.com? HTTP/1.1" 200 1980
[2014-10-30 03:09:01] - -> /production/certificate/linux2.test.com?
[2014-10-30 03:09:01] 172.31.10.220 - - [30/Oct/2014:03:09:01 EDT] "GET /production/certificate_revocation_list/ca? HTTP/1.1" 200 991
[2014-10-30 03:09:01] - -> /production/certificate_revocation_list/ca?
[2014-10-30 03:09:01] 172.31.10.220 - - [30/Oct/2014:03:09:01 EDT] "GET /production/node/linux2.test.com?transaction_uuid=1816306d-94b3-4c84-b74c-1d3faad34648&fail_on_404=true HTTP/1.1" 200 85
[2014-10-30 03:09:01] - -> /production/node/linux2.test.com?transaction_uuid=1816306d-94b3-4c84-b74c-1d3faad34648&fail_on_404=true
[2014-10-30 03:09:01] 172.31.10.220 - - [30/Oct/2014:03:09:01 EDT] "GET /production/file_metadatas/pluginfacts?links=manage&recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksum_type=md5 HTTP/1.1" 200 278
[2014-10-30 03:09:01] - -> /production/file_metadatas/pluginfacts?links=manage&recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksum_type=md5
[2014-10-30 03:09:01] 172.31.10.220 - - [30/Oct/2014:03:09:01 EDT] "GET /production/file_metadatas/plugins?links=manage&recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksum_type=md5 HTTP/1.1" 200 278
[2014-10-30 03:09:01] - -> /production/file_metadatas/plugins?links=manage&recurse=true&ignore=.svn&ignore=CVS&ignore=.git&checksum_type=md5
[2014-10-30 03:09:02] 172.31.10.220 - - [30/Oct/2014:03:09:02 EDT] "POST /production/catalog/linux2.test.com HTTP/1.1" 200 576
[2014-10-30 03:09:02] - -> /production/catalog/linux2.test.com
[2014-10-30 03:09:02] 172.31.10.220 - - [30/Oct/2014:03:09:02 EDT] "PUT /production/report/linux2.test.com HTTP/1.1" 200 9
[2014-10-30 03:09:02] - -> /production/report/linux2.test.com
[root@linux1 puppet]# service puppetmaster status
Oct 30 03:02:32 linux1 puppet[10681]: Notice: Starting Puppet master version 3.7.2
Oct 30 03:09:02 linux1 puppet[10681]: Notice: Compiled catalog for linux2.test.com in environment production in 0.01 seconds
[root@linux2 puppet]# service puppet status
Oct 30 03:07:01 linux2 puppet-agent[1157]: Did not receive certificate
Oct 30 03:09:01 linux2 puppet-agent[1157]: Starting Puppet client version 3.7.2
Oct 30 03:09:02 linux2 puppet-agent[1230]: Finished catalog run in 0.01 seconds
[root@linux2 puppet]# puppet agent --test
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for linux2.test.com
Info: Applying configuration version '1414652942'
Notice: Finished catalog run in 0.01 seconds
[root@linux1 puppet]# puppet agent --test
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for linux1.test.com
Info: Applying configuration version '1414652942'
Info: Creating state file /var/lib/puppet/state/state.yaml
Notice: Finished catalog run in 0.01 seconds
======================================================================================================================================================
Install a module from the Forge
======================================================================================================================================================
[root@linux1 puppet]# puppet module list
/etc/puppet/modules (no modules installed)
/usr/share/puppet/modules (no modules installed)
[root@linux1 puppet]# puppet module search apache |grep puppetlabs
Notice: Searching https://forgeapi.puppetlabs.com ...
puppetlabs-apache Puppet module for Apache @puppetlabs apache web httpd centos rhel ubuntu ssl wsgi proxy
puppetlabs-passenger Puppet module for Passenger @puppetlabs apache passenger rails rack
[root@linux1 puppet]# puppet module install puppetlabs-apache
Notice: Preparing to install into /etc/puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppet/modules
└─┬ puppetlabs-apache (v1.1.1)
├── puppetlabs-concat (v1.1.2)
└── puppetlabs-stdlib (v4.3.2)
[root@linux1 puppet]# puppet module list
/etc/puppet/modules
├── puppetlabs-apache (v1.1.1)
├── puppetlabs-concat (v1.1.2)
└── puppetlabs-stdlib (v4.3.2)
/usr/share/puppet/modules (no modules installed)
[root@linux1 puppet]# ls -l /etc/puppet/modules/
total 12
drwxr-xr-x. 8 root root 4096 Jul 18 14:08 apache
drwxr-xr-x. 7 root root 4096 Oct 28 15:13 concat
drwxr-xr-x. 6 root root 4096 Jul 16 17:11 stdlib
other command
[root@linux1 puppet]# puppet module uninstall puppetlabs-apache
[root@linux1 puppet]# puppet module upgrade puppetlabs-apache --version 0.0.3
[root@linux1 puppet]# puppet module install --module_repository http://dev-forge.example.com puppetlabs-apache
[root@linux1 puppet]# puppet module install ~/puppetlabs-apache-0.10.0.tar.gz --ignore-dependencies
======================================================================================================================================================
https://docs.puppetlabs.com/
Puppet master/agent installation on RHEL7的更多相关文章
- puppet master/agent
puppet master/agent 配置 安装 master: yum install puppet-server agent: yum install puppet 自动签名 puppet的ma ...
- 自动化运维工具之Puppet master/agent模型、站点清单和puppet多环境设定
前文我们了解了puppe中模块的使用,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/14086315.html:今天我来了解下puppet的master/age ...
- 部署puppet master/agent模型
自己画的一个简单的架构图 agent端每隔30分钟到master端请求与自己相关的catalog. 各节点时间要同步. 依赖DNS,各节点能通过主机名能解析. 1.同步时间 # yum install ...
- puppet(5)-master/agent模式
master/agent模式的工作流程 agent每隔固定时长会向master端发送nodename(自己的节点名,节点名至关重要)和 facts ,并且向服务器端请求自己的catalog. mast ...
- Puppet基于Master/Agent模式实现LNMP平台部署
前言 随着IT行业的迅猛发展,传统的运维方式靠大量人力比较吃力,运维人员面对日益增长的服务器和运维工作,不得不把很多重复的.繁琐的工作利用自动化处理.前期我们介绍了运维自动化工具ansible的简单应 ...
- Configure Puppet Master with Passenger and Apache on Centos
What is Passenger? Passenger (AKA mod_rails or mod_rack) is an Apache 2.x module which lets you run ...
- Advacned Puppet: Puppet Master性能调优
本文是Advanced Puppet系列的第一篇:Puppet master性能调优,谈一谈如何优化和提高C/S架构下master端的性能. 故事情节往往惊人地类似:你是一名使用Puppet管理线上业 ...
- WEBrick/Rack Puppet Master
Puppet's Services: The WEBrick Puppet Master Puppet master is the application that compiles configur ...
- puppet master 用 nginx + unicorn 作为前端
目录 1. 概要 2. nginx + unicorn 配置 2.1. package 安装 2.2. 配置文件设置 2.2.1. 配置 unicorn 2.2.2. 配置nginx 2.3. 测试配 ...
随机推荐
- JavaScript 编写多线程代码引用Concurrent.Thread.js(转)
这是一个很简单的功能实现: <script type="text/javascript" src="Concurrent.Thread.js">&l ...
- phpwind8.7升级9.0.1过程(四)20130207升级到20141228
每一次升级前都要注意备份 1.网站根目录的所有文件 2.网站的数据库 根据phpwind官方教程 更新到20130702版本成功并备份 更新到20140428版本成功并备份 20141228版本的更新 ...
- hihoCoder#1080 (线段树)
题目大意:线段树的区间更改与查询,但是涉及到两种区间修改方式,一是给区间中的数全部加上一个数,二是将一个区间全部置为同一个数,然后询问整个区间和. 题目分析:处理好set操作和add操作的先后顺序就O ...
- POJ-2378 Tree Cutting
题目大意:一棵n个节点的树,找出所有的点满足:删除它之后,产生的最大(这里节点数最多即为最大)新树中节点数不超n的一半. 题目分析:两次深搜,过程类似求重心. 代码如下: # include<i ...
- Applied Deep Learning Resources
Applied Deep Learning Resources A collection of research articles, blog posts, slides and code snipp ...
- java 类型转json格式
json-lib-2.4-jdk15.jar List<People> mapPersonTypes = null; private JSONArray json_mapPersonTyp ...
- HTML5 拖放(Drag 和 Drop)
拖放是一种常见的特性,即抓取对象以后拖到另一个位置. 在 HTML5 中,拖放是标准的一部分,任何元素都能够拖放. <!DOCTYPE HTML> <html> <hea ...
- Unity3D研究院之使用Animation编辑器编辑动画
Unity提供了Animation编辑器,它可以为我们编辑物理动画.举个例子比如场景中有一个来回摇动的秋千,这个秋千在项目中完全只起到衬托作用,它不会与别的游戏对象有任何交互.如果这个秋千也用代码来 ...
- Sklearn库例子3:分类——岭回归分类(Ridge Regression )例子
为了解决数据的特征比样本点还多的情况,统计学家引入了岭回归. 岭回归通过施加一个惩罚系数的大小解决了一些普通最小二乘的问题.回归系数最大限度地减少了一个惩罚的误差平方和. 这里是一个复杂的参数,用来控 ...
- C#Linq中的Union All/Union/Intersect和Top/Bottom和Paging和SqlMethods,skip,take,takewhile,skipwhile,编译查询等
我们继续讲解LINQ to SQL语句,这篇我们来讨论Union All/Union/Intersect操作和Top/Bottom操作和Paging操作和SqlMethods操作 . Union Al ...