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:
TakuyaYagam1 committed 2026-11-29 12:25:29 +03:00
commit 13f936bee9
1222 files changed
+21280

No files matched your search

Binary file not shown.
Binary file not shown.
+25
View File
@@ -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
+15
View File
@@ -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
+29
View File
@@ -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:
Binary file not shown.
+43
View File
@@ -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"