码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu 16.04搭建puppet服务

时间:2018-07-11 12:23:48      阅读:282      评论:0      收藏:0      [点我收藏+]

标签:puppet   系统管理   follow   ase   pup   product   host   验证   start   

Ubuntu 16.04搭建puppet服务:

Puppet是一种配置管理工具,可帮助系统管理员自动执行服务器基础架构的配置和管理。

一、安装软件

master:

curl -O https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb

dpkg -i puppetlabs-release-pc1-xenial.deb

apt-get update

apt-get install puppetserver

ln -s /opt/puppetlabs/bin/puppet /usr/bin/

systemctl start puppetserver

systemctl enable puppetserver

agent:

curl -O https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb

dpkg -i puppetlabs-release-pc1-xenial.deb

apt-get update

apt-get install puppet-agent

ln -s /opt/puppetlabs/bin/puppet /usr/bin/

systemctl start puppet

systemctl enable puppet

二、证书签名

agent:

vi /etc/hosts

10.0.0.2 puppet (puppet master服务器)
:wq

puppet agent -t

master:

puppet cert list

puppet cert sign puppeta.ming.com (根据上1步的显示)

1次性部署所有请求:

puppet cert sign --all

三、推送验证

master:

vi /etc/puppetlabs/code/environments/production/manifests/site.pp

file {‘/tmp/it_works.txt‘:
ensure => present,
mode => ‘0644‘,
content => "It works on ${ipaddress_eth0}!\n",
}
:wq

agent:

puppet agent -t

cat /tmp/it_works.txt

Ubuntu 16.04搭建puppet服务

标签:puppet   系统管理   follow   ase   pup   product   host   验证   start   

原文地址:http://blog.51cto.com/yangzhiming/2140268

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!