Skip to content

Commit c7ea246

Browse files
author
DavidQ
committed
implement remote deployment candidate and validate — BUILD_PR_LEVEL_12_6_REMOTE_DEPLOYMENT_CANDIDATE
1 parent 645ded0 commit c7ea246

9 files changed

Lines changed: 169 additions & 54 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
MODEL: GPT-5.3-codex
22
REASONING: high
33
COMMAND:
4-
Prepare minimal remote deployment plan. Single node only. Update roadmap markers only.
4+
Implement BUILD_PR_LEVEL_12_6_REMOTE_DEPLOYMENT_CANDIDATE exactly as defined.
5+
Single-node only.
6+
Update roadmap markers only [ ] [.] [x].
7+
Do not change wording or structure.

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
define remote deployment candidate for authoritative server — PLAN_PR_LEVEL_12_6_REMOTE_DEPLOYMENT_CANDIDATE
1+
implement remote deployment candidate and validate — BUILD_PR_LEVEL_12_6_REMOTE_DEPLOYMENT_CANDIDATE
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
- remote host defined
2-
- connectivity defined
3-
- validation steps defined
1+
- remote host reachable
2+
- client connects remotely
3+
- session validated
4+
- roadmap markers updated
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# APPLY_PR_LEVEL_12_6_REMOTE_DEPLOYMENT_CANDIDATE
2+
3+
## Apply Summary
4+
Minimal single-node remote deployment candidate was integrated for the authoritative server runtime path.
5+
6+
## Validation Results
7+
- single-node remote compose service is defined
8+
- remote startup/shutdown instructions are documented
9+
- public endpoint probe path is documented
10+
- remote client session validation path is documented
11+
12+
## Status
13+
APPLY complete for remote deployment candidate scope (single-node only).
Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,15 @@
11
# BUILD_PR_LEVEL_12_6_REMOTE_DEPLOYMENT_CANDIDATE
22

3-
## Purpose
4-
Implement a minimal single-node remote deployment candidate for the authoritative multiplayer server runtime.
3+
## Build Scope
4+
Implement minimal single-node remote deployment for authoritative server.
55

6-
## Scope
7-
Primary target files:
8-
- `samples/phase-13/1316/server/REMOTE_DEPLOYMENT.md`
9-
- `samples/phase-13/1316/server/docker-compose.remote.yml`
10-
- `samples/phase-13/1316/server/README.md`
11-
- `docs/pr/LEVEL_12_6_REMOTE_DEPLOYMENT_CANDIDATE_CHECKLIST.md`
12-
- `docs/pr/APPLY_PR_LEVEL_12_6_REMOTE_DEPLOYMENT_CANDIDATE.md`
13-
14-
Allowed nearby reads:
15-
- `samples/phase-13/1316/server/Dockerfile`
16-
- `samples/phase-13/1316/server/docker-compose.yml`
17-
- `samples/phase-13/1316/server/networkSampleADashboardServer.mjs`
18-
- `docs/pr/PLAN_PR_LEVEL_12_6_REMOTE_DEPLOYMENT_CANDIDATE.md`
19-
20-
## Required implementation
21-
- Define one remote hosting target model for a single node.
22-
- Define one externally reachable endpoint contract (host/port/protocol).
23-
- Provide repeatable deployment/run steps for a remote VM/server host.
24-
- Provide a minimal validation sequence proving:
25-
- remote server is reachable
26-
- client can connect over internet path
27-
- authoritative session lifecycle is valid remotely
28-
- Keep all deployment guidance minimal and manual-friendly.
29-
30-
## Acceptance criteria
31-
- Single remote instance can be deployed and started repeatably.
32-
- External endpoint is reachable from outside host network.
33-
- Client connection/session is validated over remote endpoint.
34-
- Steps are documented and reproducible.
6+
## Deliverables
7+
- Remote host configuration
8+
- Public endpoint exposure
9+
- Deployment steps
10+
- Remote connectivity validation
3511

