Page MenuHomePhabricator

Make Cloud VPS hiera role aware
Closed, DeclinedPublic

Description

Wikitech users include puppet class on nodes via the wikitech "configure instance" interface, in which they check boxes corresponding to the names of puppet classes.

In production, we use the role keyword to include role:: classes on certain nodes and to import hiera role scope. This role keyword is not available for users to include classes in labs.

We should make wikitech somehow role aware. Perhaps checking a box to include a class that starts with 'role::' should include via the role keyword rather than plain ol' include. Or perhaps there should be a differentiation in the interface between regular classes and role classes.

Either way, if this is done, then hiera role scope will work in labs.

Event Timeline

Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald Transcript

Some Labs projects use the classes Hiera variable set for example at https://wikitech.wikimedia.org/wiki/Hiera:Tools to apply (role) classes to all instances, in the case of Toolforge role::aptly::client. AFAICS, your proposal(s) would not affect this as typically those role classes do not depend on the Hiera role backend, but when documenting it should be stressed which "includes" trigger the role() magic and which not.

yuvipanda raised the priority of this task from Low to Medium.Apr 11 2016, 8:06 PM
yuvipanda added a subscriber: yuvipanda.

This would also make things like setting up k8s worker nodes easier, since we can set hiera variables by the roles they've applied rather than one per host, which we have to do now.

Is this still meaningful now that there's no puppet config on wikitech? Does Horizon have the same issue?

Is this still meaningful now that there's no puppet config on wikitech? Does Horizon have the same issue?

The prefix hiera config in Horizon is a bit like the role() function and the "role" hiera backend that it works with, but it is not really the same thing. I'm not entirely sure if role() is meant to work the same way going forward with the new role/profile structure that is being promoted in ops/puppet.git.

I think it is still relevant, as I'm not sure if role hiera works in labs. Ideally it would work in the same way as it does in production.

I'm not entirely sure if role() is meant to work the same way going forward with the new role/profile structure that is being promoted in ops/puppet.git.

Yes, we still want to apply roles to nodes. It's just that one node will use a single role only while roles can contain multiple profiles. Roles are still what should be applied on nodes though and i think this task is still relevant and would be nice to have.

Andrew claimed this task.

This seems meaningless since wikitech doesn't do puppet config anymore.

bd808 changed the task status from Resolved to Declined.Mar 19 2018, 7:44 PM

This isn't about wikitech at all, it is about support role based hiera lookups in Cloud VPS.

I don't actually need this much anymore though, since Horizon has the prefix puppet hiera lookup, which is good enough. Thanks!

What Ottomata said. This wasn't related to Wikitech, it was about adding roles on nodes which would have been desirable independent of Wikitech vs Horizon.

'wikitech' is in the bug title though :p

Ottomata renamed this task from Make labs wikitech role aware to Make Cloud VPS hiera role aware.Mar 21 2018, 3:59 PM
Ottomata removed a project: Cloud-VPS.

That's because wikitech was used at the time. Title changed! :)