feat(gcp): derive the VM definitions per data center - #626
Merged
NJona merged 1 commit intoAug 14, 2026
Conversation
NJona
force-pushed
the
multi-dc-04-per-datacenter-vms
branch
from
August 4, 2026 08:12
996faeb to
7859f9f
Compare
NJona
force-pushed
the
multi-dc-04-per-datacenter-vms
branch
from
August 5, 2026 15:48
7859f9f to
a763846
Compare
joka134
approved these changes
Aug 7, 2026
joka134
left a comment
Member
There was a problem hiding this comment.
Looks good. Just one idea to always use a consistent suffix style.
NJona
force-pushed
the
multi-dc-04-per-datacenter-vms
branch
2 times, most recently
from
August 10, 2026 14:17
d92a5fa to
bf78d38
Compare
NJona
force-pushed
the
multi-dc-04-per-datacenter-vms
branch
2 times, most recently
from
August 12, 2026 09:16
f26eade to
cd17ff5
Compare
NJona
force-pushed
the
multi-dc-04-per-datacenter-vms
branch
from
August 13, 2026 12:48
cd17ff5 to
38f5c64
Compare
The VM list was a package-level global describing one data center. It becomes a function of the environment: the project-shared jumpbox and postgres VMs plus each data center's three Ceph and three k0s nodes, whose names carry that data center's suffix. A single-DC bootstrap therefore still gets exactly ceph-1..3 and k0s-1..3. EnsureComputeInstances routes each instance into its own data center by the definition's DataCenterID instead of inferring placement from the VM's tag, and sorts each data center's nodes independently — the install config assigns roles by index. restart-vms resolves the valid VM names from the infra file's data center layout, so a node of a second data center can be restarted by name. It now also reads the infra file when --project-id and --zone are given, best-effort, since only the file knows the layout. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Jona Neef <Jona.Neef.97@gmail.com>
NJona
force-pushed
the
multi-dc-04-per-datacenter-vms
branch
from
August 14, 2026 07:01
5cf803f to
fb21d50
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The VM list was a package-level global describing one data center. It becomes a function of the environment: the project-shared jumpbox and postgres VMs plus each data center's three Ceph and three k0s nodes, whose names carry that data center's suffix. A single-DC bootstrap therefore still gets exactly
ceph-1..3andk0s-1..3.EnsureComputeInstancesroutes each instance into its own data center by the definition'sDataCenterIDinstead of inferring placement from the VM's tag, and sorts each data center's nodes independently — the install config assigns roles by index.restart-vmsresolves the valid VM names from the infra file's layout, so a node of a second data center can be restarted by name (--name k0s-1-dc2). It now also reads the infra file when--project-idand--zoneare given, best-effort, since only the file knows the layout.Review notes
VMDefsForEnvfalls back to a single unsuffixed data center when the environment carries none, which is what an infra file written by an older OMS looks like.Part of the
oms beta bootstrap-gcp --multi-dcstack (10 PRs). Merge in order; each PR is based on its predecessor.