Puppet 简明教程
Puppet - Agent Setup
Puppet 代理是一个软件应用程序,由 Puppet 实验室提供,它在 Puppet 集群中的任何节点上运行。如果想使用 Puppet 主机管理任何服务器,则需要在该特定服务器上安装 Puppet 代理软件。通常,将在任何给定基础设施上排除 Puppet 主机机器的所有机器上安装 Puppet 代理。Puppet 代理软件能够在大多数 Linux、UNIX 和 Windows 机器上运行。在以下示例中,我们正在使用 CentOS 机器在其上安装 Puppet 代理软件。
Puppet agent is a software application, provided by Puppet labs, which runs on any node in Puppet cluster. If one wants to manage any server using the Puppet master, the Puppet agent software needs to be installed on that particular server. In general, the Puppet agent will be installed on all the machines excluding the Puppet master machine on any given infrastructure. Puppet agent software has the capability to run on most of the Linux, UNIX, and Windows machines. In the following examples, we are using CentOS machine installation Puppet agent software on it.
Step 1 −使用以下命令启用官方 Puppet 实验室收集存储库。
Step 1 − Enable the official Puppet labs collection repository with the following command.
$ sudo rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-pc1-el7.noarch.rpm
Step 2 −安装 Puppet 代理包。
Step 2 − Install the Puppet agent package.
$ sudo yum -y install puppet-agent
Step 3 −一旦安装了 Puppet 代理,请使用以下命令启用它。
Step 3 − Once the Puppet agent is installed, enable it with the following command.
$ sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running enable = true
Puppet 代理的一个关键功能是,Puppet 代理在首次开始运行时,它将生成一个 SSL 证书并将其发送给 Puppet 主机,以便由该主机进行签名和批准。一旦 Puppet 主机批准了代理的证书签名请求,它便能够通信并管理代理节点。
One key feature of the Puppet agent is, for the first time when the Puppet agent starts running, it generates a SSL certificate and sends it to the Puppet master which is going to manage it for signing and approval. Once the Puppet master approves the agent’s certificate signature request, it will be able to communicate and manage the agent node.
Note −需要在需要配置和管理任何给定 Puppet 主机的所有节点上重复上述步骤。
Note − One needs to repeat the above steps on all the nodes which needs to be configured and managed any a given Puppet master.