整个事务完成 安装前需要考虑的地方:
版本选择:Puppet 最好的版本通常是最新的发布版
运行模式:服务器端-客户端模式和独立运行模式
DNS:Agent 每次连接 Master 时,都会使用域名
防火墙 :Puppet master 监听在 8140 端口,如果开启了防火墙必须放行 8140 端口,Iptables 配置如下:
iptables -A INPUT -p tcp -m state --state NEW --dport 8140 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -s 172.16.0.0/16 --sport 8140 -j ACCEPT
NTP 时钟同步
Puppetmaster:不能运行在Windows主机上
混合版本部署:服务端的版本必须比客户端高,4.x及以上不支持3.x及以下
硬件要求:2~4核CPU,4GB以上内存,大约可管理1000个节点
安装(来源于官网)
Yum-based systems
To enable the Puppet 5 Platform repository:
1 Choose the package based on your operating system and version.
The packages are located in the puppet5 directory of the yum.puppet.com repository and named using the following convention: -release--.noarch.rpm For instance, the package for Puppet 5 Platform on Red Hat Enterprise Linux 7 (RHEL 7) is puppet5-release-el-7.noarch.rpm.
2 Use the rpm tool as root with the upgrade (-U) flag, and optionally the verbose (-v), and hash (-h) flags:
Enterprise Linux 7
sudo rpm -Uvh https://yum.puppet.com/puppet5/puppet5-release-el-7.noarch.rpm
Enterprise Linux 6
sudo rpm -Uvh https://yum.puppet.com/puppet5/puppet5-release-el-6.noarch.rpm
Enterprise Linux 5
wget https://yum.puppet.com/puppet5/puppet5-release-el-5.noarch.rpm
sudo rpm -Uvh puppet5-release-el-5.noarch.rpm
Note: For recent versions of Puppet, we no longer ship Puppet master components for RHEL 5. However, we continue to ship new versions of the puppet-agent package for RHEL 5 agents.
Fedora 26
sudo rpm -Uvh https://yum.puppet.com/puppet5/puppet5-release-fedora-26.noarch.rpm
Fedora 25
sudo rpm -Uvh https://yum.puppet.com/puppet5/puppet5-release-fedora-25.noarch.rpm
SuSE Enterprise Linux 12
sudo rpm -Uvh https://yum.puppet.com/puppet5/puppet5-release-sles-12.noarch.rpm
SuSE Enterprise Linux 11
sudo rpm -Uvh https://yum.puppet.com/puppet5/puppet5-release-sles-11.noarch.rpm
Apt-based systems
To enable the Puppet 5 Platform repository:
1 Choose the package based on your operating system and version. The packages are located in the apt.puppet.com repository and named using the convention -release-.debFor instance, the release package for Puppet Platform on Debian 7 “Wheezy” is puppet5-release-wheezy.deb. For Ubuntu releases, the code name is the adjective, not the animal.
2 Download the release package and install it as root using the dpkg tool and the install flag (-i):wget https://apt.puppetlabs.com/puppet5-release-wheezy.deb
3 sudo dpkg -i puppet5-release-wheezy.deb
4 Run apt-get update after installing the release package to update the apt package lists.