Using Foreman with a R10k Workflow


I use R10k to deploy Puppet environments that are used for testing
features. Part of my workflow includes cutting a new Puppet environment
and then running several nodes against this environment using "puppet agent
-t --environment=test_environment." Today, Foreman makes this somewhat

I have 'enc_enviroment' set to 'true' so that Foreman enforces the
environment for my real production hosts. This is a global setting in
Foreman. When the ENC enforces the environment, the Puppet agent will now
allow you to override it. To overcome this, I have to either:

  • Disable 'enc_environment' globally - not really a good option because I
    want Foreman to enforce the environment for my production hosts.

  • Login to Foreman, import the new environment, assign the host to the test
    environment for testing purposes. This is a very slow process as it is

Next, I have to classify the new class on the host by importing classes,
browsing to the node, etc. Again, this takes 5+ minutes just to classify
the host.

The Puppet Console makes this a bit easier because it automagically imports
classes (they are available almost immediately without having to use some
type of 'import' function). Console also allows you to assign classes in
any environment to *any host (it doesn't filter per environment like
Foreman) which could make this process quicker.

I'm curious as to how others are handling this type of workflow when using
Foreman? Thoughts? Suggestions?