View on GitHub

HPC configuration management using Puppet 5

CHPC conference workshop - December 2017

Connect the Puppet Server to the Puppet DB

Previous | Home | Next

From the official documentation,

Once PuppetDB is installed and running, configure your Puppet master(s) to use it. When properly connected to PuppetDB, Puppet masters will do the following:

  • Send every node’s catalog, facts, and reports to PuppetDB
  • Query PuppetDB when compiling node catalogs that collect exported resources
  1. Install Puppet DB termini
    sudo yum install puppetdb-termini

  2. Create the config files
    1. Set up where to find the PuppetDB web service
      sudo bash -c "cat <<EOF >> /etc/puppetlabs/puppet/puppetdb.conf
      [main]
      server_urls = https://workshop.vm:8081
      EOF
      "
      

    2. Set up the Puppet Server’s reporting and config storage to use PuppetDB
      sudo sed -ri 's/(\[master\])/\1\nstoreconfigs = true\nstoreconfigs_backend = puppetdb\nreports =    puppetdb\n/g' /etc/puppetlabs/puppet/puppet.conf
      

    3. Set up the Puppet Server’s fact storage to use PuppetDB
      sudo bash -c "cat <<EOF >> /etc/puppetlabs/puppet/routes.yaml
      ---
      master:
        facts:
          terminus: puppetdb
          cache: yaml
      EOF
      "
      

  3. Restart the Puppet Server
    sudo systemctl restart puppetserver

Previous | Home | Next