Skip to content

natemccurdy/puppet-upgrade-workplace

Repository files navigation

Puppet Upgrade Workspace

This project aims to help you get comfortable with upgrading from Puppet 3 to Puppet 4.

It provides a Vagrant environment that comes pre-built with:

  • Puppet Enterprise 3.8 and 2016.4 masters.
  • The Catalog Preview tool
  • Example Puppet code that has incompatibilities
  • A CentOS Puppet agent

Setup

  1. Install Vagrant 1.5+

https://www.vagrantup.com

  1. Install VirtualBox or VMWare
  1. Install Vagrant Plugins

Comparing Catalogs

Running Catalog Preview

Bring up and connect to the PE 3.8 master:

vagrant up pe-38-master
vagrant ssh pe-38-master

Run the Catalog Preview tool to generate a catalog comparison:

sudo /opt/puppet/bin/puppet preview \
  --baseline-environment production \
  --preview-environment future_production \
  --migrate 3.8/4.0 \
  --nodes /vagrant/nodes.txt \
  --view overview-json | tee /vagrant/catalog_preview_overview-baseline.json

Take a look at the JSON report to see the issues that Catalog Preview found. We're saving the report to JSON to make it easier to convert to an HTML report in the next step. If you'd like this to be a bit more human-readable, change the --view to overview:

sudo /opt/puppet/bin/puppet preview \
  --baseline-environment production \
  --preview-environment future_production \
  --migrate 3.8/4.0 \
  --nodes /vagrant/nodes.txt \
  --view overview

Generating an HTML report

/etc/puppetlabs/puppet/environments/production/modules/preview_report/preview_report.rb \
-f /vagrant/catalog_preview_overview-baseline.json \
-w /vagrant/preview_report.html

About

Vagrant environment for using Puppet's Catalog Preview

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published