Onboard a tenant cell to Org Mover
This runbook connects a new dedicated tenant cell (for example a cellsdev cell on AWS) to the Org Mover control plane, so the pilot can move organizations to and from it.
The control plane runs on the org-mover-gstg GKE cluster. A dedicated cell talks to it in two directions:
| Direction | Path | Configured in |
|---|---|---|
| Cell to control plane | The cell’s producer and consumer dial the NATS data broker on the public nats-data-public Envoy Gateway (34.23.135.213:4222). The Gateway only accepts the source IPs in its allowlist. | org-mover-envoy ingress values |
| Control plane to cell | The pilot dials the cell’s producer (9101) and consumer (9102) through a per-cell internal Envoy egress Gateway, which originates TLS to the cell’s public NLB. | org-mover-envoy egress values, org-mover cell roster |
All changes live in gitlab-com/gl-infra/argocd/apps:
services/org-mover-envoy/env/org-mover-gstg/clusters/org-mover-gstg/app.yaml: ingress allowlist and egress cellsservices/org-mover/env/org-mover-gstg/clusters/org-mover-gstg/values.yaml: cell roster (cells:)
This runbook covers gstg. gprd follows the same shape once org-mover-envoy is enabled there.
Prerequisites
Section titled “Prerequisites”Collect the following before you start:
-
Tenant cell ID, for example
c01m3bt2200d4t5bqf. It is used in hostnames and object names. -
Numeric
cellId, thecell.idof the cell’s GitLab as the Topology Service registers it, for example9. The pilot addresses eachorg_moverAPI token to it. -
Tenant endpoints. The cell’s producer and consumer must be deployed and reachable at
org-mover-producer.cell-<cell-id>.gitlab-cells.dev:9101andorg-mover-consumer.cell-<cell-id>.gitlab-cells.dev:9102, behind an NLB that terminates TLS with a public ACM certificate for those names. The egress Gateway validates the certificate against the hostname. -
Pilot API key. The cell’s GitLab must list the public half of the pilot’s
org_moverAPI key inorg_mover.public_key_files. -
NAT egress IPs of the cell, one per AZ. From the cell’s AWS account:
Terminal window aws ec2 describe-nat-gateways --region us-east-1 \--query 'NatGateways[?State==`available`].[NatGatewayId,NatGatewayAddresses[0].PublicIp]'
Check the tenant endpoints resolve and serve a valid certificate:
for svc in producer:9101 consumer:9102; do host="org-mover-${svc%%:*}.cell-<cell-id>.gitlab-cells.dev" openssl s_client -connect "${host}:${svc##*:}" -servername "$host" -verify_return_error </dev/null 2>&1 \ | grep -E 'subject=|Verify return code'doneBoth must print Verify return code: 0 (ok).
Procedure
Section titled “Procedure”1. Open an MR in argocd/apps
Section titled “1. Open an MR in argocd/apps”Make all three changes in one MR, titled for example
feat(org-mover): onboard cell <cell-id> (cell <cellId>) in gstg.
Ingress allowlist. Add the cell’s NAT IPs to loadBalancerSourceRanges in the org-mover-envoy app.yaml. Keep
the entries of the other cells:
ingress: loadBalancerSourceRanges: # cell <cell-id> (cell <cellId>) - 203.0.113.10/32 # nat-xxxxxxxxxxxxxxxxx - 203.0.113.11/32 # nat-yyyyyyyyyyyyyyyyyEgress cell. Add the cell under egress.cells in the same file. Each entry renders its own Gateway, EnvoyProxy,
Backends, BackendTLSPolicies and TCPRoutes, and a ClusterIP Service named tenant-egress-<cell-id>:
egress: cells: <cell-id>: consumer: hostname: org-mover-consumer.cell-<cell-id>.gitlab-cells.dev port: 9102 producer: hostname: org-mover-producer.cell-<cell-id>.gitlab-cells.dev port: 9101Cell roster. Add the cell to cells: in the org-mover values.yaml, pointing at its egress Service:
cells: - name: cell-<cell-id> producerAddr: tenant-egress-<cell-id>.envoy-gateway-system.svc.cluster.local:9101 consumerAddr: tenant-egress-<cell-id>.envoy-gateway-system.svc.cluster.local:9102 cellId: <cellId>2. Review the diff
Section titled “2. Review the diff”Wait for the argocd-diff-preview comment on the MR before merging. It must show only:
- the new
loadBalancerSourceRangesentries on thenats-data-publicEnvoyProxy - a new set of
tenant-egress-<cell-id>egress objects inenvoy-gateway-system - the new roster entry in the
org-moverConfigMap
3. Merge and sync
Section titled “3. Merge and sync”Both Applications use RollingSync and normally sync on their own a few minutes after the merge. Sync in this order, so the roster never points at an egress Service that does not exist yet:
org-mover-envoyonorg-mover-gstgorg-moveronorg-mover-gstg
If an Application stays OutOfSync, Refresh and Sync it in the ArgoCD UI, or:
argocd app list | grep -E 'org-mover(-envoy)?'argocd app sync <app-name>Verification
Section titled “Verification”-
Egress Service exists:
Terminal window kubectl -n envoy-gateway-system get svc tenant-egress-<cell-id> -
Ingress allowlist applied. The Service of the
nats-data-publicGateway lists the new IPs:Terminal window kubectl -n envoy-gateway-system get svc \-l gateway.envoyproxy.io/owning-gateway-name=nats-data-public \-o jsonpath='{.items[0].spec.loadBalancerSourceRanges}'GCP updates the LoadBalancer firewall rule a minute or two after the Service changes.
-
Cell reaches NATS. From a pod or host in the tenant cell:
Terminal window nc -vz 34.23.135.213 4222A timeout means the firewall drops the cell’s traffic: check the NAT IPs again.
-
Egress listener is up. From
org-mover-gstg:Terminal window kubectl -n org-mover run egress-check --rm -i --restart=Never --image=busybox -- sh -c 'for port in 9101 9102; doif timeout 5 nc tenant-egress-<cell-id>.envoy-gateway-system.svc.cluster.local "$port" </dev/null; thenecho "$port open"elseecho "$port FAILED"fidone'This only proves the egress Service and its Envoy listeners accept connections. Envoy accepts the connection before it dials the cell’s NLB, so it passes even when the TLS handshake to the cell fails.
-
Egress reaches the cell. Read the upstream stats of the cell’s egress Envoy, after the check above or after the pilot has dialed the cell:
Terminal window pod=$(kubectl -n envoy-gateway-system get pod \-l gateway.envoyproxy.io/owning-gateway-name=tenant-egress-<cell-id> -o name | head -1)kubectl -n envoy-gateway-system port-forward "$pod" 19001:19001 >/dev/null &pf_pid=$!sleep 2curl -sSf localhost:19001/stats/prometheus \| grep -E 'envoy_cluster_(upstream_cx_connect_fail|upstream_cx_total|ssl_connection_error|ssl_fail_verify)' \| grep tcproutekill "$pf_pid"If
curlreports a connection error, the tunnel was not ready yet: run the commands again. Empty output with no error means the filter matched nothing, not that there are no failures.upstream_cx_totalmust grow whileupstream_cx_connect_fail,ssl_connection_errorand thessl_fail_verify_*counters stay at zero. A growingssl_*counter means the cell’s certificate does not match its hostname or is not publicly trusted: rerun theopenssl s_clientcheck from the prerequisites. -
Org Mover sees the cell. The cell shows up as healthy in the Org Mover GUI at https://orgmover.gstg.gitlab.net. This is the end-to-end check for both directions.
Troubleshooting
Section titled “Troubleshooting”-
The cell’s NATS client is stuck in
failed/reconnecting. The cell’s NAT IPs are not in the ingress allowlist. This happens when the cell is rebuilt: its NAT gateways, and so its public IPs, are recreated. Run thedescribe-nat-gatewayscommand again and replace that cell’s entries inloadBalancerSourceRanges. -
The Service of
nats-data-publicstill has the old ranges after the merge. Check the EnvoyProxy first:Terminal window kubectl -n envoy-gateway-system get envoyproxy nats-data-public \-o jsonpath='{.spec.provider.kubernetes.envoyService.loadBalancerSourceRanges}'If it still has the old ranges, ArgoCD has not synced
org-mover-envoy: sync it. If it has the new ranges, check the Envoy Gateway controller withkubectl -n envoy-gateway-system logs deploy/envoy-gateway --since=30m. -
No Service for a Gateway. Run
kubectl -n envoy-gateway-system get svc -o wideandkubectl -n envoy-gateway-system get gateway. If the Gateway or EnvoyProxy is missing, ArgoCD pruned it or never applied it: checkargocd app get <app-name>. If both exist, check the Envoy Gateway controller logs. -
The pilot cannot reach the cell’s producer or consumer. Check the egress Gateway status with
kubectl -n envoy-gateway-system get gateway tenant-egress-<cell-id> -o yaml | yq '.status', and rerun theopenssl s_clientcheck from the prerequisites. A certificate that does not match the hostname fails the TLS handshake on the egress side.
Offboarding a cell
Section titled “Offboarding a cell”Reverse the procedure: remove the cell from the org-mover roster first and sync org-mover, then remove its
egress.cells entry and its NAT IPs from org-mover-envoy and sync it with prune, so its egress objects are
deleted. Make sure no move involves the cell before you start.
Escalation
Section titled “Escalation”- Org Mover:
#g_transportSlack channel. - ArgoCD and the
argocd/appsrepository:#g_fleet_managementSlack channel.