[Labs-announce] No more puppet globals in labs

Andrew Bogott abogott at wikimedia.org
Wed Sep 7 02:27:51 UTC 2016


This email is only of interest to Labs project admins; Tool-Labs users 
can disregard this entirely.

tl;dr:

Don't set instance puppet variables using the puppet config page; 
instead use the hiera pages of the form 
https://wikitech.wikimedia.org/wiki/Hiera:<project>/host/<instance>


The whole story:


Until recently, the recommended way to specify e.g. a puppet server on 
Labs was via a global variable set on the 'configure' panel in Wikitech.

That panel was designed several Puppet versions ago; modern puppet 
discourages use of global variables.  Instead, we're going to configure 
everything via hiera, which is the built-in cascading database puppet 
uses to configure classes.

This will have quite a few advantages, but the main one is that this 
gets us a bit closer to being able to adopt the new Horizon-based puppet 
management system that I'm in the process of writing.  It's also one of 
the last steps on the road to eliminating a whole pile of ldap dependencies.

Right now I'm hunting down all the puppet globals currently set, 
removing them, and adding equivalent hiera settings.  In a day or two 
the puppet variable feature on wikitech will disappear entirely, but 
please don't use it in the meantime.  If you're hunting for a setting, 
look on the hiera page for your project or instance.

For project-wide hiera config, pages have this format:

https://wikitech.wikimedia.org/wiki/Hiera:<project>

For instance-specific hiera, the url looks like this:

https://wikitech.wikimedia.org/wiki/Hiera:<project>/host/<instance>

Those hiera pages are simple yaml, and setting a single param is even 
simpler.  Here's an example, from 
https://wikitech.wikimedia.org/wiki/Hiera:Ttmserver/host/ttmserver-mediawiki01:

---
"role::salt::minions::salt_master": ttmserver-salt01.eqiad.wmflabs
"role::salt::minions::salt_finger": 42:bb:24:ad:a5:75:86:95:db:da:dd:33:c5:90:5d:3e

That's it!

I realize this is fairly arcane -- don't hesitate to respond with 
questions or find me on IRC if you get stuck.  In a few weeks we should 
be back to having a friendly, web-based system, one that should make a 
bit more sense.

-Andrew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/labs-announce/attachments/20160906/49ea93b6/attachment.html>


More information about the Labs-announce mailing list