chore: import MCTF services
- Added all seven issued service trees without omissions. - Preserved the supplied runtime configuration, binaries, and assets.
This commit is contained in:
commit
13f936bee9
1222 files changed
+21280
No files matched your search
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
IMAGE="towercore:final-mips64le"
|
||||
TAR="$ROOT/images/towercore-mips64le.tar"
|
||||
|
||||
docker load -i "$TAR" >/dev/null
|
||||
|
||||
mips_can_exec() {
|
||||
local out
|
||||
out="$(docker run --rm --platform linux/mips64le \
|
||||
--entrypoint /towerctl "$IMAGE" 2>&1 || true)"
|
||||
! grep -qi 'exec format error' <<<"$out"
|
||||
}
|
||||
|
||||
if ! mips_can_exec; then
|
||||
echo "registering linux/mips64le binfmt..."
|
||||
docker run --privileged --rm tonistiigi/binfmt --install mips64le || true
|
||||
mips_can_exec || { echo "MIPS emulation unavailable" >&2; exit 1; }
|
||||
fi
|
||||
|
||||
cd "$ROOT"
|
||||
docker compose up -d
|
||||
docker compose ps
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
TOWERCORE_PORT=7250
|
||||
TOWERCORE_STATE_DIR=/var/lib/towercore
|
||||
TOWERCORE_PREAUTH_TIMEOUT=10
|
||||
TOWERCORE_SESSION_IDLE=60
|
||||
TOWERCORE_MAX_CMDS_PER_CONN=20000
|
||||
TOWERCORE_MAX_CONN_PER_IP=64
|
||||
TOWERCORE_TTL_UNUSED=60
|
||||
TOWERCORE_TTL_SECONDS=300
|
||||
TOWERCORE_MAX_UES=8192
|
||||
TOWERCORE_EVICT_ON_CELL_FULL=1
|
||||
TOWERCORE_HANDOVER_TTL=30
|
||||
TOWERCORE_SIM_UES=16
|
||||
TOWERCORE_SIM_ENABLED=1
|
||||
TOWERCORE_MAX_CONN=256
|
||||
TOWERCORE_LOG_LEVEL=info
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
services:
|
||||
towercore:
|
||||
image: towercore:final-mips64le
|
||||
platform: linux/mips64le
|
||||
restart: unless-stopped
|
||||
privileged: false
|
||||
read_only: true
|
||||
cap_drop: ["ALL"]
|
||||
security_opt: ["no-new-privileges:true"]
|
||||
env_file:
|
||||
- path: ./config.env
|
||||
required: false
|
||||
ports:
|
||||
- "7250:7250"
|
||||
volumes:
|
||||
- towercore_mips_state:/var/lib/towercore
|
||||
healthcheck:
|
||||
test: ["CMD", "/towerctl", "hello", "127.0.0.1:7250"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10k"
|
||||
max-file: "3"
|
||||
|
||||
volumes:
|
||||
towercore_mips_state:
|
||||
Executable
BIN
Binary file not shown.
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PORT="${PORT:-7250}"
|
||||
IMAGE="towercore:final-mips64le"
|
||||
TAR="$ROOT/images/towercore-mips64le.tar"
|
||||
if [ ! -f "$TAR" ] && [ -f "$ROOT/towercore-mips64le.tar" ]; then
|
||||
TAR="$ROOT/towercore-mips64le.tar"
|
||||
fi
|
||||
|
||||
echo "loading MIPS image..."
|
||||
docker load -i "$TAR" >/dev/null
|
||||
|
||||
mips_can_exec() {
|
||||
local out
|
||||
out="$(docker run --rm --platform linux/mips64le \
|
||||
--entrypoint /towerctl "$IMAGE" 2>&1 || true)"
|
||||
! grep -qi 'exec format error' <<<"$out"
|
||||
}
|
||||
|
||||
if ! mips_can_exec; then
|
||||
echo "registering linux/mips64le binfmt..."
|
||||
docker run --privileged --rm tonistiigi/binfmt --install mips64le || true
|
||||
if ! mips_can_exec; then
|
||||
echo "MIPS emulation is not available on this host." >&2
|
||||
echo "Linux: enable binfmt_misc; Docker Desktop/macOS may forbid it." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p "$ROOT/state-mips"
|
||||
docker rm -f towercore-mips >/dev/null 2>&1 || true
|
||||
|
||||
ARGS=(--rm --name towercore-mips --platform linux/mips64le
|
||||
--user "$(id -u):$(id -g)"
|
||||
-p "$PORT:7250" -v "$ROOT/state-mips:/var/lib/towercore")
|
||||
if [ -f "$ROOT/config.env" ]; then
|
||||
ARGS+=(--env-file "$ROOT/config.env")
|
||||
fi
|
||||
|
||||
echo "TowerCore MIPS: 127.0.0.1:$PORT (state: $ROOT/state-mips)"
|
||||
exec docker run "${ARGS[@]}" "$IMAGE"
|
||||
Reference in new issue
Block a user