|
| 1 | +# RHOSO Backup & Restore - Demo Script |
| 2 | + |
| 3 | +## Prerequisites |
| 4 | +- OpenStack control plane deployed and healthy |
| 5 | +- asciinema installed (`pip install asciinema`) |
| 6 | + |
| 7 | +## Recording |
| 8 | + |
| 9 | +```bash |
| 10 | +asciinema rec demo-backup-restore.cast -t "RHOSO Backup & Restore Demo" |
| 11 | +``` |
| 12 | + |
| 13 | +## Demo Flow |
| 14 | + |
| 15 | +### 1. Show the environment (~1 min) |
| 16 | + |
| 17 | +```bash |
| 18 | +# Show the healthy control plane |
| 19 | +oc get openstackcontrolplane -n openstack |
| 20 | + |
| 21 | +# Show the OpenStackBackupConfig (auto-created by the operator) |
| 22 | +oc get openstackbackupconfig -n openstack |
| 23 | + |
| 24 | +# Show labeled resources |
| 25 | +oc get secret -n openstack -l backup.openstack.org/restore=true --no-headers | wc -l |
| 26 | +oc get configmap -n openstack -l backup.openstack.org/restore=true --no-headers | wc -l |
| 27 | + |
| 28 | +# Show labeled PVCs |
| 29 | +oc get pvc -n openstack -l backup.openstack.org/backup=true |
| 30 | +``` |
| 31 | + |
| 32 | +### 2. Install dependencies - MinIO & OADP (~2 min, FAST-FORWARD) |
| 33 | + |
| 34 | +```bash |
| 35 | +cd docs/dev/backup-restore/role |
| 36 | + |
| 37 | +# Install MinIO and OADP |
| 38 | +ansible-playbook cifmw_backup_restore_test.yaml \ |
| 39 | + -e backup=false -e cleanup=false -e restore=false |
| 40 | + |
| 41 | +# Show MinIO is running |
| 42 | +oc get pods -n minio |
| 43 | +oc get routes -n minio |
| 44 | + |
| 45 | +# Show OADP is running |
| 46 | +oc get pods -n openshift-adp |
| 47 | +oc get backupstoragelocation -n openshift-adp |
| 48 | +``` |
| 49 | + |
| 50 | +### 3. Create backup (~3 min, FAST-FORWARD PVC backup wait) |
| 51 | + |
| 52 | +```bash |
| 53 | +# Run backup |
| 54 | +ansible-playbook cifmw_backup_restore_test.yaml \ |
| 55 | + -e install_deps=false -e cleanup=false -e restore=false |
| 56 | + |
| 57 | +# Show the GaleraBackup CRs were created |
| 58 | +oc get galerabackup -n openstack |
| 59 | + |
| 60 | +# Show the OADP backups |
| 61 | +oc get backup -n openshift-adp |
| 62 | + |
| 63 | +# Note the backup timestamp for restore |
| 64 | +# e.g., 20260325-101234 |
| 65 | +``` |
| 66 | + |
| 67 | +### 4. Simulate disaster - Cleanup (~1 min, FAST-FORWARD) |
| 68 | + |
| 69 | +```bash |
| 70 | +# Delete the control plane (simulates disaster) |
| 71 | +ansible-playbook cifmw_backup_restore_test.yaml \ |
| 72 | + -e install_deps=false -e backup=false -e restore=false |
| 73 | + |
| 74 | +# Show everything is gone |
| 75 | +oc get openstackcontrolplane -n openstack |
| 76 | +oc get pods -n openstack |
| 77 | +oc get secret -n openstack | wc -l |
| 78 | +``` |
| 79 | + |
| 80 | +### 5. Restore (~5 min, FAST-FORWARD waits) |
| 81 | + |
| 82 | +```bash |
| 83 | +# Restore from backup |
| 84 | +ansible-playbook cifmw_backup_restore_test.yaml \ |
| 85 | + -e install_deps=false -e backup=false -e cleanup=false \ |
| 86 | + -e backup_timestamp=<TIMESTAMP> |
| 87 | + |
| 88 | +# --- FAST-FORWARD: PVC restore --- |
| 89 | +# --- FAST-FORWARD: Wait for infrastructure (infra-only annotation) --- |
| 90 | +# --- FAST-FORWARD: Wait for control plane ready --- |
| 91 | +# --- FAST-FORWARD: EDPM deployment --- |
| 92 | +``` |
| 93 | + |
| 94 | +### 6. Verify restored environment (~1 min) |
| 95 | + |
| 96 | +```bash |
| 97 | +# Show control plane is back |
| 98 | +oc get openstackcontrolplane -n openstack |
| 99 | + |
| 100 | +# Show pods are running |
| 101 | +oc get pods -n openstack | head -20 |
| 102 | + |
| 103 | +# Show databases are restored |
| 104 | +oc get galera -n openstack |
| 105 | + |
| 106 | +# Show secrets are back |
| 107 | +oc get secret osp-secret -n openstack |
| 108 | + |
| 109 | +# Verify an OpenStack endpoint |
| 110 | +oc exec -t openstackclient -- openstack endpoint list | head -10 |
| 111 | +``` |
| 112 | + |
| 113 | +## Post-recording |
| 114 | + |
| 115 | +```bash |
| 116 | +# Stop recording |
| 117 | +exit |
| 118 | + |
| 119 | +# Play back (can use --speed for fast-forward sections) |
| 120 | +asciinema play demo-backup-restore.cast |
| 121 | + |
| 122 | +# Upload (optional) |
| 123 | +asciinema upload demo-backup-restore.cast |
| 124 | +``` |
| 125 | + |
| 126 | +## Fast-forward tips |
| 127 | + |
| 128 | +- Use `asciinema play --speed=10` for fast-forward sections during playback |
| 129 | +- Alternatively, edit the .cast file to compress wait times: |
| 130 | + - The .cast format is JSON lines with timestamps |
| 131 | + - Reduce large time gaps between lines to speed up boring sections |
| 132 | +- Or use `agg` to convert to GIF with speed adjustments |
| 133 | + |
| 134 | +--- |
0 commit comments