Skip to main content

Cloud Migration & Modernization

Basic Advanced

Service: Cloud Migration & Modernization · Typical shape: time & materials, agile squad (architect, 2-4 senior engineers, PM), 3-18 months in waves, starting with a small pilot workload

We move workloads to AWS, STACKIT, OCI, or OpenStack and modernise them in the same programme: lift-and-shift first to capture the exit date, then refactor where it pays back. Every target environment is built with infrastructure as code, CI/CD, and observability from day one (see How We Build). Input is usually a Migration Assessment; without one, Phase 1 below runs a compressed version.

What we deliver​

  • A landing zone (accounts/projects, identity, network, guardrails, logging) as code.
  • Migrated workloads, wave by wave, each with a tested runbook, validated data, and a signed-off cutover.
  • Modernised components: managed databases, containers on Kubernetes, services extracted from monoliths.
  • Operations baseline: dashboards, alerts, backups with restore tests, cost allocation and budgets.
  • Decommission evidence for the source environment.

Reference architecture​

The five phases​

PhaseEngineering outputExit gate
1. AssessInventory, dependency map, 7 Rs, TCO, wave planCustomer signs wave plan + Wave 0 scope
2. PlanLanding zone code, network design, target architecture per wave, runbook templatesLanding zone passes security baseline scan; connectivity tested
3. MigrateReplication, test cutovers, production cutover per waveValidation suite green, owner sign-off, rollback window closed
4. OperateSLOs, alerts, backups, cost dashboards, rightsizing after 2-4 weeks of dataHypercare closed; runbooks handed to ops
5. InnovateManaged services, containers, serverless, managed AIPer-initiative business case met

Phases 3-5 loop per wave: wave n is in hypercare while wave n+1 replicates.

Implementation steps​

1. Landing zone​

AWS. Deploy AWS Control Tower as the foundation and add the Landing Zone Accelerator (LZA) when the customer is regulated or needs network/security config beyond Control Tower defaults; AWS recommends exactly this combination. LZA is CDK-based and driven by YAML config files (accounts-config.yaml, network-config.yaml, security-config.yaml, ...), kept in the customer's Git with a pipeline. Latest LZA release is v1.16.3 (as of 2026-10).

Minimum OU/account layout:

Root
├── Security (log-archive, audit)
├── Infrastructure (network hub, shared-services)
├── Workloads
│ ├── Prod (one account per app or domain)
│ └── NonProd
├── Sandbox
└── Migration (MGN staging, discovery)

STACKIT. Organization → folder per environment → project per application, as STACKIT recommends for multi-environment apps; network areas (SNA) for routed connectivity between projects. Full Terraform in Sovereign Cloud on STACKIT.

OCI / OpenStack. Compartments (OCI) or projects/domains (OpenStack) mirror the same split: security, shared network, workloads per env. See Hybrid Cloud & OpenStack.

2. Network design​

DecisionDefaultNotes
TopologyHub-and-spokeAWS Transit Gateway; STACKIT network area; OCI DRG
Address planOne non-overlapping /16 per env per region, carved from a customer-approved supernetCheck against every on-prem range before allocating
Hybrid linkSite-to-site IPsec VPN for Wave 0, dedicated link for bulk replicationSize from the wave bandwidth calculation
DNSConditional forwarding both ways during migrationLower TTLs to 60 s at least 48 h before each cutover
EgressCentral egress with NAT + firewallExplicit allow-lists for replication endpoints
IngressLoad balancer + WAF per workloadTLS certificates managed, not copied from source

3. IaC with OpenTofu or Terraform​

Both are fine; choose OpenTofu where licence neutrality matters (it is MPL-licensed and a CNCF Sandbox project) and Terraform where the customer already runs HCP Terraform. Pin versions (as of 2026-10: OpenTofu 1.13.1, Terraform 1.16.6).

versions.tf
terraform {
required_version = ">= 1.13.0"
required_providers {
aws = { source = "hashicorp/aws", version = "~> 6.0" }
stackit = { source = "stackitcloud/stackit", version = "~> 0.120" }
}
backend "s3" {
bucket = "acme-tfstate-prod"
key = "landing-zone/network.tfstate"
region = "eu-central-1"
use_lockfile = true
encrypt = true
}
}

Repository layout: modules/ (versioned, reusable), live/<env>/<stack>/ (thin root modules), one state per stack. Every PR runs tofu fmt -check, tofu validate, Checkov/Trivy, and tofu plan with the plan posted to the PR; apply only from the main branch pipeline with OIDC-federated credentials (no static keys).

4. Rehost: VM replication​

