openark / orchestrator

MySQL replication topology management and HA
Apache License 2.0
5.63k stars 930 forks source link

[Feature] Allow maps to assign instances to data center, region, and environment #1091

Open jhriggs opened 4 years ago

jhriggs commented 4 years ago

Not all environments allow for determining DC, region, and environment from a hostname regex or database query. In my particular case, I can determine region and environment from our DNS naming standard, however, the DC is not available from the name or database. I could use configuration management or a cron job or something to inject something into the DB, but it is extraneous information and becomes an ongoing maintenance item.

But, it would be quite simple for me to build a list or mapping from our AWS subnets to DCs (AWS AZs) that I can bake into the Orchestrator configuration. I imagine it would be useful to add an additional map setting for each of these, DataCenterMap, RegionMap, and PhysicalEnvironmentMap that map an instance to each of these bits of metadata by:

  1. hostname + port
  2. hostname
  3. IP(s) + port
  4. IP(s)
  5. CIDR

Incoming PR that does just this…

jhriggs commented 4 years ago

1092