Add operational health, encrypted backups and isolated restore drills
This commit is contained in:
@@ -24,6 +24,8 @@ jobs:
|
||||
with: { node-version: '22', cache: npm, cache-dependency-path: web/package-lock.json }
|
||||
- name: Build services
|
||||
run: dotnet build src/GuestOps.Worker/GuestOps.Worker.csproj -c Release
|
||||
- name: Verify backup validation and failure recovery
|
||||
run: python3 -m unittest discover -s tests -p test_ops.py
|
||||
- name: Build interface
|
||||
working-directory: web
|
||||
run: npm ci && npm run build
|
||||
@@ -64,6 +66,17 @@ jobs:
|
||||
docker compose restart api worker
|
||||
curl --retry 30 --retry-delay 2 --retry-all-errors --fail http://127.0.0.1:8080/health
|
||||
python3 tests/production_smoke.py --read
|
||||
install -m 600 /dev/null .env
|
||||
python3 deploy/ops.py preflight --offline
|
||||
mkdir -m 700 .guestops-test-keyring
|
||||
export GNUPGHOME="$PWD/.guestops-test-keyring"
|
||||
gpg --batch --pinentry-mode loopback --passphrase '' --quick-generate-key 'GuestOps CI <ci@example.invalid>' rsa2048 encr 1d
|
||||
BACKUP_RECIPIENT=$(gpg --batch --with-colons --list-keys | awk -F: '$1=="fpr" {print $10; exit}')
|
||||
backup_dir=$(mktemp -d)
|
||||
python3 deploy/ops.py backup --recipient "$BACKUP_RECIPIENT" --output "$backup_dir/fixture.tar.gpg" --confirm-maintenance
|
||||
python3 deploy/ops.py restore-drill "$backup_dir/fixture.tar.gpg" --api-image "$GUESTOPS_API_IMAGE"
|
||||
curl --retry 30 --retry-delay 2 --retry-all-errors --fail http://127.0.0.1:8080/health/ready
|
||||
python3 tests/production_smoke.py --read
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: github.event_name != 'pull_request'
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user