AWS Application Migration Service (MGN) installs a replication agent on each source server, continuously replicates block storage to a staging subnet (TCP 1500), and converts servers to boot natively on EC2. Lifecycle: Not ready → Ready for testing → test instance → Ready for cutover → cutover instance → Finalize cutover (walkthrough, best practices).

On Linux source servers, generate the install command for the replication agent in the MGN console and run it as root; the Linux agent instructions cover prerequisites and flags.

Always launch a test instance per server, run the validation suite against it, then terminate it before cutover. For VMware estates, AWS Transform for VMware adds discovery, wave planning, and network translation on top of MGN.

STACKIT, OpenStack, OCI. No MGN equivalent; we use:

  • virt-v2v to convert VMware/Hyper-V images (installs virtio drivers), upload as image, boot from volume.
  • For many VMs or low downtime: rebuild from IaC + configuration management (Ansible), then move data only. This is often faster than image conversion and leaves the customer with reproducible servers.

5. Database migration​

Source → TargetToolDowntime
PostgreSQL → PostgreSQL (any cloud, incl. STACKIT PostgreSQL Flex)Native logical replicationSeconds-minutes
PostgreSQL → RDS/Aurora PostgreSQLDMS homogeneous migration (pg_dump/pg_restore + logical replication)Minutes
Oracle/SQL Server → PostgreSQLDMS (schema conversion + full load + CDC)Minutes, plus app changes
MySQL → MySQLNative replication / DMSMinutes
Anything, small and tolerant of downtimeDump/restore in the cutover windowHours

PostgreSQL logical replication (target must already have the schema; sequences are not replicated):

source
-- postgresql.conf: wal_level = logical; then restart
CREATE ROLE migrator WITH REPLICATION LOGIN PASSWORD '...';
GRANT SELECT ON ALL TABLES IN SCHEMA public TO migrator;
CREATE PUBLICATION mig_pub FOR ALL TABLES;
-- every table needs a primary key or REPLICA IDENTITY for UPDATE/DELETE
target: copy schema, then subscribe
pg_dump --schema-only --no-owner -h src.example.internal -U app appdb | psql -h target -U app appdb
psql -h target -U app appdb -c \
"CREATE SUBSCRIPTION mig_sub CONNECTION 'host=src.example.internal dbname=appdb user=migrator password=...' PUBLICATION mig_pub;"

At cutover: stop writes on source, wait until pg_stat_subscription shows no lag, sync sequences (SELECT setval(...) generated from source pg_sequences), drop the subscription, switch the app.

AWS DMS for heterogeneous moves: enable data validation on full-load+CDC tasks, or run a separate CDC validation-only task to avoid slowing the migration task.

6. Data migration validation​

Validate at three levels before every cutover, and store results with the runbook:

  1. Counts and checksums per table, computed identically on both sides:
