Katello Puppet 4 integration


Puppet 4 Integration with Katello

Recently, Foreman and Puppet 4 became compatible. Now, Katello is ready to work with Puppet 4. It is available in Katello nightly and will be released in version 3.2. In this post, we will explain how to create new Katello instances that are Puppet 4 ready, and upgrade existing systems.

There are some important things to know about using Katello with Puppet 4:

  • Puppet 4 uses the Java Virtual Machine and requires more memory than Puppet 3 did. This means that systems acting as Katello servers with Puppet 4 need a larger amount of memory. At a minimum, we are requiring 8 GB of memory, and recommending 12GB

  • Puppet 4 masters can still provision hosts with Puppet 3 with some configuration. This can help with systems that are migrating over to Puppet 4. You can start with upgrading your masters to Puppet 4 and then gradually upgrade your agents.

  • You can use this matrix as a quick reference of what can work together:

  Puppet 3 client Puppet 4 client
Puppet 4 server Compatible Compatible
Puppet 3 server Compatible Not compatible
  • Katello will by default install modules to the normal file paths for the version of Puppet you are using.
  • Puppet 3 will install modules to /etc/puppet/environments
  • Puppet 4 will install modules to /etc/puppetlabs/code/environments

How to upgrade Katello servers, capsules, and hosts to use Puppet 4

We have a great video and excellent documentation on how to upgrade from Puppet 3 to 4.

To upgrade an existing Katello instance to Puppet 4:

Before starting, we recommend creating a backup or a snapshot of your system.

You will need to give your system access to the new Puppet packages. To do this follow the instructions here.

Then run:

katello-service stop # This will stop all services.
foreman-installer --upgrade-puppet # This performs the upgrade.

The --upgrade-puppet command will restart the services, but you can check that they are running with hammer ping. If you run puppet --version on the server, it should show 4.x.x.

How to install Katello with Puppet 4

Production Environments

If you want to install a real production server with Puppet 4 we reccommend following the instructions listed in our documentation.

If you want to create a test Katello production server configured with Puppet 4, the easiest way is to spin up a Virtual Machine with Forklift.

To do this you can follow these instructions:

git clone https://github.com/katello/forklift.git
cd forklift
vagrant up centos7-katello-p4

This will setup a virtual environment with Katello and Puppet 4 enabled.

Development environment

If you are so inclined, you can create a development environment of Katello using Puppet 4. To do this, spin it up (also with Forklift) as a virtual machine with the following configuration:

example-dev-p4:
  box: centos7
  memory: 9000
  shell: 'yum -y install ruby && cd /vagrant && ./setup.rb'
  options: --scenario=katello-devel --puppet-four
  installer: --katello-devel-github-username <YOUR GITHUB USERNAME> --disable-system-checks
  ansible:
    group: 'server'
  • Note that this setup does require you to have a fork of Foreman and Katello setup on your Github account.

  • Run vagrant up example-dev-p4 and let it spin up the box.

  • After it’s complete you will want to run this series of commands:

sudo yum install npm -y
cd foreman
npm install
  • Then you’ll have to edit a setting in /home/vagrant/foreman/config/environments/development.rb by changing the following setting to false:
config.webpack.dev_server.enabled = false
  • Next run
rake webpack:compile
rails s
  • Now you have a functioning development environment!

Making Capsules

If you wanted to create a capsule you can do so either with insturctions from our official documentation. You can also follow these steps using Forklift:

  • In your boxes.yml file, you can write:
    example-capsule-p4:
    box: centos7
    ansible:
      playbook: 'playbooks/capsule-dev.yml'
      options: --puppet-four
      group: 'capsule'
      server: 'example-katello-p4'
    
  • After run:
vagrant up example-capsule-p4
  • Once installation completes you’ll have a capsule registered to your Katello environment.

Contributors

Thanks to everyone on the Katello team for putting in the effort for making this happen. Thanks also to the Foreman team and our contributors, who put so much effort into these great projects!

More Information

Here are some good places to find more information about Puppet 4 and using it with Katello:

Puppet 4 documentation

Puppet 4 package collections

Katello Puppet upgrade documentation

Katello Capsule creation documentation

Forklift repository

Puppet upgrade demo


Comments from the community:


Foreman 3.10.0 has been released! Follow the quick start to install it.

Foreman 3.9.1 has been released! Follow the quick start to install it.