Page MenuHomePhabricator

Project-wide Puppet classes and variables
Closed, DuplicatePublic

Description

It would be nice if Puppet classes and variables could not only be chosen on an instance level as now, but also for the containing project. Thus, if on the project level class A is selected or variable B is set to C, all instances in that project have these applied. For example, in Tools we could set the hostname of the mail relay or the grid master this way in the UI and wouldn't have to do that in the central Puppet repository where it feels out of place.

Caveat #1: As this would apply Puppet classes/variables on instance creation, the warnings about initial Puppet configurations apply. But project owners would have to actively enable project-wide settings, so if it suits them, fine, if not, they won't complain compared with today.

Caveat #2: If we just use the same UI for instances and projects, there's no obvious way to set the project-wide default for a variable to "some string", but set it for an instance to nothing/an empty string. IMHO this falls under the "won't complain" category as it's a fringe case.


Version: unspecified
Severity: enhancement

Details

Reference
bz64980

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:23 AM
bzimport set Reference to bz64980.

When puppet 3 is available we'll be able to do this via hiera.

Giuseppe, with Gerrit change #168984 merged, I suppose this is now (almost?) possible? Just need to add "hiera_include('classes')" to role::labs::instance or something like that?

Tim: what are you *really* trying to achieve?

I can imagine 2 scenarios:

  1. You want to set some project-wide configuration for puppet classes you will include later; this can be done by defining them in the Hiera:<projectname> page on wikitech in a yaml format (it's still undocumented as of today, but...)
  1. You want to have some classes applied everywhere, and the solution is to include the hiera_include('classes') at the top-scope, so maybe in labs.pp; I have to play a little with this to understand if I really like it (given we already have a sort-of ENC in our crappy ldap integration).
Joe changed the task status from Open to Stalled.Feb 16 2015, 10:16 AM
Joe lowered the priority of this task from Medium to Low.
Joe set Security to None.

@Joe I would also like to have hiera_include('classes') at some point. Should investigate when I'm back.

Sorry for the late reply. The variables part is done with mwyaml, and the classes part is now dealt with in T90592. I'll file tasks if I run into any walls. Thanks!