table-fingerprint.sql (PostgreSQL)
SELECT count(*) AS n,
md5(string_agg(md5(t::text), '' ORDER BY id)) AS fingerprint
FROM orders t
WHERE id BETWEEN :lo AND :hi; -- chunk large tables by key range
  1. Tool-level validation: DMS validation status, pg_stat_subscription lag, MGN replication status Healthy.
  2. Business checks: owner-defined smoke tests (log in, create order, run report) and a reconciliation of a business total (e.g. yesterday's invoiced amount) between source and target.

7. Cutover runbook and rollback​

Every cutover has a runbook in Git with timed steps, an owner per step, and explicit go/no-go criteria.

runbooks/wave-1-billing.md (skeleton)
| T | Step | Owner | Verify |
|--------|----------------------------------------------|---------|--------------------------------|
| T-7d | Test cutover done, validation green | Lieber | report link |
| T-48h | DNS TTL lowered to 60 s | Network | dig +nocmd shows TTL 60 |
| T-0 | Freeze: maintenance page, stop batch jobs | App | no writes in source audit log |
| T+10m | Final sync; replication lag = 0 | Lieber | pg_stat_subscription / MGN |
| T+20m | Launch cutover / promote target DB | Lieber | instance healthy |
| T+30m | Switch DNS / LB target | Network | synthetic check green |
| T+45m | Business smoke tests | App | checklist signed |
| T+60m | GO/NO-GO decision | Owner | recorded in ticket |

Rollback: source stays intact and read-only until the rollback window closes (typically 24-72 h). For databases, set up reverse replication (target → source) right after cutover so a rollback keeps writes made on the target. Rollback triggers are defined up front (e.g. error rate above 2% for 15 min, failed reconciliation). Rehearse the rollback once in a test cutover.

8. Strangler fig: monolith to services​

Put a routing layer (API gateway, ingress, or reverse proxy) in front of the monolith first, then extract capabilities one route at a time (strangler fig). The proxy is critical-path: run it highly available and keep its config in Git.

httproute-strangler.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: shop
namespace: shop
spec:
parentRefs: [{ name: public, namespace: gateway }]
hostnames: ["shop.example.com"]
rules:
- matches: [{ path: { type: PathPrefix, value: /api/invoices } }] # extracted service
backendRefs: [{ name: invoices, port: 8080 }]
- matches: [{ path: { type: PathPrefix, value: / } }] # everything else still hits the monolith
backendRefs: [{ name: monolith, port: 80 }]

The example uses Gateway API because ingress-nginx is retired (see Cloud-native Development).

Extraction order: pick seams with clear data ownership and high change rate. For each extracted capability: (1) build the service behind a feature flag, (2) shadow or canary traffic, (3) move data ownership (the service owns its tables; the monolith reads through an API or an event stream, never the other way round), (4) delete the dead code in the monolith.

9. Containerisation​

  • Multi-stage Dockerfiles, non-root user, distroless or minimal base, image scanned with Trivy in CI, signed (cosign) and pushed to a private registry in the target region.
  • Externalise config (env vars, secrets from the cloud secrets manager via External Secrets Operator), log to stdout, expose /healthz and /readyz.
  • Deploy with Helm or Kustomize via GitOps (Argo CD or Flux). See Cloud-native Development.

10. VMware exit options​

Broadcom moved VMware to subscription-only bundles (VCF and VVF) in 2024 and per-core licensing with minimums; 2026 coverage shows continuing price pressure and most exits ending partial, with workloads split across two platforms (tracker, Oct 2026, DACH analysis). Options we deliver:

OptionFits whenOur path
Rehost to public cloud VMsApp is portable, cloud target already chosenMGN (AWS), virt-v2v / rebuild (STACKIT, OCI)
Relocate to VMware-in-cloudMust keep VMware tooling short-termAmazon EVS (VCF in a VPC; VCF 9.x supported since July 2026)
Private cloud on open sourceLarge steady estate, data must stay on-premOpenStack on Ubuntu, see Hybrid Cloud & OpenStack
Replatform to KubernetesApp is being modernised anywayContainers on SKE/EKS; KubeVirt for VMs that stay VMs
Sovereign cloudResidency and EU jurisdiction are hard requirementsSTACKIT

11. Operate and optimise after migration​

  • Weeks 1-2 (hypercare): daily review of alerts, error rates, latency vs. pre-migration baseline.
  • Weeks 2-4: rightsize from real utilisation; delete MGN staging resources, test instances, old snapshots.
  • Month 2+: commitments for the stable baseline; schedule non-prod shutdown (e.g. SKE hibernations); FOCUS-based cost dashboard per owner.
  • Backups: policy as code, and one restore test per workload before hypercare closes.

12. Innovate​

Once workloads run stably: managed databases and queues instead of self-run VMs, serverless for event-driven glue, and managed or private AI services (see Cloud AI Platforms and Private & Sovereign AI). Each initiative gets its own small business case and success metric.

Best practices​

  • Start with a small pilot workload (Wave 0) that exercises the full toolchain end to end.
  • Rehost/replatform first, refactor after the move; AWS gives the same advice for large migrations.
  • Treat runbooks as code: reviewed in PRs, rehearsed in test cutovers, updated after each wave's retro.
  • Keep the source writable path closed but intact until the rollback window ends.
  • Measure before and after: p95 latency, error rate, and cost per transaction, so improvements are visible.

Pitfalls to design around​

  • Hard-coded IPs and hostnames: grep configs and code during planning; use DNS names and keep TTLs low around cutover.
  • Licensing: confirm BYOL rights (Windows, SQL Server, Oracle) for the target before rehosting.
  • Sequences, LOBs, and triggers in database migration: include them explicitly in validation.
  • Time sync, MTU, and clock skew on VPN links: verify with path MTU tests before bulk replication.
  • Dual running cost: budget 2-3 months of parallel cost per wave and decommission on a fixed date.

Definition of done​

  • Landing zone deployed from code; security baseline scan clean of Critical/High
  • Network: address plan approved, hybrid link tested, DNS forwarding both ways
  • All infra for migrated workloads in OpenTofu/Terraform with CI plan/apply and scanning
  • Per wave: test cutover done, validation (counts, checksums, business checks) green and archived
  • Runbook with rollback triggers executed; GO decision recorded by the owner
  • Reverse replication or equivalent rollback path in place until the window closes
  • Monitoring, alerts, and SLOs live; backups configured and one restore test passed per workload
  • Post-migration rightsizing done; staging and test resources removed; cost allocation in place
  • Source servers decommissioned with evidence; CMDB updated
  • Modernisation backlog (strangler-fig candidates, managed services) agreed with the customer

Sources​