Skip to content

feat(gcp): configure hosts, gateways and installs per data center - #627

Open
NJona wants to merge 3 commits into
multi-dc-04-per-datacenter-vmsfrom
multi-dc-05-per-datacenter-infra
Open

feat(gcp): configure hosts, gateways and installs per data center#627
NJona wants to merge 3 commits into
multi-dc-04-per-datacenter-vmsfrom
multi-dc-05-per-datacenter-infra

Conversation

@NJona

@NJona NJona commented Jul 31, 2026

Copy link
Copy Markdown
Member

Migrates the infrastructure steps from the single implicit data center to the layout: root login and host configuration run over every data center's nodes, each data center reserves its own gateway, public gateway and SSH proxy IP under a suffixed name, and each gets its own k0s configuration script patching its own gateway services.

InstallCodesphere and RunK0sConfigScript loop over the data centers in ascending order and log a step per data center. The order matters once there is more than one: the primary's install creates the database, roles and schema the others reuse, and a k0s script can only patch gateway services an install has already created.

The install command moves into the exported InstallCommand, since the CLI prints it for the operator when the bootstrap does not install itself, and it now names the data center's own config, vault and age key.

Review notes

EnsureHostsConfigured also creates /etc/codesphere/secrets up front on every node: the installer uploads a data center's age key to that fixed path but only creates its own configured secrets.baseDir, so for a data center whose baseDir differs the upload target would not exist. Harmless, since nodes belong to exactly one data center.

Behaviour for a single data center is unchanged — same VM names, same IP names, same script, same install command.

Part of the oms beta bootstrap-gcp --multi-dc stack (10 PRs). Merge in order; each PR is based on its predecessor.

NJona and others added 3 commits July 31, 2026 15:03
Migrates the infrastructure steps from the single implicit data center
to the layout: root login and host configuration run over every data
center's nodes, each data center reserves its own gateway, public
gateway and SSH proxy IP under a suffixed name, and each gets its own
k0s configuration script patching its own gateway services.

InstallCodesphere and RunK0sConfigScript now loop over the data centers
in ascending order and log a step per data center. The order matters
once there is more than one: the primary data center's install creates
the database, roles and schema the others reuse, and a k0s script can
only patch gateway services an install has already created.

The install command moves into the exported InstallCommand, since the
CLI prints it for the operator when the bootstrap does not install
itself, and it now names the data center's own config, vault and age
key.

EnsureHostsConfigured also creates /etc/codesphere/secrets up front on
every node: the installer uploads a data center's age key to that fixed
path but only creates its own configured secrets.baseDir, so for a data
center whose baseDir differs the upload target would not exist.

Behaviour for a single data center is unchanged — same VM names, same IP
names, same script, same install command.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jona Neef <Jona.Neef.97@gmail.com>
Signed-off-by: NJona <25478046+NJona@users.noreply.github.com>
Signed-off-by: NJona <25478046+NJona@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant