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
- Install Vagrant 1.5+
- Install VirtualBox or VMWare
-
https://my.vmware.com/web/vmware/info?slug=desktop_end_user_computing/vmware_fusion/8_0
Note: You will need the Vagrant VMware provider to use Vagrant with VMWare.
- Install Vagrant Plugins
-
vagrant plugin install oscar
This will install the
oscar
Vagrant plugin which allows for automating much of the setup of the Vagrant VM's. https://github.com/oscar-stack/oscar
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
/etc/puppetlabs/puppet/environments/production/modules/preview_report/preview_report.rb \
-f /vagrant/catalog_preview_overview-baseline.json \
-w /vagrant/preview_report.html