IntroductionInstructions below assume you have two machines named master.example.com which will be the Puppet master and client.example.com which will be the Puppet client.
Puppet requires machines to have full qualified domain names (FQDN). Also, the clocks on machines must be in sync. Enable NTP daemon on both machines to sync the machine clock to NTP servers.
# service ntpd start
PrerequisitesPuppet requires "ruby" and "ruby-lib" packages installed.
To view puppet command-line help, you need "ruby-rdoc" package installed.
# yum ruby ruby-lib ruby-rdocPuppet is not available in CentOS "base" repository. PuppetLabs provides a Yum repository for puppet. You can install a RPM provided by PuppetLabs to configure the Yum repository.
# wget -c http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-1.noarch.rpm # yum install puppetlabs-release-6-1.noarch.rpm
Puppet ServerInstall Puppet server package on master.example.com
[root@master ~]# yum install puppet-serverStart the Puppet master daemon.
[root@master ~]# service puppetmaster start
Puppet and SSLPuppet clients uses HTTPS to communicate with the server. In order to communicate with the server Puppet clients require valid SSL certificate. Puppet master daemon acts as CA (certificate authority) for SSL certificates.
During the first run of the puppet client it generates a SSL certificate and sends to puppet master.
[root@client ~]# puppet agent --no-daemonize --onetime --verbose --debug --server=master.example.comBefore the client can successfully connect to the master, master has to sign the client certificate.
[root@master ~]# puppet cert list --all [root@master ~]# puppet cert --sign client.example.com
Puppet ClientInstall Puppet client package on client.example.com
[root@client ~]# yum install puppetTest Puppet client from the command-line. We will assume that the master has valid signed certificate for client.example.com.
[root@client ~]# puppet agent --help [root@client ~]# puppet agent --no-daemonize --onetime --verbose --debug --server=master.example.comSee the "puppet agent --help" to understand the command line flags.
In the next post, we will see how to setup a "helloworld" example for Puppet.