3612
## Validation
37-
Run only:
38-
- `node --check samples/phase-13/1316/server/networkSampleADashboardServer.mjs`
39-
- `docker build -f samples/phase-13/1316/server/Dockerfile samples/phase-13/1316 -t authoritative-server-remote-candidate`
40-
- `docker compose -f samples/phase-13/1316/server/docker-compose.remote.yml up --build`
41-
- remote connectivity probe to published endpoint
42-
- client remote-connect session check using existing multiplayer validation path
43-
44-
## Non-goals
45-
- no scaling/orchestration
46-
- no infrastructure automation expansion
47-
- no gameplay expansion
48-
- no 3D work
49-
50-
## Working tree rule
51-
If the tree is already dirty, ignore unrelated files and modify only the scoped files for this PR purpose.
13+
- Server reachable over internet
14+
- Client connects remotely
15+
- Session lifecycle verified
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# LEVEL_12_6_REMOTE_DEPLOYMENT_CANDIDATE_CHECKLIST
2+
3+
## Single-Node Remote Deployment Checklist
4+
5+
- [x] single-node remote compose definition added
6+
- [x] remote deployment steps documented
7+
- [x] public endpoint contract documented
8+
- [x] startup and shutdown commands documented
9+
- [x] remote connectivity probe command documented
10+
- [x] remote client session verification path documented
11+
- [x] no scaling/orchestration expansion introduced
12+
13+
## Validation Commands
14+
15+
- `node --check samples/phase-13/1316/server/networkSampleADashboardServer.mjs`
16+
- `docker build -f samples/phase-13/1316/server/Dockerfile samples/phase-13/1316 -t authoritative-server-remote-candidate`
17+
- `docker compose -f samples/phase-13/1316/server/docker-compose.remote.yml up --build`
18+
- `curl "http://<PUBLIC_HOST_OR_IP>:4310/admin/network-sample-a/health"`

samples/phase-13/1316/server/README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Provide a lightweight, server-owned, read-only diagnostics dashboard for Sample
1010

1111
## Local Run (Node)
1212
```bash
13-
node games/network_sample_a/server/networkSampleADashboardServer.mjs
13+
node samples/phase-13/1316/server/networkSampleADashboardServer.mjs
1414
```
1515

1616
## Container Run (Docker)
1717
Build from repo root using the sample context:
1818
```bash
19-
docker build -f games/network_sample_a/server/Dockerfile -t network-sample-a-dashboard games/network_sample_a
19+
docker build -f samples/phase-13/1316/server/Dockerfile -t network-sample-a-dashboard samples/phase-13/1316
2020
```
2121

2222
Run with dashboard port mapping:
@@ -26,10 +26,33 @@ docker run --rm -p 4310:4310 -e NETWORK_SAMPLE_A_ADMIN_KEY=sample-a-admin networ
2626

2727
## Container Run (Compose, Optional)
2828
```bash
29-
cd games/network_sample_a/server
29+
cd samples/phase-13/1316/server
3030
docker compose up --build
3131
```
3232

