Project

General

Profile

Actions

Feature #11248

open

Add 'agent-specified' Puppet environment option for hosts

Added by Josh Baird over 8 years ago. Updated over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Puppet integration
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

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." The problem is that I also have 'enc_environment' set to 'true' so that Foreman enforces the environment for my production hosts. When the ENC enforces the environment, the Puppet agent will not allow you to override it. This prevents me from using 'puppet agent -t --environment=test_environment" on hosts to test my new Puppet code.

Manually importing environments, manually importing classes in these environments (required because Foreman filters classes per environment) and then assigning an individual host to a new environment/class is a very slow process at the moment (over 5 minutes).

PE Console allows you to choose 'agent-specified' for the environment on a host. I'm assuming this keeps the ENC from specifying the environment, allowing one to use 'puppet agent -t --environment=whatever' from the agent. This is good, but we still need to classify the class(es) to the host. Currently, the only way to do this is to a) import the new environment b) import the new classes on the environment (again, a very long process). Perhaps Foreman can disable the host/environment class filtering if a user chooses "agent-specified" for the environment?

I think the following would satisfy my requirements:

  • Introduce an 'agent-specified' environment at the host level which would essentially disable 'enc_environment' for that specific host
  • Disable filtering on classes per environment if the user chooses 'agent-specified'

Of course, there could be a better way to handle all of this. Thoughts?


Related issues 1 (0 open1 closed)

Related to Foreman - Feature #1530: Disabling puppet env in ENC should be an optionClosedOhad Levy03/13/2012Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

  • Related to Feature #1530: Disabling puppet env in ENC should be an option added
Actions #2

Updated by Dominic Cleal over 8 years ago

  • Category set to Puppet integration
Actions #3

Updated by Josh Baird over 8 years ago

The new 'foreman_noenv' [1] plugin provides the 'agent-specified environment' functionality described in this issue. RPM packages are available in the 1.9 plugin repos.

[1] https://github.com/joshuabaird/foreman_noenv

Actions

Also available in: Atom PDF