[go: up one dir, main page]

Page MenuHomePhabricator

Unified pattern for RemoteHosts accessors in Spicerack
Open, MediumPublic

Description

This is an offshoot from a comment thread on https://gerrit.wikimedia.org/r/1056001.

There are a number of ways that RemoteHosts instances for "important" hosts are currently created for use either elsewhere in spicerack or directly in cookbooks.

  • In some cases, code is repeated in a similar pattern across a number of cookbooks, one example being identifying the active deployment server by its CNAME record. This could benefit from deduplication, by offering an accessor somewhere in spicerack.
  • In other cases, Spicerack (i.e., the class), offers an accessor - e.g., netbox_master_host.
  • In yet other cases, specific spicerack modules offer an accessor of some form - e.g., get_maintenance_host in the mediawiki module.

So, there are opportunities to deduplicate creation of RemoteHosts instances, but before that happens, it would be good to sort out what the preferred "unified" pattern is for where the accessors should live (i.e., in the Spicerack class itself, or in proper modules).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Thanks for the task, we'll evaluate the various options and come up with a final proposal.

elukey triaged this task as Medium priority.Sep 9 2024, 2:22 PM