Page MenuHomePhabricator

Configure all deployment-prep instances to use local salt and puppet master by default
Closed, ResolvedPublic

Description

Find a way to make all new instances created in the deployment-prep project point to the puppet and salt masters on the deployment-salt instance by default.

This would entail adding the role::puppet::self and setting these global puppet variables:

deployment_server_override:

deployment-bastion.eqiad.wmflabs

salt_master_finger_override:

dd:d8:68:70:8c:65:a3:af:46:5c:3f:4f:d4:be:6c:71

salt_master_finger_override:

deployment-salt.eqiad.wmflabs

puppetmaster:

deployment-salt.eqiad.wmflabs

Version: unspecified
Severity: normal

Details

Reference
bz62795

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:00 AM
bzimport set Reference to bz62795.
bzimport added a subscriber: Unknown Object (MLST).

Should we set those parameters directly in the puppet manifests? This way whenever an instance is created it will be configured to point to that puppet master.

Maybe just after manifests/realm.pp

We still need to have to set the configuration manually. Pointing to the local puppet seems easy enough, I am not sure how we could automatically sign the puppet/salt keys though :(

Both salt http://docs.saltstack.com/en/latest/ref/configuration/master.html#auto-accept and puppet https://docs.puppetlabs.com/puppet/latest/reference/ssl_autosign.html can be configured to automatically sign keys. I personally don't see that there would be an sort of serious security implications of making this work within the beta cluster.

Yuvi and Giuseppe are working on integrating wikitech and hiera in such a way that it should be possible to setup per-project configuration that can automate adding the proper roles and settings to all hosts in the deployment-prep project. The trickiest part will probably be trying to find a way to automate removing the salt key for the labs wide master so that the project specific master's key can be saved on each host.

This may be possible via the new hiera integration with wikitech.

The beta salt and puppet masters would need to be configured to auto-sign certificates to go along with this as noted previously. I think this is reasonably safe since you can not communicate with our salt and puppet masters from outside the project and only admins who would also be able to sign certs can create new instances.

I have created two subtasks to auto accept keys on the salt master (T75766) and puppet master (T75767).

Hmm, I wonder if we should enable a hiera thing that lets you switch puppetmasters. Problem there would be reverting - if the puppetmaster you pointed to was wrong, reverting won't work since that would require a puppet run to work.

Hmm, I wonder if we should enable a hiera thing that lets you switch puppetmasters. Problem there would be reverting - if the puppetmaster you pointed to was wrong, reverting won't work since that would require a puppet run to work.

This should just be setting $::puppetmaster and enabling role::puppet::self which you can already do easily in the wikitech interface. I haven't tried yet to control either of these via the hiera settings, but in theory it should be possible. It would probably be nicer with a bit of refactoring on the puppet side. I don't know if we are using hiera_include('classes') or something similar in site.pp yet to apply classes defined in hiera.

hashar lowered the priority of this task from High to Lowest.Feb 10 2015, 8:37 PM

We can probably use hiera and https://wikitech.wikimedia.org/wiki/Hiera:deployment-prep to populate the *override variables.

Lowering priority since nobody is actively looking at this task.

This can be done now easily thanks to thcipriani's patches.