In this post I continue with my series of using the Puppet Learning VM to help administrators with their automation tasks. (Read my two previous posts about the Puppet Learning VM: part one and part two.) In part two I went through setting up a second Puppet VM so you can take advantage of the Master/Agent workflow that PuppetLabs recommends. In this post, I run through using it in a couple of examples and continue through the tutorial. This will begin with the “Saying Hi” example given in the tutorial.
The first thing we do is make sure both Puppet VMs are running, and you’re logged in. Then type puppet agent – -test to start pulling information from the master manually. You’ll see at the end of the report it outputs that it exits saying “Exiting: no certificate found and waitforcert is disabled.” This means the agent is not authorized to collect configurations from the master, and so it’s necessary to get a signed certificate so they trust one another. For this, we’ll need to log in to the master Puppet VM.
To sign the certificate, do the following:
- Log in to the master Puppet VM.
- To get a list of possible agents with certificates type puppet cert list.
- To sign the certificate for that agent type puppet cert sign [name of agent].
- Now we can go back to the host and type puppet agent – -test, and it will gather the information.
The tutorial then takes you through setting up node definitions so you can define which classes get pushed out to which agent catalogs. For instance, you don’t need to push all classes out to every agent. At that point, you would run the puppet agent – -test command again to manually collect that information for your agent’s catalog. Please refer to the following video or the documentation in the Puppet Learning VM Tutorial to see how this is done.
As always, if you have any questions or comments, please feel free to leave them in the comments section.