Draft: Add gdk org configure-replication command
Summary
Adds the gdk org configure-replication command to set up Geo replication between a source (primary) and target (secondary) cell for organization migration.
This is a slice of the full org migration POC (!5619 (merged)) focusing only on the configure-replication step.
Usage
Configure in gdk.yml:
cells:
enabled: true
instance_count: 1
org_migration:
source_cell: legacy-cell
targets:
cell-2:
organization_ids:
- 1000
instances:
- config:
geo:
enabled: true
node_name: cell-2
Then run:
gdk org configure-replication
This:
- Validates that both source and target cells are configured
- Checks that both cells have a Premium or Ultimate license
- Enables required feature flags on both cells:
- Source:
geo_selective_sync_by_organizations - Target:
geo_selective_sync_by_organizations+org_migration_target_cell
- Source:
- Creates Geo primary node on source cell
- Creates Geo secondary node on target cell
- Sets up the tracking database on the target cell
- Copies the
db_key_basesecret from source to target - Copies the
geo_nodestable from source to target - Restarts Sidekiq on the target cell
Feature flags
The org_migration_target_cell feature flag is enabled on the target cell to mark it as an org migration target. This requires gitlab!219850 which adds this feature flag.
Related
- Part of: gitlab#571916 (closed)
- Full POC: !5619 (merged)
- GitLab MR: gitlab!219850
Merge request checklist
- This MR references an issue describing the change.
- This change is backward compatible.
- Tests added for new functionality.
- Documentation added/updated.
Edited by Michael Kozono