Skip to content

Commit 2ffb97e

Browse files
e2bclaude
authored andcommitted
docs: ARM64 architecture support in orchestrator README
Document architecture naming conventions, SMT behavior, cross-arch deployment via TARGET_ARCH, and path resolution strategy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a1b2124 commit 2ffb97e

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

packages/orchestrator/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,67 @@ Flags:
217217

218218
---
219219

220+
## Architecture (ARM64) Support
221+
222+
The orchestrator supports both `amd64` (x86_64) and `arm64` (aarch64) architectures. Architecture is detected automatically via `runtime.GOARCH` at compile time.
223+
224+
### Architecture naming convention
225+
226+
This project uses **Go/Docker/Debian naming** (`amd64`/`arm64`) for architecture directories in binary paths and GCS buckets:
227+
228+
| Convention | x86_64 name | ARM64 name | Used by |
229+
|------------|-------------|------------|---------|
230+
| **Go/Docker/Debian** | `amd64` | `arm64` | This repo, Docker, `dpkg --print-architecture` |
231+
| Linux/GNU | `x86_64` | `aarch64` | `uname -m`, kernel Makefiles |
232+
233+
Binary paths follow the `{version}/{arch}/` layout:
234+
235+
```
236+
# Firecracker (GCS bucket or FIRECRACKER_VERSIONS_DIR)
237+
fc-versions/v1.12.1_717921c/amd64/firecracker
238+
fc-versions/v1.12.1_717921c/arm64/firecracker
239+
240+
# Kernels (GCS bucket or HOST_KERNELS_DIR)
241+
kernels/vmlinux-6.1.102/amd64/vmlinux.bin
242+
kernels/vmlinux-6.1.102/arm64/vmlinux.bin
243+
```
244+
245+
> **Note:** The [fc-kernels](https://github.com/e2b-dev/fc-kernels) repo currently uses `x86_64` instead of `amd64` for its directory names. This will be aligned in a follow-up change.
246+
247+
### ARM64-specific behavior
248+
249+
- **SMT** is disabled (ARM processors don't support simultaneous multi-threading)
250+
- **CPU detection** uses fallback values since `gopsutil` doesn't populate Family/Model on ARM64
251+
- **OCI platform** is set to the target architecture instead of hardcoded `amd64`
252+
- **Busybox binary** must be swapped before building: `make fetch-busybox`
253+
254+
### Cross-architecture deployment
255+
256+
`TARGET_ARCH` is a **runtime** environment variable that overrides the architecture used for path resolution and OCI image pulls. When unset, defaults to the host architecture (`runtime.GOARCH`).
257+
258+
```bash
259+
# Run orchestrator targeting amd64 paths from an arm64 host
260+
TARGET_ARCH=amd64 ./bin/orchestrator
261+
262+
# Or in .env file (read at runtime)
263+
echo "TARGET_ARCH=amd64" >> .env.local
264+
```
265+
266+
`TARGET_ARCH` affects:
267+
- Firecracker and kernel binary path resolution (`{version}/{arch}/...`)
268+
- OCI image platform for container pulls
269+
270+
It does **not** affect:
271+
- Makefile compilation — use `GOARCH` directly for cross-compilation: `GOARCH=amd64 make build-local`
272+
- Hardware-dependent runtime behavior (SMT detection, CPU info) which always uses the actual host architecture
273+
274+
---
275+
220276
## Environment Variables
221277

222278
Automatically set in local mode. Set before running to override:
223279

280+
- `TARGET_ARCH` - Target architecture override (`amd64` or `arm64`; default: host architecture)
224281
- `HOST_ENVD_PATH` - Envd binary path (default: `../envd/bin/envd`)
225282
- `HOST_KERNELS_DIR` - Kernel versions dir (local: `{storage}/kernels`, prod: `/fc-kernels`)
226283
- `FIRECRACKER_VERSIONS_DIR` - Firecracker versions dir (local: `{storage}/fc-versions`, prod: `/fc-versions`)

0 commit comments

Comments
 (0)