In order to have cluster aliases rather than clusters based on hostnames, we'd need to populate a table on each master (although for consistency) it should on all hosts.
So orchestrator can identify the cluster when querying the master.
Example:
db1083 -> s1
pc1007 -> pc1
From the doc (https://github.com/openark/orchestrator/blob/master/docs/deployment.md#populating-meta-data):
Populating meta data orchestrator extracts some metadata from servers: What's the alias for the cluster this instance belongs to? What's the data center a server belongs to? Is semi-sync enforced on this server? These details are extracted by queries such as: DetectClusterAliasQuery DetectClusterDomainQuery DetectDataCenterQuery DetectSemiSyncEnforcedQuery or by regular expressions acting on the hostnames: DataCenterPattern PhysicalEnvironmentPattern Queries can be satisfied by injecting data into metadata tables on your master. For example, you may: CREATE TABLE IF NOT EXISTS cluster ( anchor TINYINT NOT NULL, cluster_name VARCHAR(128) CHARSET ascii NOT NULL DEFAULT '', PRIMARY KEY (anchor) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; and populate this table, with, say 1, my_cluster_name, coupled with: { "DetectClusterAliasQuery": "select cluster_name from meta.cluster where anchor=1" } Please note orchestrator does not create such tables nor does it populate them. You will need to create the table, populate them, and let orchestrator know how to query the data.
Obviously, we'd need some sort of cronjob/puppet to populate or verify this data is up-to-date on all hosts.
Maybe we can populate those tables from zarcillo data periodically on the master and let it replicate (frequency to be decided)