Use Case
Section titled “Use Case”- Migration strategy: Rehost (lift and shift)
- Application type: Spring Boot service (JAR), no Kubernetes target
- Target platform: VM-based runtime on STACKIT
- Data backend: PostgreSQL
Scope and Assumptions
Section titled “Scope and Assumptions”- In scope: Terraform provisioning, Ansible configuration, source dump evidence, temporary-database rehearsal, controlled restore, runtime validation, rollback, Observability, and Server Backup schedule.
- Out of scope: Code refactoring, database engine change, load balancing, DNS switch, TLS termination, multi-VM availability, Kubernetes, Cloud Foundry, and PostgreSQL Flex.
- Assumptions: The source uses a PostgreSQL version compatible with the target restore tools, and approved source CIDRs are known for SSH and application access.
Roles and Ownership
Section titled “Roles and Ownership”- Migration lead: Coordinates timeline, checkpoints, and go/no-go decision.
- Application owner: Validates app behavior and business-critical user journeys.
- Platform engineer: Prepares the VM, restricted network rules, monitoring, and backup schedule.
- DB owner: Executes DB backup, restore, consistency checks, and rollback trigger.
- Operations owner: Accepts handover and owns Day-1/Day-2 incident response.
Pre-Migration Checks
Section titled “Pre-Migration Checks”- Access readiness: SSH, deployment credentials, DB access, secrets access validated.
- Baseline captured: Current versions, environment variables, ports, certificates, scheduled jobs documented.
- Capacity validated: CPU, RAM, disk IOPS, and storage capacity on target VM confirmed.
- Security controls ready: Firewall rules, IAM mapping, TLS cert chain, and logging in place.
- Source evidence ready: Dump checksum, expected record count, and deterministic data fingerprint recorded.
- Rollback readiness: Pre-restore dump path, expected original record count, authority, and deadline agreed.
Run Plan (Cutover Window)
Section titled “Run Plan (Cutover Window)”Phase 1: Prepare target runtime
Section titled “Phase 1: Prepare target runtime”- Create target app user and required filesystem layout.
- Install Java runtime and supporting OS packages.
- Deploy app artifact to target path.
- Configure service unit (systemd) and environment file.
- Install self-managed PostgreSQL, create the application role and database, and restrict access to localhost.
- Enable node exporter, Observability scraping, and the Server Backup schedule.
Phase 2: Data and config alignment
Section titled “Phase 2: Data and config alignment”- Create a custom-format PostgreSQL dump without source ownership or privileges.
- Record and validate its checksum, expected row count, and deterministic fingerprint.
- Run
./scripts/run_migration_rehearsal.shagainst a temporary target database. - Confirm that rehearsal removed its temporary database and left the production target database unchanged.
- Verify the original target rollback dump in a separate temporary database.
Phase 3: Cutover and release
Section titled “Phase 3: Cutover and release”- Freeze source writes and create the final approved dump.
- Run
./scripts/run_cutover.sh --confirmwith the approved source evidence. - Require the saved Terraform plan to change only the Ansible orchestration resource.
- Validate row count, fingerprint, ownership, application-role write behavior, services, and endpoint.
- Require a final Terraform no-op plan, record acceptance, and start stabilization watch.
Validation Checklist
Section titled “Validation Checklist”- Technical health: Spring Boot, PostgreSQL, and node exporter active; local and approved public HTTP checks pass.
- Functional checks: The application returns the migrated Spring Music records.
- Data checks: Expected row count and fingerprint match; table ownership belongs to the application role.
- Security checks: Runtime environment and rollback dump have root-only or database-owner-only permissions.
- Operations checks: Observability scrape, Server Backup schedule, evidence files, and escalation ownership verified.
Rollback Criteria and Steps
Section titled “Rollback Criteria and Steps”Rollback triggers
Section titled “Rollback triggers”- Critical functional failure: Core business flow unavailable after fix window.
- Data integrity risk: Mismatch in critical records with no fast remediation.
- Operational instability: Repeated restarts or unresolved severe alerts.
Rollback steps
Section titled “Rollback steps”- Invoke the approved rollback decision before the deadline and preserve logs and evidence.
- Run
./scripts/rollback_postgresql.sh --confirmto stop Spring Boot and preserve the current target database. - Restore the protected pre-cutover dump and validate the expected original row count.
- Restart Spring Boot and validate local and approved public reachability.
- Resume the agreed source or target operating state and publish the rollback evidence and decision.
Handover to Operations
Section titled “Handover to Operations”- Artifacts delivered: Final config set, deployment manifest, validation evidence, rollback log.
- Ownership transfer: Named on-call owner and escalation route confirmed.
- Stabilization period: 24-72 hours with enhanced monitoring and daily status check.
- Exit criteria: No critical alerts, stable key metrics, and business owner sign-off.
Evidence Log Template
Section titled “Evidence Log Template”| Checkpoint | Owner | Timestamp | Result | Evidence Link |
|---|---|---|---|---|
| Target VM runtime prepared | Platform engineer | YYYY-MM-DD HH:MM | Pass/Fail | link |
| Rehearsal completed | DB owner | YYYY-MM-DD HH:MM | Pass/Fail | link |
| DB restore and integrity check | DB owner | YYYY-MM-DD HH:MM | Pass/Fail | link |
| Terraform no-op confirmed | Platform engineer | YYYY-MM-DD HH:MM | Pass/Fail | link |
| Post-cutover business checks | Application owner | YYYY-MM-DD HH:MM | Pass/Fail | link |
| Handover accepted | Operations owner | YYYY-MM-DD HH:MM | Pass/Fail | link |
Asset historyActive 4 of the last 12 weeksLWUpdatedNo updates · 1 bar = 1 week i
Maintainers
- LWLukas WeberrußHead of STACKIT Cloud Migration Framework · STACKITOwner
Lukas WeberrußHead of STACKIT Cloud Migration Framework · STACKITOwnerActive 10 of the last 12 weeks · 47 updateswww.linkedin.com/in/lukas-weberruß-a360b081
LW
Lukas WeberrußHead of STACKIT Cloud Migration Framework · STACKITOwnerActive 10 of the last 12 weeks · 47 updatesSTACKITwww.linkedin.com/in/lukas-weberruß-a360b081TM
Tobias M.Head of STACKIT Cloud Framework · STACKITOwnerActive 12 of the last 12 weeks · 168 updatesSTACKITwww.linkedin.com/in/tobias-müller-011304172Contributed in STACKIT