puppet 简单的安装及配置
2017-11-08 17:23
302 查看
系统环境:Centos 6.7
根据系统加入PuppetLabs官方源
master端安装
安装Agent客户端
根据系统加入PuppetLabs官方源
wget http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-7.noarch.rpm rpm -ivh puppetlabs-release-6-7.noarch.rpm
master端安装
yum install -y ruby facter puppet-server [main] # The Puppet log directory. # The default value is '$vardir/log'. logdir = /var/log/puppet # Where Puppet PID files are kept. # The default value is '$vardir/run'. rundir = /var/run/puppet # Where SSL certificates are kept. # The default value is '$confdir/ssl'. ssldir = $vardir/ssl [agent] # The file in which puppetd stores a list of the classes # associated with the retrieved configuratiion. Can be loaded in # the separate ``puppet`` executable using the ``--loadclasses`` # option. # The default value is '$confdir/classes.txt'. classfile = $vardir/classes.txt # Where puppetd caches the local configuration. An # extension indicating the cache format is added automatically. # The default value is '$confdir/localconfig'. localconfig = $vardir/localconfig server = puppet # 服务器名称 [master] certname = puppet # puppetmaster认证服务器名称 #修改配置 vim /etc/puppet/puppet.conf 启动服务 service puppet start service puppetmaster start 加入开启启动 chkconfig puppet on chkconfig puppetmaster on [root@puppet ~]# puppet cert --list -all # 带“+”表明注册成功 + "puppet" (SHA256) 41:CB:D2:51:8D:B1:48:6E:6E:97:CD:EE:5A:36:DB:F8:66:9B:F9:BB:57:F9:18:4C:11:3D:4E:0A:4E:9C:8F:04
安装Agent客户端
#绑定hosts vim /etc/hosts 192.168.0.1 puppet yum install -y puppet facter [main] # The Puppet log directory. # The default value is '$vardir/log'. logdir = /var/log/puppet # Where Puppet PID files are kept. # The default value is '$vardir/run'. rundir = /var/run/puppet # Where SSL certificates are kept. # The default value is '$confdir/ssl'. ssldir = $vardir/ssl [agent] # The file in which puppetd stores a list of the classes # associated with the retrieved configuratiion. Can be loaded in # the separate ``puppet`` executable using the ``--loadclasses`` # option. # The default value is '$confdir/classes.txt'. classfile = $vardir/classes.txt # Where puppetd caches the local configuration. An # extension indicating the cache format is added automatically. # The default value is '$confdir/localconfig'. localconfig = $vardir/localconfig server = puppet # 设置puppetmaster
# Agent发送身份验证 [root@api ~]# puppet agent -t Info: Creating a new SSL key for api Info: Caching certificate for ca Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml Info: Creating a new SSL certificate request for api Info: Certificate Request fingerprint (SHA256): 1B:71:9D:C6:09:F6:84:14:A2:23:3F:89:77:4F:16:DB:20:CD:B8:F7:1A:F0:90:54:13:ED:5A:9B:8E:AD:40:3E Info: Caching certificate for ca Exiting; no certificate found and waitforcert is disabled # Master 查看请求验证 [root@puppet ~]# puppet cert --sign --list "api" (SHA256) 1B:71:9D:C6:09:F6:84:14:A2:23:3F:89:77:4F:16:DB:20:CD:B8:F7:1A:F0:90:54:13:ED:5A:9B:8E:AD:40:3E # Master 通过客户端认证 [root@puppet ~]# puppet cert --sign api Notice: Signed certificate request for api Notice: Removing file Puppet::SSL::CertificateRequest api at '/var/lib/puppet/ssl/ca/requests/api.pem' # 查看 Master 认证机器 [root@puppet ~]# puppet cert list --all + "api" (SHA256) 6C:A7:50:6A:29:CD:09:A9:CA:0E:0F:84:81:33:97:34:C9:0E:CC:D2:A3:2D:52:F5:25:64:C3:98:A0:02:E6:07 + "puppet" (SHA256) 41:CB:D2:51:8D:B1:48:6E:6E:97:CD:EE:5A:36:DB:F8:66:9B:F9:BB:57:F9:18:4C:11:3D:4E:0A:4E:9C:8F:04 # Agent 测试认证后结果 [root@api ~]# puppet agent -t Info: Caching certificate for api Info: Caching certificate_revocation_list for ca Info: Caching certificate for api Warning: Unable to fetch my node definition, but the agent run will continue: Warning: undefined method `include?' for nil:NilClass Info: Retrieving pluginfacts Info: Retrieving plugin Info: Caching catalog for api Info: Applying configuration version '1510131350' Info: Creating state file /var/lib/puppet/state/state.yaml Notice: Finished ca b472 talog run in 0.03 seconds
相关文章推荐
- PUPPET简单安装配置
- ISA防火墙简单安装配置实例
- tomcat的安装、配置与简单使用(win7 32位)
- PUPPET安装配置MCollective+ActiveMQ——实际部署案例
- Vim73 for MS-DOS71 安装方法及简单的配置
- Google Protobuf的安装、配置、以及简单demo编译
- Ubuntu SVN安装配置十分简单
- java:安装tomcat8/tomcat9(简单安装配置)
- Python3在Windows安装配置及简单试用
- vsftpd的简单安装和配置(只有三步)
- FMS/AMS5安装后的简单应用和配置注意事项
- 简单的hadoop配置(我安装的问题)
- Redis:安装、配置、操作和简单代码实例(C语言Client端)
- 在CentOS 6.5上安装Puppet配置管理工具
- PUPPET-配置服务器之安装部署《附自动部署脚本》
- nginx的安装与简单配置
- CentOS 7.0 使用 yum 安装 MariaDB 与 MariaDB 的简单配置
- Linux下vim的配置和gcc/g++,gdb的简单安装
- nginx的安装与简单配置
- Puppet集中配置管理系统[安装与配置]