forked from mtusi2026/mtusi2026lab7
Implement lab7 security and compromised worker recovery evidence
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-Location (Split-Path $PSScriptRoot -Parent)
|
||||
$Python = Join-Path (Get-Location) '.venv\Scripts\python.exe'
|
||||
|
||||
function Invoke-Step {
|
||||
param([string]$Program, [string[]]$Arguments)
|
||||
& $Program @Arguments
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Step failed: $Program $($Arguments[0])"
|
||||
}
|
||||
}
|
||||
|
||||
Invoke-Step $Python @('scripts/bootstrap.py')
|
||||
Invoke-Step $Python @('scripts/provision.py', 'prepare')
|
||||
Invoke-Step 'docker' @('compose', 'build')
|
||||
Invoke-Step 'docker' @('compose', 'run', '--rm', '--no-deps', '-T', 'bao-permissions')
|
||||
Invoke-Step 'docker' @('compose', 'run', '--rm', '--no-deps', '-T', 's3-permissions')
|
||||
Invoke-Step 'docker' @('compose', 'up', '-d', '--wait', '--wait-timeout', '120', 'gateway', 'db', 'minio', 'openbao')
|
||||
Invoke-Step $Python @('scripts/provision.py', 'bao')
|
||||
Invoke-Step $Python @('scripts/provision.py', 'db')
|
||||
Invoke-Step $Python @('scripts/provision.py', 's3')
|
||||
Invoke-Step 'docker' @('compose', 'up', '-d', '--wait', '--wait-timeout', '180')
|
||||
Reference in New Issue
Block a user