Files
portfolio/professional-infra/migration-validation-framework
Mateusz Suski 35e6b139fc
ci / validate (push) Failing after 1m8s
Initial CV-aligned infrastructure portfolio
Rework portfolio around Linux operations, Zabbix monitoring, migration validation, and ELK/Grafana log observability.

Add AAP-style LVM resize workflow, Zabbix server/proxy/agent automation assets, Linux/AIX monitoring templates, and updated validation CI.
2026-05-04 17:37:24 +00:00
..

Migration Validation Framework

Problem

Infrastructure migrations often fail in small, expensive ways: a mount option changes, a service is disabled, or disk usage moves past an operational threshold. Teams need structured evidence that the migrated host still matches the expected operating profile.

CV Relevance

This project maps to storage/platform migration validation work: collecting pre-migration and post-migration state, comparing results, and producing evidence that can be attached to change or migration tickets.

What This Project Demonstrates

  • A Python CLI for collecting and comparing system snapshots.
  • Modular collectors for mounts, services, and disk usage.
  • Risk assessment and validation checks for before/after drift.
  • JSON and HTML evidence suitable for migration review.
  • Offline tests and examples that run without remote hosts.

Architecture

Operator -> CLI -> Collectors -> JSON Snapshot -> Comparator -> Diff/Report

Core components:

  • cli.py provides collect, compare, snapshot, list, and report commands.
  • collectors/ gathers mounts, services, and disk usage.
  • validators/compare.py identifies drift and validation failures.
  • reports/ contains report generation helpers with escaped HTML output.
  • examples/ contains realistic before/after evidence.

Quickstart

cd professional-infra/migration-validation-framework
make test
make demo

The demo compares the included example snapshots:

python3 cli.py compare examples/before.json examples/after.json --output /tmp/migration-diff.json

The example intentionally returns FAIL because it demonstrates a high-risk migration finding.

Legacy snapshot IDs are still supported:

python3 cli.py snapshot --env prod --label pre --systems web01,db01
python3 cli.py compare prod-pre-20260429_020000 prod-post-20260429_030000 --output change-0429

Validation

make test

This compiles the Python modules and runs unit tests for example comparison, parser behavior, and HTML escaping.

Example Output

Comparison completed: diff.json (FAIL)
Overall risk: high
Total changes: 4
Failed checks: critical_services_running
Recommendation: restore sshd before production cutover

Sample inputs and output are available in examples/before.json, examples/after.json, and examples/diff.json.

Roadmap

  • Add database-specific migration checks.
  • Add performance baseline comparisons.
  • Add a REST API wrapper for CI/CD integration.
  • Add compliance-oriented validation profiles.

Interview Talking Points

  • Why pre/post migration evidence reduces risk during storage and platform migrations.
  • How to separate collection from comparison so evidence can be replayed.
  • How drift detection supports change approval and rollback decisions.