Skip to content

Commit d091072

Browse files
authored
refactor(docker): rename server image to gateway (#246)
* refactor(docker): rename server image to gateway Rename Dockerfile.server to Dockerfile.gateway and update all image references from openshell/server to openshell/gateway across Helm charts, Kubernetes manifests, mise tasks, build/deploy scripts, CI workflows, and documentation. The underlying Rust binary (navigator-server) is unchanged -- this rename only affects the Docker image name and Dockerfile. * fix: catch remaining server->gateway references in docs and comments
1 parent a05ef3f commit d091072

File tree

21 files changed

+97
-97
lines changed

21 files changed

+97
-97
lines changed

.agents/skills/debug-navigator-cluster/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ docker save <image-ref> | docker exec -i openshell-cluster-<name> ctr -a /run/k3
230230
docker exec openshell-cluster-<name> cat /etc/rancher/k3s/registries.yaml
231231

232232
# Test pulling an image manually from inside the cluster
233-
docker exec openshell-cluster-<name> sh -lc 'KUBECONFIG=/etc/rancher/k3s/k3s.yaml crictl pull ghcr.io/nvidia/openshell/server:latest'
233+
docker exec openshell-cluster-<name> sh -lc 'KUBECONFIG=/etc/rancher/k3s/k3s.yaml crictl pull ghcr.io/nvidia/openshell/gateway:latest'
234234
```
235235

236236
If `registries.yaml` is missing or has wrong values, verify env wiring (`OPENSHELL_REGISTRY_HOST`, `OPENSHELL_REGISTRY_INSECURE`, username/password for authenticated registries).

.claude/agent-memory/arch-doc-writer/MEMORY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@
5959
- Proto files also include: `proto/inference.proto` (navigator.inference.v1)
6060

6161
## Container/Build Details
62-
- Four runtime images: sandbox (5 stages), server (2 stages), cluster (k3s base), pki-job (Alpine)
62+
- Four runtime images: sandbox (5 stages), gateway (2 stages), cluster (k3s base), pki-job (Alpine)
6363
- Two build-only images: python-wheels (Linux multi-arch), python-wheels-macos (osxcross cross-compile)
6464
- CI image: Dockerfile.ci (Ubuntu 24.04, pre-installs docker/buildx/aws/kubectl/helm/mise/uv/sccache/socat)
65-
- Cross-compilation: `deploy/docker/cross-build.sh` shared by sandbox + server Dockerfiles
65+
- Cross-compilation: `deploy/docker/cross-build.sh` shared by sandbox + gateway Dockerfiles
6666
- Sandbox image has coding-agents stage: Claude CLI (native installer), OpenCode, Codex (npm)
6767
- Helm chart deploys a StatefulSet (NOT Deployment), PVC 1Gi at /var/navigator
6868
- Cluster image does NOT bundle image tarballs -- components pulled at runtime from distribution registry
6969
- PKI job generates CA + server cert + client cert for mTLS (RSA 2048, 10yr, Helm pre-install hook)
7070
- Build tasks in `tasks/*.toml`; scripts in `tasks/scripts/`
71-
- `cluster-deploy-fast.sh` supports both auto mode (git diff) and explicit targets (server/sandbox/pki-job/chart/all)
71+
- `cluster-deploy-fast.sh` supports both auto mode (git diff) and explicit targets (gateway/sandbox/chart/all)
7272
- `cluster-bootstrap.sh` ensures local Docker registry on port 5000, pushes all components, then deploys
7373
- Default values.yaml: repository is CloudFront-backed CDN, tag: "latest", pullPolicy: Always
7474
- Envoy Gateway version: v1.5.8 (set in mise.toml)

.github/workflows/docker-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55
inputs:
66
component:
7-
description: "Component to build (server, sandbox, cluster)"
7+
description: "Component to build (gateway, sandbox, cluster)"
88
required: true
99
type: string
1010
timeout-minutes:

.github/workflows/e2e.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ permissions:
99
packages: write
1010

1111
jobs:
12-
build-server:
12+
build-gateway:
1313
if: contains(github.event.pull_request.labels.*.name, 'e2e')
1414
uses: ./.github/workflows/docker-build.yml
1515
with:
16-
component: server
16+
component: gateway
1717

1818
build-sandbox:
1919
if: contains(github.event.pull_request.labels.*.name, 'e2e')
@@ -28,7 +28,7 @@ jobs:
2828
component: cluster
2929

3030
e2e:
31-
needs: [build-server, build-sandbox, build-cluster]
31+
needs: [build-gateway, build-sandbox, build-cluster]
3232
uses: ./.github/workflows/e2e-test.yml
3333
with:
3434
image-tag: ${{ github.sha }}

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ defaults:
1414
shell: bash
1515

1616
jobs:
17-
build-server:
17+
build-gateway:
1818
uses: ./.github/workflows/docker-build.yml
1919
with:
20-
component: server
20+
component: gateway
2121

2222
build-sandbox:
2323
uses: ./.github/workflows/docker-build.yml
@@ -31,7 +31,7 @@ jobs:
3131

3232
tag-ghcr-latest:
3333
name: Tag GHCR Images as Latest
34-
needs: [build-server, build-sandbox, build-cluster]
34+
needs: [build-gateway, build-sandbox, build-cluster]
3535
runs-on: build-amd64
3636
timeout-minutes: 10
3737
steps:
@@ -42,7 +42,7 @@ jobs:
4242
run: |
4343
set -euo pipefail
4444
REGISTRY="ghcr.io/nvidia/openshell"
45-
for component in server sandbox cluster; do
45+
for component in gateway sandbox cluster; do
4646
echo "Tagging ${REGISTRY}/${component}:${{ github.sha }} as latest..."
4747
docker buildx imagetools create \
4848
--prefer-index=false \
@@ -52,7 +52,7 @@ jobs:
5252
5353
build-python-wheels:
5454
name: Stage Python Wheels
55-
needs: [build-server, build-sandbox, build-cluster]
55+
needs: [build-gateway, build-sandbox, build-cluster]
5656
runs-on: build-amd64
5757
timeout-minutes: 120
5858
outputs:

architecture/build-containers.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ deploy/
99
docker/
1010
.dockerignore
1111
Dockerfile.sandbox # Sandbox container (runs agent code in isolation)
12-
Dockerfile.server # Gateway container (orchestration / control plane)
12+
Dockerfile.gateway # Gateway container (orchestration / control plane)
1313
Dockerfile.cluster # Airgapped k3s cluster with Helm charts and manifests
1414
Dockerfile.ci # CI runner image with pre-installed toolchain
1515
Dockerfile.python-wheels # Multi-arch Linux wheel builder for the Python CLI package
@@ -74,11 +74,11 @@ The sandbox container runs inside each sandbox pod. It contains the sandbox supe
7474
- Policy files are mounted at `/var/navigator/policy.rego` (rules) and `/var/navigator/data.yaml` (data) when running in file-based policy mode.
7575
- The Python SDK is copied directly into the venv's site-packages at `/app/.venv/lib/python3.12/site-packages/openshell/`.
7676

77-
### Gateway Image (`openshell/server`)
77+
### Gateway Image (`openshell/gateway`)
7878

7979
The gateway container runs the control plane / orchestration service.
8080

81-
**Build stages** (2 stages in `deploy/docker/Dockerfile.server`):
81+
**Build stages** (2 stages in `deploy/docker/Dockerfile.gateway`):
8282

8383
1. **builder** -- Two-pass Rust compilation with dependency caching:
8484
- First pass copies only `Cargo.toml`/`Cargo.lock` files and creates dummy source files (`fn main() {}` / empty `lib.rs`) to build dependencies in isolation. This layer is cached unless dependency manifests change.
@@ -195,7 +195,7 @@ Modifies the HelmChart manifest at `/var/lib/rancher/k3s/server/manifests/naviga
195195
| Variable | Effect |
196196
|---|---|
197197
| `IMAGE_REPO_BASE` | Rewrites `repository:` and `sandboxImage:` to use the specified base path |
198-
| `PUSH_IMAGE_REFS` | Parses comma-separated image refs and rewrites exact server and sandbox references (matching on path component `/server:`, `/sandbox:`) |
198+
| `PUSH_IMAGE_REFS` | Parses comma-separated image refs and rewrites exact gateway and sandbox references (matching on path component `/gateway:`, `/sandbox:`) |
199199
| `IMAGE_TAG` | Replaces `:latest` tags with the specified tag (handles both quoted and unquoted `tag: latest` formats) |
200200
| `IMAGE_PULL_POLICY` | Replaces `pullPolicy: Always` with the specified policy (e.g., `IfNotPresent`) |
201201
| `SSH_GATEWAY_HOST` / `SSH_GATEWAY_PORT` | Replaces `__SSH_GATEWAY_HOST__` and `__SSH_GATEWAY_PORT__` placeholders; clears to defaults if unset |
@@ -228,7 +228,7 @@ The Helm chart at `deploy/helm/navigator/` deploys the gateway to Kubernetes as
228228
replicaCount: 1
229229

230230
image:
231-
repository: ghcr.io/nvidia/openshell/server
231+
repository: ghcr.io/nvidia/openshell/gateway
232232
pullPolicy: Always
233233
tag: "latest"
234234

@@ -306,7 +306,7 @@ All builds use mise tasks defined in `tasks/*.toml` (included from `mise.toml`).
306306
|---|---|
307307
| `mise run docker:build` | Build all runtime images (sandbox, gateway, cluster) |
308308
| `mise run docker:build:sandbox` | Build sandbox image |
309-
| `mise run docker:build:server` | Build gateway image |
309+
| `mise run docker:build:gateway` | Build gateway image |
310310
| `mise run docker:build:cluster` | Build k3s cluster image (packages Helm charts first) |
311311
| `mise run docker:build:ci` | Build CI runner image |
312312
| `mise run docker:build:cluster:multiarch` | Build multi-arch cluster image and push to a registry |
@@ -336,11 +336,11 @@ All builds use mise tasks defined in `tasks/*.toml` (included from `mise.toml`).
336336
| `Cargo.toml`, `Cargo.lock`, `proto/*`, `deploy/docker/cross-build.sh` | Gateway + sandbox rebuild |
337337
| `crates/navigator-core/*`, `crates/navigator-providers/*` | Gateway + sandbox rebuild |
338338
| `crates/navigator-router/*` | Gateway rebuild |
339-
| `crates/navigator-server/*`, `deploy/docker/Dockerfile.server` | Gateway rebuild |
339+
| `crates/navigator-server/*`, `deploy/docker/Dockerfile.gateway` | Gateway rebuild |
340340
| `crates/navigator-sandbox/*`, `deploy/docker/sandbox/*`, `python/*`, `pyproject.toml`, `uv.lock`, `crates/navigator-sandbox/data/sandbox-policy.rego` | Sandbox rebuild |
341341
| `deploy/helm/navigator/*` | Helm upgrade |
342342

343-
**Explicit target mode** (arguments: `server`, `sandbox`, `chart`, `all`): Rebuilds only the specified components.
343+
**Explicit target mode** (arguments: `gateway`, `sandbox`, `chart`, `all`): Rebuilds only the specified components.
344344

345345
Auto mode persists the last deployed fingerprints in `.cache/cluster-deploy-fast.state` (or `$DEPLOY_FAST_STATE_FILE`). Re-running `mise run cluster` without new local changes prints `No new local changes since last deploy.` and skips rebuild/upgrade work.
346346

@@ -461,7 +461,7 @@ When the cluster container starts, k3s automatically deploys these HelmChart CRs
461461
## Implementation References
462462

463463
- `deploy/docker/Dockerfile.sandbox` -- Sandbox image (5-stage multi-arch build)
464-
- `deploy/docker/Dockerfile.server` -- Gateway image (2-stage with dependency caching)
464+
- `deploy/docker/Dockerfile.gateway` -- Gateway image (2-stage with dependency caching)
465465
- `deploy/docker/Dockerfile.cluster` -- Cluster image (k3s base + charts + manifests)
466466
- `deploy/docker/Dockerfile.ci` -- CI runner image (Ubuntu + full toolchain)
467467
- `deploy/docker/Dockerfile.python-wheels` -- Linux wheel builder

architecture/gateway-single-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ Copies bundled manifests from `/opt/navigator/manifests/` to `/var/lib/rancher/k
289289
When environment variables are set, the entrypoint modifies the HelmChart manifest at `/var/lib/rancher/k3s/server/manifests/navigator-helmchart.yaml`:
290290

291291
- `IMAGE_REPO_BASE`: Rewrites `repository:`, `sandboxImage:`, and `jobImage:` in the HelmChart.
292-
- `PUSH_IMAGE_REFS`: In push mode, parses comma-separated image refs and rewrites the exact gateway, sandbox, and pki-job image references (matching on path component `/server:`, `/sandbox:`, `/pki-job:`).
292+
- `PUSH_IMAGE_REFS`: In push mode, parses comma-separated image refs and rewrites the exact gateway, sandbox, and pki-job image references (matching on path component `/gateway:`, `/sandbox:`, `/pki-job:`).
293293
- `IMAGE_TAG`: Replaces `:latest` tags with the specified tag on gateway, sandbox, and pki-job images. Handles both quoted and unquoted `tag: latest` formats.
294294
- `IMAGE_PULL_POLICY`: Replaces `pullPolicy: Always` with the specified policy (e.g., `IfNotPresent`).
295295
- `SSH_GATEWAY_HOST` / `SSH_GATEWAY_PORT`: Replaces `__SSH_GATEWAY_HOST__` and `__SSH_GATEWAY_PORT__` placeholders.

deploy/docker/Dockerfile.cluster

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# - HelmChart CR for auto-deploying OpenShell
1313
# - Custom entrypoint for DNS configuration in Docker environments
1414
#
15-
# Component images (openshell/server, openshell/sandbox) are
15+
# Component images (openshell/gateway, openshell/sandbox) are
1616
# pulled at runtime from the distribution registry rather than bundled as tarballs.
1717
# Registry credentials are generated by the entrypoint script at container start.
1818
#
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
44
# SPDX-License-Identifier: Apache-2.0
55

6-
# OpenShell Server Docker image
6+
# OpenShell Gateway Docker image
77
# Multi-stage build with cross-compilation support for multi-arch
88

99
# Stage 1: Rust builder (runs on build platform, cross-compiles for target)
@@ -52,9 +52,9 @@ COPY proto/ proto/
5252
# sccache uses memcached in CI (SCCACHE_MEMCACHED_ENDPOINT) or the local
5353
# disk cache mount for local dev builds. The cargo-target mount gives cargo
5454
# a persistent target/ dir for true incremental rebuilds on source changes.
55-
RUN --mount=type=cache,id=cargo-registry-server-${TARGETARCH},sharing=locked,target=/usr/local/cargo/registry \
56-
--mount=type=cache,id=cargo-target-server-${TARGETARCH}-${CARGO_TARGET_CACHE_SCOPE},sharing=locked,target=/build/target \
57-
--mount=type=cache,id=sccache-server-${TARGETARCH},sharing=locked,target=/tmp/sccache \
55+
RUN --mount=type=cache,id=cargo-registry-gateway-${TARGETARCH},sharing=locked,target=/usr/local/cargo/registry \
56+
--mount=type=cache,id=cargo-target-gateway-${TARGETARCH}-${CARGO_TARGET_CACHE_SCOPE},sharing=locked,target=/build/target \
57+
--mount=type=cache,id=sccache-gateway-${TARGETARCH},sharing=locked,target=/tmp/sccache \
5858
. cross-build.sh && cargo_cross_build --release -p navigator-server 2>/dev/null || true
5959

6060
# Copy actual source code
@@ -68,9 +68,9 @@ RUN touch crates/navigator-server/src/main.rs \
6868
proto/*.proto
6969

7070
# Build the actual application
71-
RUN --mount=type=cache,id=cargo-registry-server-${TARGETARCH},sharing=locked,target=/usr/local/cargo/registry \
72-
--mount=type=cache,id=cargo-target-server-${TARGETARCH}-${CARGO_TARGET_CACHE_SCOPE},sharing=locked,target=/build/target \
73-
--mount=type=cache,id=sccache-server-${TARGETARCH},sharing=locked,target=/tmp/sccache \
71+
RUN --mount=type=cache,id=cargo-registry-gateway-${TARGETARCH},sharing=locked,target=/usr/local/cargo/registry \
72+
--mount=type=cache,id=cargo-target-gateway-${TARGETARCH}-${CARGO_TARGET_CACHE_SCOPE},sharing=locked,target=/build/target \
73+
--mount=type=cache,id=sccache-gateway-${TARGETARCH},sharing=locked,target=/tmp/sccache \
7474
. cross-build.sh && \
7575
if [ -n "${OPENSHELL_CARGO_VERSION:-}" ]; then \
7676
sed -i -E '/^\[workspace\.package\]/,/^\[/{s/^version[[:space:]]*=[[:space:]]*".*"/version = "'"${OPENSHELL_CARGO_VERSION}"'"/}' Cargo.toml; \

deploy/docker/cluster-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ HELMCHART="/var/lib/rancher/k3s/server/manifests/openshell-helmchart.yaml"
322322
if [ -n "${IMAGE_REPO_BASE:-}" ] && [ -f "$HELMCHART" ]; then
323323
target_tag="${IMAGE_TAG:-latest}"
324324
echo "Setting image repository base: ${IMAGE_REPO_BASE}"
325-
sed -i -E "s|repository:[[:space:]]*[^[:space:]]+|repository: ${IMAGE_REPO_BASE}/server|" "$HELMCHART"
325+
sed -i -E "s|repository:[[:space:]]*[^[:space:]]+|repository: ${IMAGE_REPO_BASE}/gateway|" "$HELMCHART"
326326
sed -i -E "s|sandboxImage:[[:space:]]*[^[:space:]]+|sandboxImage: ${IMAGE_REPO_BASE}/sandbox:${target_tag}|" "$HELMCHART"
327327
fi
328328

@@ -335,7 +335,7 @@ if [ -n "${PUSH_IMAGE_REFS:-}" ] && [ -f "$HELMCHART" ]; then
335335
IFS=','
336336
for ref in $PUSH_IMAGE_REFS; do
337337
case "$ref" in
338-
*/server:*) server_image="$ref" ;;
338+
*/gateway:*) server_image="$ref" ;;
339339
*/sandbox:*) sandbox_image="$ref" ;;
340340
esac
341341
done

0 commit comments

Comments
 (0)