1

I've been reading about using R10K with Puppet to manage my environments with git.

According to this blog some of the functionality of R10K was built into later versions of puppet:

Because R10k was so popular and widely deployed, an environment solution that was a simple step-up from an R10k deployment was made the target, and directory environments were born.

This led me to question if I should use R10K. So I started reading about the use of control repos in the Puppet documentation. According to the documentation I can either use R10K or Code Manager:

If you already have a Puppetfile, you can now configure code management. Code management configuration steps differ, depending on whether you’re using Code Manager (recommended) or r10k.

I had never heard of Code Manager so I went to the page describing Code Manager in the Puppet documentation. According to this page Code Manager uses R10K under the hood.

I'm getting the impression from the documentation that Code Manager is now a built in feature of Puppet? Is this the case or is it something that needs to be installed?

Note: I'm using the community version of Puppet not enterprise.

Philip Kirkbride
  • 249
  • 2
  • 10
  • 30

1 Answers1

3

Code Manager is a PE only feature, it's not built into Puppet.

Code Manager is basically an API that gets triggered when events happen on your Git server.

Example Workflow with Gitlab:

  • Someone merges a pull-request into the production branch of the control repo
  • Gitlab fires off a JSON payload at the code manager API
  • The code manager API reads the payload, sees that it's for the production branch
  • Code manager triggers an R10k Run for the production branch

I'm simplifying, as there's other steps (error checking, authentication etc) but that's essentially what's happening.

For open-source users, there's a less featured Code Manager like tool in the r10k repo: https://github.com/voxpupuli/puppet-r10k#webhook-support

Gif

It works in a similar way, but it's has less features and is not officially supportable. But it's a similar workflow: Sinatra app listens for JSON Payloads, when it receives one it triggers and R10k run for the given branch.

Peter Souter
  • 641
  • 1
  • 4
  • 13