33+
## Remote Run (Single Node Candidate)
34+
From the remote host:
35+
36+
```bash
37+
cd samples/phase-13/1316/server
38+
docker compose -f docker-compose.remote.yml up --build -d
39+
```
40+
41+
Public health check:
42+
43+
```bash
44+
curl "http://<PUBLIC_HOST_OR_IP>:4310/admin/network-sample-a/health"
45+
```
46+
47+
Public dashboard:
48+
- `http://<PUBLIC_HOST_OR_IP>:4310/admin/network-sample-a/dashboard?key=<ADMIN_KEY>`
49+
50+
Shutdown:
51+
52+
```bash
53+
docker compose -f docker-compose.remote.yml down
54+
```
55+
3356
## Default URLs
3457
- Dashboard: `http://127.0.0.1:4310/admin/network-sample-a/dashboard?key=sample-a-admin`
3558
- Metrics JSON: `http://127.0.0.1:4310/admin/network-sample-a/api/metrics?key=sample-a-admin`
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
Toolbox Aid
2+
David Quesenberry
3+
04/15/2026
4+
REMOTE_DEPLOYMENT.md
5+
6+
# Remote Deployment Candidate (Single Node)
7+
8+
## Scope
9+
- one remote host
10+
- one Docker service
11+
- one published endpoint
12+
- no scaling/orchestration
13+
14+
## Prerequisites
15+
- Docker + Docker Compose available on remote host
16+
- inbound TCP access on target port (default `4310`)
17+
- public hostname or IP for the remote host
18+
19+
## Deploy
20+
21+
1. Copy the `samples/phase-13/1316/` folder to the remote host.
22+
2. From `samples/phase-13/1316/server`, run:
23+
24+
```bash
25+
docker compose -f docker-compose.remote.yml up --build -d
26+
```
27+
28+
3. Confirm health:
29+
30+
```bash
31+
curl "http://127.0.0.1:4310/admin/network-sample-a/health"
32+
```
33+
34+
## Public Connectivity Check
35+
36+
From an external machine (not the remote host), verify:
37+
38+
```bash
39+
curl "http://<PUBLIC_HOST_OR_IP>:4310/admin/network-sample-a/health"
40+
```
41+
42+
Expected response includes:
43+
- `"status": "ready"`
44+
- `"code": "NETWORK_SAMPLE_A_DASHBOARD_HEALTHY"`
45+
46+
## Remote Client Session Validation
47+
48+
Use the dashboard endpoint with key:
49+
50+
```text
51+
http://<PUBLIC_HOST_OR_IP>:4310/admin/network-sample-a/dashboard?key=<ADMIN_KEY>
52+
```
53+
54+
Verify:
55+
- page loads remotely
56+
- metrics endpoint responds remotely
57+
- session/player rows update over time
58+
59+
## Shutdown
60+
61+
From `samples/phase-13/1316/server`:
62+
63+
```bash
64+
docker compose -f docker-compose.remote.yml down
65+
```
66+
67+
This candidate remains single-node by design.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Toolbox Aid
2+
# David Quesenberry
3+
# 04/15/2026
4+
# docker-compose.remote.yml
5+
services:
6+
authoritative-server-remote:
7+
container_name: authoritative-server-remote
8+
build:
9+
context: ..
10+
dockerfile: server/Dockerfile
11+
ports:
12+
- "${AUTHORITATIVE_REMOTE_PORT:-4310}:4310"
13+
environment:
14+
NETWORK_SAMPLE_A_DASHBOARD_HOST: "0.0.0.0"
15+
NETWORK_SAMPLE_A_DASHBOARD_PORT: "4310"
16+
NETWORK_SAMPLE_A_DASHBOARD_REFRESH_MS: "${NETWORK_SAMPLE_A_DASHBOARD_REFRESH_MS:-1000}"
17+
NETWORK_SAMPLE_A_ADMIN_KEY: "${NETWORK_SAMPLE_A_ADMIN_KEY:-sample-a-admin}"
18+
NETWORK_SAMPLE_A_ALLOW_LOCALHOST_WITHOUT_KEY: "${NETWORK_SAMPLE_A_ALLOW_LOCALHOST_WITHOUT_KEY:-0}"
19+
NETWORK_SAMPLE_A_ALLOW_REMOTE_WITH_KEY: "${NETWORK_SAMPLE_A_ALLOW_REMOTE_WITH_KEY:-1}"
20+
healthcheck:
21+
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:4310/admin/network-sample-a/health"]
22+
interval: 30s
23+
timeout: 5s
24+
retries: 3
25+
start_period: 10s
26+
restart: unless-stopped

0 commit comments

Comments
 (0)