In our first post, we gave you the overview of what puppet was and how to install the software so its available on your system. Now its time to get into the guts of the system and get your client connecting to your master server.
Configuration
By default, puppet really wants to look for a server at puppet.. If you need to change this to a different server name, you’ll want to edit the /etc/puppet/puppet.conf file and add in an entry such as this:
[agent]
server = puppet-server-FQDN-here
Since i’m using a private network, I have an entry in my /etc/hosts to force the puppet.usrlocal.com to go over a private address instead of the public IP that DNS will normally resolve to.
We’re finally ready to connect our client to the master server. Its a simple process, but we’ll lay it all out so you konw what’s going on. Here’s the command that I typically use for making that initial contact.
puppet agent -t --waitforcert 60
If you didn’t put an entry in your /etc/puppet/puppet.conf file or you have your puppet server as a different name from puppet.domainname, then you’ll need to add…
--server yourpuppetserverhere
Since this is a new install and you probably haven’t setup anything fancy like the auto-signing of certificates. In order to allow your new client server to connect to the puppet master, you’ll need to sign the certificate request. On your puppet master server, issue the following command:
# To see the pending requests
puppetca --list
# to sign the certificate
puppetca --sign [cert]
Now go back to your newly created client machine and re-run the puppet agent command, you should see a different result.
puppet agent -t --waitforcert 60
[root@web1 ~]# puppet agent -t --waitforcert 60
info: Caching catalog for web1.usrlocal.com
info: Applying configuration version '1346573163'
notice: Finished catalog run in 1.39 seconds
Whoohoo! Success! Now time to start adding in some modules or creating some of your own!
More on the puppet agent command can be found in the PuppetLabs documentation.
Up Next
Our next post is going to be an example of your first module.
Share this:
<div class="sd-content">
<ul>
<li class="share-facebook">
<a rel="nofollow" data-shared="sharing-facebook-1829" class="share-facebook sd-button share-icon no-text" href="http://usrlocal.com/2012/09/puppet-making-a-connection/?share=facebook" target="_blank" title="Click to share on Facebook"><span></span><span class="sharing-screen-reader-text">Click to share on Facebook (Opens in new window)</span></a>
</li>
<li class="share-linkedin">
<a rel="nofollow" data-shared="sharing-linkedin-1829" class="share-linkedin sd-button share-icon no-text" href="http://usrlocal.com/2012/09/puppet-making-a-connection/?share=linkedin" target="_blank" title="Click to share on LinkedIn"><span></span><span class="sharing-screen-reader-text">Click to share on LinkedIn (Opens in new window)</span></a>
</li>
<li class="share-google-plus-1">
<a rel="nofollow" data-shared="sharing-google-1829" class="share-google-plus-1 sd-button share-icon no-text" href="http://usrlocal.com/2012/09/puppet-making-a-connection/?share=google-plus-1" target="_blank" title="Click to share on Google+"><span></span><span class="sharing-screen-reader-text">Click to share on Google+ (Opens in new window)</span></a>
</li>
<li class="share-pinterest">
<a rel="nofollow" data-shared="sharing-pinterest-1829" class="share-pinterest sd-button share-icon no-text" href="http://usrlocal.com/2012/09/puppet-making-a-connection/?share=pinterest" target="_blank" title="Click to share on Pinterest"><span></span><span class="sharing-screen-reader-text">Click to share on Pinterest (Opens in new window)</span></a>
</li>
<li class="share-twitter">
<a rel="nofollow" data-shared="sharing-twitter-1829" class="share-twitter sd-button share-icon no-text" href="http://usrlocal.com/2012/09/puppet-making-a-connection/?share=twitter" target="_blank" title="Click to share on Twitter"><span></span><span class="sharing-screen-reader-text">Click to share on Twitter (Opens in new window)</span></a>
</li>
<li class="share-email">
<a rel="nofollow" data-shared="" class="share-email sd-button share-icon no-text" href="http://usrlocal.com/2012/09/puppet-making-a-connection/?share=email" target="_blank" title="Click to email this to a friend"><span></span><span class="sharing-screen-reader-text">Click to email this to a friend (Opens in new window)</span></a>
</li>
<li class="share-end">
</li>
</ul>
</div>