Page MenuHomePhabricator

Improving the way puppet roles are enabled
Closed, ResolvedPublic

Description

Author: zaran.krleza

Description:
At the moment, there are two ways to enable a role in the puppet configuration: either by editing the Roles.yaml file in the root directory, or by editing puppet/manifests/sites.pp

I want to point out that this can be confusing for someone who is not familiar with the puppet machinery. As I am myself unfamiliar with it, here are the questions which naturally came to my mind:

  • how does puppet know how to use the Roles.yaml file?
  • which file has precedence over which?

Maybe (and this is just a suggestion) it would be less confusing to have the file sites.pp being automatically updated to reflect the content of Roles.yaml and vice versa?

Is the Roles.yaml file really needed? Is it much simpler for the user to edit Roles.yaml instead of puppet/manifests/sites.pp? Especially since it is just a matter of commenting/uncommenting lines?

There are probably other reasons that I am missing here, but in any case, the documentation should be updated to presently recommend editing the Roles.yaml file.


Version: unspecified
Severity: enhancement

Details

Reference
bz51271

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:50 AM
bzimport set Reference to bz51271.

I'm about to submit a patch that gets rid of Roles.yaml / Roles and instead provides a set of optional vagrant sub-commands for managing custom manifests. ('Optional' because the user may opt to hand-edit custom manifests in manifests.d instead.)

I apologize for being fickle, but I think I finally got it right. Feedback appreciated.

Change 76625 had a related patch set uploaded by Ori.livneh:
Add Vagrant sub-commands for role management

https://gerrit.wikimedia.org/r/76625

Change 76625 merged by jenkins-bot:
Add Vagrant sub-commands for role management

https://gerrit.wikimedia.org/r/76625

Please re-open if you think the way this is handled is still messy.

[mass-moving from Tools>MediaWiki-Vagrant to separate product. See bug 54041. Filter bugmail on this comment.]