Add the locked pricing service, trusted-agent pipeline, Ansible deployments, security gates, recovery runbooks, prerequisite evidence, and preparation manual. Prepared with Codex assistance. Vincent explicitly authorized this local commit and will handle the push. Assessed releases and recovery exercises remain pending.
25 lines
1.4 KiB
PowerShell
25 lines
1.4 KiB
PowerShell
param(
|
|
[string]$Droplet = '147.182.178.136',
|
|
[string]$IdentityFile = (Join-Path $env:USERPROFILE '.ssh/digitalocean')
|
|
)
|
|
$ErrorActionPreference = 'Stop'
|
|
$PSNativeCommandUseErrorActionPreference = $true
|
|
$repoPath = (Resolve-Path (Join-Path $PSScriptRoot '../..')).Path
|
|
$sshArguments = @('-i', $IdentityFile, '-o', 'IdentitiesOnly=yes', '-o', 'BatchMode=yes',
|
|
'-o', 'StrictHostKeyChecking=yes', '-o', 'ConnectTimeout=10', "root@$Droplet")
|
|
& ssh @sshArguments 'docker exec -u jenkins gitea-jenkins-1 test -f /var/jenkins_home/delivery-bootstrap/configured.json'
|
|
& docker volume create ssw590-delivery-identity | Out-Null
|
|
# The generated identity flows directly from pinned administrator SSH into a
|
|
# protected Docker volume. No secret enters command arguments, output or Git.
|
|
& ssh @sshArguments 'docker exec -u jenkins gitea-jenkins-1 cat /var/jenkins_home/delivery-bootstrap/agent-secret' |
|
|
& docker run --rm -i --network none --user 0:0 --entrypoint sh `
|
|
--mount 'type=volume,source=ssw590-delivery-identity,target=/identity' `
|
|
ssw590-delivery-agent:20261114 -c 'set -eu; umask 077; cat > /identity/agent-secret; test -s /identity/agent-secret; chown 1000:1000 /identity /identity/agent-secret; chmod 700 /identity; chmod 400 /identity/agent-secret'
|
|
Push-Location $repoPath
|
|
try {
|
|
& docker compose -f delivery/agent/compose.yaml up -d
|
|
& docker compose -f delivery/agent/compose.yaml ps
|
|
} finally {
|
|
Pop-Location
|
|
}
|