Ask Your Question

Getting started with puppet

asked 2014-10-23 12:41:20 -0600

jimsonpai gravatar image

updated 2014-10-23 12:56:24 -0600

HI All, I am new to puppet. I spent a week on google on how to setup puppet; there're a lot of resources online, but most of them are outdated. It causes me a lot of confusion. I hope this post can help me and many others on getting started with puppet 3.4.3 properly.

Where am I at:
I boot up 2 VM both on linuxmint 17; puppetmater and puppetclient. 
I setup my host file where I can "ping puppetmaster" in puppetclient and get a response. Visa versa.

Task: I want to Setup Apache web server to serve Web pages. In master's site.pp (etc/puppet/manifests/site.pp) my configuration looks like this.

node default {
       package {  'apache2':
          ensure => installed

  service { 'apache2':
      ensure => true,
      enable => true,
      require => Package['apache2']

My question:

  1. How can I test whether my puppetclient is at a state that I want it to be?
  2. In the tutorial online, it saids there should be a report sent every 30min from the client. Where can I read it?
  3. How do I know there is a connection between my puppetmaster and puppetclient? In master, I typed sudo puppet cert list --allit shows 2 local domains. puppetclient.localdomain and puppetmaster.localdomain. I then typed sudo puppet cert sign --allto sign all of it. Does that mean I successfully establish a connection? If so How to check it?
  4. In the tutorial it also says the modules I used to managing nodes is located in puppetmaster's /etc/puppetlabs/puppet/modules. The puppetlabs directory in my /etc/ doesn't even exist. Does that mean I did not setup puppetmaster properly? The main reason why I have so much confusion during my search in google is because the directories listed in other websites doesn't exist for me. I believe I did setup my master and client correctly. I did run sudo service puppetmaster startand sudo service puppet start.
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-24 02:57:13 -0600

domcleal gravatar image

updated 2014-10-24 02:57:37 -0600

  1. You can run puppet agent -t (t for test) on the client to run the agent, and you'll see whether it makes any changes or not. If you want to test this automatically, you can add --detailed-exitcodes which'll report through exit codes if changes were made, or use reports.
  2. Usually in /var/lib/puppet/reports on the master, and /var/lib/puppet/state/lastrunreport.yaml on the client. The report processors on the master are controlled by the reports setting which defaults to storing them locally (puppet master --configprint reportdir). There are loads of interesting ways to process and notify on reports.
  3. Signing the cert just means that next time the client connects, it'll get its certificate. To check if it's fetching configuration, look in the master's syslog for messages saying it's compiling catalogs, run the agent (see 1) or reports.
  4. /etc/puppetlabs is usually used by Puppet Enterprise. The OSS version uses /etc/puppet instead. /etc/puppet/modules is configured by default for all environments and is a good enough place to start putting modules, or /etc/puppet/environments/*/modules/ has per-environment configuration.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-10-23 12:41:20 -0600

Seen: 117 times

Last updated: Oct 24 '14