You are browsing a read-only backup copy of Wikitech. The primary site can be found at

Nova Resource:Puppet-diffs/Documentation

From Wikitech-static
< Nova Resource:Puppet-diffs
Revision as of 17:35, 6 September 2018 by imported>Herron
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Nova Resource:Puppet-diffs/Documentation


Puppet-compiler simulates puppet changes and determine the effective difference before/after a given change to puppet files.

This project contains execution hosts for the Jenkins job operations-puppet-catalog-compiler. It computes the effective difference before/after a proposed puppet change for a given set of nodes. Also known as puppet compiler.

Build output is accessible via web service

For documentation on the service, see Puppet Testing.


  • How to update the compiler's facts? (e.g. INFO: Unable to find facts for host conf2001.codfw.wmnet, skipping)
You'll need access to all the puppet master workers puppetmaster::servers in hieradata and the compiler hosts and launch this script from your local checkout of the puppet repository for each compiler hosts. The list of compiler hosts is available in Jenkis. As of Oct. 5th 2017 there are only two compiler hosts and one is the default for the script, so you just have to run:
# Run this for all the compiler hosts (see for the current list of compilers)
PUPPET_COMPILER=<fqdn-of-compiler-host> ./modules/puppet_compiler/files/compiler-update-facts

# Example bash one-liner to be run from the root of operations/puppet git on a laptop/workstation with root access to the puppet masters
COMPILERS="compiler1001.puppet-diffs.eqiad.wmflabs compiler1002.puppet-diffs.eqiad.wmflabs"; for COMPILER in $COMPILERS; do PUPPET_COMPILER="$COMPILER" ./modules/puppet_compiler/files/compiler-update-facts; done
It will cycle through all the puppet master workers and sync the facts from all of them
Only the most recent fact for each host will be kept on the compiler host.
  • How do you run the puppet-compiler locally on a compiler host?
From time to time it may be necessary to attempt compilation from a shell on one of the compilers. In order to do so, first ensure you have shell access to the puppet-diffs openstack instances. Ask a horizon project admin to add you to the project if you are unable to log in. After you've logged in to a compiler host via ssh:
# Become the jenkins-deploy user
sudo su - jenkins-deploy

# Run the puppet-compiler (optionally you may add --debug to the end of the command for additional debugging output)
CHANGE=<gerrit change number> NODES=<comma separated list of fqdns to compile> BUILD_NUMBER=<unique build number> puppet-compiler