设为首页 收藏本站
查看: 1427|回复: 0

[经验分享] AWS 上 搭建 安装 puppet

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2016-3-22 08:20:01 | 显示全部楼层 |阅读模式
FIRST PART,   NETWORK INTERFACE
  • 增加同网段的 network interface

2.修改security groups 的权限    Inbound   ,,,   Outbound

3.   attach   to  instance

4.    修改 interface配置

root@ip-172-31-28-229:/home/ubuntu# cd /etc/network/interfaces.d/root@ip-172-31-28-229:/etc/network/interfaces.d# lseth0.cfg  eth1.cfg
SECOND PART,   CONFIG  PUPPET

I just follow this tutorial

https://www.digitalocean.com/community/tutorials/how-to-install-puppet-to-manage-your-server-infrastructure

其中,我省略了ntp部分   ssl部分   lock版本部分 ,为了快速配置

Master   command :

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18  wget https://apt.puppetlabs.com/puppetlabs-release-precise.deb 19  ls 20  dpkg -i puppetlabs-release-precise.deb 21  apt-get update 22  apt-get install -y puppet augeas-tools 23  sed -i 's/templatedir/#templatedir/g' /etc/puppet/puppet.conf 24  puppet --version 25  ls 26  wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb 27  sudo apt-get install puppetmaster-passenger 28  service apache2 stop 29  cd /etc/puppet/ 30  ls 31  cat puppet.conf 32  cd manifests/ 33  ls 34  touch /etc/puppet/manifests/site.pp 35  puppet help | tail -n 1 36  cd /var/lib/puppet/ 37  ls 38  cd ssl/ 39  ls 40  cd 41  hostname -f 42  puppet cert list --all 43  puppet cert sign --all 45  service puppet start 46  service apache2 start 47  puppet cert sign --all 48  puppet cert list --all 49  ping ip-172-31-19-247 50  puppet cert sign --all 51  puppet cert list --all 52  screen tail -f /var/log/syslog 53  nano  /etc/puppet/manifests/site.pp

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Client  command :

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

10  wget https://apt.puppetlabs.com/puppetlabs-release-precise.deb 11  ls 12  dpkg -i puppetlabs-release-precise.deb 13  apt-get update 14  apt-get install -y puppet augeas-tools 15  sed -i 's/templatedir/#templatedir/g' /etc/puppet/puppet.conf 16  puppet --version 17  puppet describe

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

修改 puppet 配置文件  puppet.conf  以及 /etc/default/puppet

root@ip-172-31-19-247:/home/ubuntu# cat /etc/puppet/puppet.conf

[main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet factpath=$vardir/lib/facter[agent] server = ip-172-31-28-229.us-west-2.compute.internal

ubuntu@ip-172-31-19-247:~$ cat /etc/default/puppet

# Defaults for puppet - sourced by /etc/init.d/puppet# Enable puppet agent service?# Setting this to "yes" allows the puppet agent service to run.# Setting this to "no" keeps the puppet agent service from running.START=yesHow The Main Manifest Is Executed

The puppet agent periodically checks in with the puppet master (typically every 30 minutes). During this time, it will send facts about itself to the master, and pull a current catalog–a compiled list of resources and their desired states that are relevant to the agent, determined by the main manifest. The agent node will then attempt to make the appropriate changes to achieve its desired state. This cycle will continue as long as the Puppet master is running and communicating with the agent nodes.

IMMEDIATE EXECUTION ON A PARTICULAR AGENT NODE

It is also possible initiate the check for a particular agent node manually, by running the following command (on the agent node in question):

puppet agent --testpuppet agent --test --onetime --no-daemonize  --verbosepuppet agent --test --onetime --no-daemonize  --verbose --noop         noop 意思不真正执行备注 :

1.Puppet  的版本问题

旧版puppet2.7    的Master node 安装不一样

新版puppet3.8    Install the puppetmaster-passenger package:

sudo apt-get install puppetmaster-passenger

The Puppet master, Passenger, Apache, and other required packages are now installed. Because we are using Passenger with Apache, the Puppet master process is controlled by Apache, i.e. it runs when Apache is running.

Before continuing, stop the Puppet master by stopping the apache2service:

sudo service apache2 stop

而且系统没有puppetmaster 这个 服务

root@ip-172-31-28-229:/etc/network/interfaces.d# service puppetmaster statuspuppetmaster: unrecognized service

我记得puppet2.7  是有的

再然后,client node 执行命令也可以 不一样

puppet2.7   中 客户端 这么发送请求     puppetd –test –server



运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-194010-1-1.html 上篇帖子: puppet 详细使用(2)module模块配置ubuntu local repository 下篇帖子: pure-ftpd搭建教程
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表