56u6i 发表于 2016-3-22 08:20:01

AWS 上 搭建 安装 puppet

FIRST PART,   NETWORK INTERFACE
[*]增加同网段的 network interface

2.修改security groups 的权限    Inbound   ,,,   Outbound3.   attach   toinstance4.    修改 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.cfgeth1.cfg
SECOND PART,   CONFIGPUPPETI just follow this tutorialhttps://www.digitalocean.com/community/tutorials/how-to-install-puppet-to-manage-your-server-infrastructure其中,我省略了ntp部分   ssl部分   lock版本部分 ,为了快速配置Master   command :~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18wget https://apt.puppetlabs.com/puppetlabs-release-precise.deb 19ls 20dpkg -i puppetlabs-release-precise.deb 21apt-get update 22apt-get install -y puppet augeas-tools 23sed -i 's/templatedir/#templatedir/g' /etc/puppet/puppet.conf 24puppet --version 25ls 26wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb 27sudo apt-get install puppetmaster-passenger 28service apache2 stop 29cd /etc/puppet/ 30ls 31cat puppet.conf 32cd manifests/ 33ls 34touch /etc/puppet/manifests/site.pp 35puppet help | tail -n 1 36cd /var/lib/puppet/ 37ls 38cd ssl/ 39ls 40cd 41hostname -f 42puppet cert list --all 43puppet cert sign --all 45service puppet start 46service apache2 start 47puppet cert sign --all 48puppet cert list --all 49ping ip-172-31-19-247 50puppet cert sign --all 51puppet cert list --all 52screen tail -f /var/log/syslog 53nano/etc/puppet/manifests/site.pp~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Clientcommand :~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~10wget https://apt.puppetlabs.com/puppetlabs-release-precise.deb 11ls 12dpkg -i puppetlabs-release-precise.deb 13apt-get update 14apt-get install -y puppet augeas-tools 15sed -i 's/templatedir/#templatedir/g' /etc/puppet/puppet.conf 16puppet --version 17puppet describe~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~修改 puppet 配置文件puppet.conf以及 /etc/default/puppetroot@ip-172-31-19-247:/home/ubuntu# cat /etc/puppet/puppet.conf logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet factpath=$vardir/lib/facter 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 ExecutedThe 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 NODEIt 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-passengerThe 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]
查看完整版本: AWS 上 搭建 安装 puppet