Skip to content

Commit c400a41

Browse files
authored
remove go controller (#42)
Signed-off-by: kerthcet <kerthcet@gmail.com>
1 parent 3ddaae8 commit c400a41

14 files changed

Lines changed: 20 additions & 2478 deletions

File tree

‎.dockerignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ docs/
1818
# NOT examples/: sandd/Cargo.toml declares [[example]] targets at ../examples/*.rs,
1919
# and cargo parses every workspace member's manifest even when building one package.
2020
# Excluding this directory makes the workspace fail to parse in any image that builds
21-
# from source (Dockerfile.controller, Dockerfile.server-tunnel).
21+
# from source (e.g. Dockerfile.server-tunnel).
2222
python/tests/

‎.github/workflows/release.yaml‎

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,16 @@ jobs:
2424
- runner: ubuntu-22.04
2525
target: x86_64-unknown-linux-musl
2626
asset: sandd-linux-amd64
27-
package: sandd
28-
bin: sandd
2927
- runner: ubuntu-22.04-arm
3028
target: aarch64-unknown-linux-musl
3129
asset: sandd-linux-arm64
32-
package: sandd
33-
bin: sandd
3430
# No Intel-mac (x86_64-apple-darwin) leg: GitHub is retiring the
3531
# macos-13 (Intel) runners, so that job queues indefinitely and — with
3632
# `release` gated on `needs: build` — blocks the whole release from
3733
# publishing. Apple Silicon (macos-14/arm64) covers modern Macs.
3834
- runner: macos-14
3935
target: aarch64-apple-darwin
4036
asset: sandd-darwin-arm64
41-
package: sandd
42-
bin: sandd
43-
# THE DAEMON ONLY. There is deliberately no sandd-controller asset and no
44-
# controller image: the controller is not a deployed artifact any more. Its
45-
# only consumer, Nebula, compiles it INTO its manager process through the C
46-
# ABI (server/src/ffi.rs), because a daemon's connection is a live socket
47-
# owned by whichever process accepted it — so reaching back into a workload
48-
# from a separate controller process would mean relaying.
49-
#
50-
# `cargo build --bin sandd-controller` and `make docker-build-controller`
51-
# still work for anyone who wants to run it standalone. They are just not
52-
# release artifacts, and publishing them would imply a supported deployment
53-
# shape that nothing uses.
5437
steps:
5538
- uses: actions/checkout@v4
5639

@@ -64,13 +47,11 @@ jobs:
6447
if: endsWith(matrix.target, '-musl')
6548
run: sudo apt-get update && sudo apt-get install -y musl-tools
6649

67-
- name: Build ${{ matrix.bin }}
68-
run: |
69-
cargo build --package ${{ matrix.package }} --bin ${{ matrix.bin }} \
70-
--release --locked --target ${{ matrix.target }}
50+
- name: Build daemon
51+
run: cargo build --package sandd --release --locked --target ${{ matrix.target }}
7152

7253
- name: Rename binary
73-
run: mv target/${{ matrix.target }}/release/${{ matrix.bin }} ${{ matrix.asset }}
54+
run: mv target/${{ matrix.target }}/release/sandd ${{ matrix.asset }}
7455

7556
- name: Verify static linking
7657
if: endsWith(matrix.target, '-musl')

‎Cargo.lock‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Makefile‎

Lines changed: 4 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ MATURIN := .venv/bin/maturin
55
# Pinned so lint results don't shift when ruff changes its default rule set.
66
RUFF_VERSION := ruff==0.15.15
77

8-
.PHONY: help build install dev test clean daemon-build daemon-release controller-build controller-release test-e2e test-e2e-tunnel docker-build docker-down
8+
.PHONY: help build install dev test clean daemon-build daemon-release test-e2e test-e2e-tunnel docker-build docker-down
99

1010
help:
1111
@echo "SandD - Sandbox Daemon - Build Commands"
@@ -18,17 +18,10 @@ help:
1818
@echo " make test-e2e-tunnel - Run tunnel-mode (Tailscale mesh) e2e tests (slow)"
1919
@echo " make daemon-build - Build daemon binary (debug)"
2020
@echo " make daemon-release - Build daemon binary (release)"
21-
@echo " make controller-build - Build controller binary (debug)"
22-
@echo " make controller-release - Build controller binary (release)"
2321
@echo " make docker-build - Build Docker image for daemon"
2422
@echo " make docker-down - Stop and remove Docker containers"
2523
@echo " make clean - Clean build artifacts"
2624
@echo ""
27-
@echo "Controller image (native Rust binary — what Nebula runs):"
28-
@echo " make docker-build-controller - Build both arches (no push)"
29-
@echo " make docker-build-controller-local - Build host arch only, load locally"
30-
@echo " make docker-push-controller - Build both arches and push a manifest"
31-
@echo ""
3225
@echo "Tunnel server (Python-hosted controller) image — multi-arch (amd64 + arm64):"
3326
@echo " make docker-build-server-tunnel - Build both arches (no push)"
3427
@echo " make docker-build-server-tunnel-local - Build host arch only, load locally"
@@ -47,11 +40,8 @@ test: lint $(PYTEST) dev
4740
@echo "Running Rust tests (daemon)..."
4841
cargo test --package sandd
4942
@echo ""
50-
@echo "Running Rust tests (controller: lib + binary)..."
51-
# NOT --lib: that skips src/main.rs, where the controller's config/flag rules and
52-
# the "auth on but material missing must be FATAL" tests live. --no-default-features
53-
# is implicit (python is off by default), which is also what the bin target needs.
54-
cargo test --package sandbox-server --lib --bins
43+
@echo "Running Rust tests (controller)..."
44+
cargo test --package sandbox-server --lib
5545
@echo ""
5646
@echo "Running Python tests (excluding e2e)..."
5747
$(PYTEST) python/tests/ -m "not e2e"
@@ -64,17 +54,6 @@ daemon-release:
6454
@echo ""
6555
@echo "SandD binary built at: ./target/release/sandd"
6656

67-
# The CONTROLLER binary — what Nebula runs, one Deployment per workload. No
68-
# --features python: the pyo3 layer must stay out or the bin cannot link at all
69-
# (extension-module leaves the CPython symbols undefined). See server/Cargo.toml.
70-
controller-build:
71-
cargo build --package sandbox-server --bin sandd-controller
72-
73-
controller-release:
74-
cargo build --package sandbox-server --bin sandd-controller --release
75-
@echo ""
76-
@echo "SandD controller binary built at: ./target/release/sandd-controller"
77-
7857
clean:
7958
cargo clean
8059
rm -rf target/
@@ -114,61 +93,10 @@ docker-up:
11493
docker-down:
11594
docker compose -f hack/docker/docker-compose.e2e.yml down
11695

117-
# --- Controller image (native Rust binary) -------------------------------------
118-
#
119-
# For running the controller STANDALONE. Nebula does not pull this: it links the
120-
# controller into its own manager through the C ABI (server/src/ffi.rs), so there is
121-
# no controller Deployment and no image to pin. Nothing publishes this image either
122-
# — the release workflow ships the daemon binaries only.
123-
#
124-
# Distroless + one static-ish binary, ~50MB against the ~4GB server-tunnel image
125-
# below, because it carries no interpreter, no rustup and no Tailscale client.
126-
#
127-
# Multi-arch for the same reason as every other image here (see the note below):
128-
# built on arm64 Macs, deployed to mostly-amd64 nodes.
129-
CONTROLLER_IMG ?= inftyai/sandd-controller
130-
CONTROLLER_TAG ?= latest
131-
132-
.PHONY: docker-build-controller
133-
docker-build-controller: buildx-builder
134-
docker buildx build \
135-
--builder $(BUILDX_BUILDER) \
136-
--platform $(PLATFORMS) \
137-
-f hack/docker/Dockerfile.controller \
138-
-t $(CONTROLLER_IMG):$(CONTROLLER_TAG) \
139-
.
140-
141-
# Host arch only, loaded into the local docker store so it can actually be run
142-
# (`docker run --rm $(CONTROLLER_IMG):$(CONTROLLER_TAG) --help`). A multi-platform
143-
# build cannot be --load'ed: the local store holds one arch per tag.
144-
.PHONY: docker-build-controller-local
145-
docker-build-controller-local: buildx-builder
146-
docker buildx build \
147-
--builder $(BUILDX_BUILDER) \
148-
-f hack/docker/Dockerfile.controller \
149-
-t $(CONTROLLER_IMG):$(CONTROLLER_TAG) \
150-
--load \
151-
.
152-
153-
.PHONY: docker-push-controller
154-
docker-push-controller: buildx-builder
155-
docker buildx build \
156-
--builder $(BUILDX_BUILDER) \
157-
--platform $(PLATFORMS) \
158-
-f hack/docker/Dockerfile.controller \
159-
-t $(CONTROLLER_IMG):$(CONTROLLER_TAG) \
160-
--push \
161-
.
162-
@echo ""
163-
@echo "Pushed $(CONTROLLER_IMG):$(CONTROLLER_TAG) for $(PLATFORMS)"
164-
@echo "Verify the manifest lists both arches:"
165-
@echo " docker buildx imagetools inspect $(CONTROLLER_IMG):$(CONTROLLER_TAG)"
166-
16796
# --- Tunnel server (controller) image ------------------------------------------
16897
#
16998
# The PYTHON-hosted controller, kept for the tunnel/mesh e2e stacks and for driving a
170-
# controller from Python (`from sandd import Server`). Nebula uses the native binary
171-
# above instead — no Python drives its controllers and it does not use the mesh.
99+
# controller from Python (`from sandd import Server`).
172100
#
173101
# The controller image must run on BOTH architectures: it is developed on arm64
174102
# Macs but deployed to clusters whose nodes are usually amd64 (and increasingly

0 commit comments

Comments
 (0)