-
Notifications
You must be signed in to change notification settings - Fork 275
docs: ARM64 architecture support in orchestrator README #2254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
4f82a51
b5a86e6
483f28e
dbcb02d
3592952
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,8 +36,8 @@ Flags: | |
| - `-template <id>` - Template ID (default: `local-template`) | ||
| - `-storage <path>` - Local path or `gs://bucket` (enables local mode with auto-download of kernel/FC) | ||
| - `-sandbox-dir <path>` - Override `SANDBOX_DIR` (the rootfs path baked into the snapshot) | ||
| - `-kernel <version>` - Kernel version (default: `vmlinux-6.1.102`) | ||
| - `-firecracker <version>` - Firecracker version (default: `v1.12.1_a41d3fb`) | ||
| - `-kernel <version>` - Kernel version (default: `vmlinux-6.1.158`) | ||
| - `-firecracker <version>` - Firecracker version (default: `v1.12.1_210cbac`) | ||
| - `-vcpu <n>` - vCPUs (default: `1`) | ||
| - `-memory <mb>` - Memory in MB (default: `512`) | ||
| - `-disk <mb>` - Disk in MB (default: `1000`) | ||
|
|
@@ -219,10 +219,81 @@ Flags: | |
|
|
||
| --- | ||
|
|
||
| ## Architecture (ARM64) Support | ||
|
|
||
| The orchestrator supports both `amd64` (x86_64) and `arm64` (aarch64) architectures. Architecture is detected automatically via `runtime.GOARCH` at compile time. | ||
|
|
||
| ### Architecture naming convention | ||
|
|
||
| This project uses **Go/Docker/Debian naming** (`amd64`/`arm64`) for architecture directories in binary paths and GCS buckets: | ||
|
|
||
| | Convention | x86_64 name | ARM64 name | Used by | | ||
| |------------|-------------|------------|---------| | ||
| | **Go/Docker/Debian** | `amd64` | `arm64` | This repo, Docker, `dpkg --print-architecture` | | ||
| | Linux/GNU | `x86_64` | `aarch64` | `uname -m`, kernel Makefiles | | ||
|
|
||
| Binary paths follow the `{version}/{arch}/` layout: | ||
|
|
||
| ``` | ||
| # Firecracker (GCS bucket or FIRECRACKER_VERSIONS_DIR) | ||
| fc-versions/v1.12.1_210cbac/amd64/firecracker | ||
| fc-versions/v1.12.1_210cbac/arm64/firecracker | ||
|
|
||
| # Kernels (GCS bucket or HOST_KERNELS_DIR) | ||
| kernels/vmlinux-6.1.158/amd64/vmlinux.bin | ||
| kernels/vmlinux-6.1.158/arm64/vmlinux.bin | ||
| ``` | ||
|
|
||
| > **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. | ||
|
|
||
| ### ARM64-specific behavior | ||
|
|
||
| - **SMT** is disabled (ARM processors don't support simultaneous multi-threading) | ||
| - **CPU detection** uses fallback values since `gopsutil` doesn't populate Family/Model on ARM64 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are no fallback values in the current code.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not applicable — this is a docs-only PR, split from the arm64-support branch. The code implementing these features (TARGET_ARCH, SMT, fetch-busybox, OCI platform) is in separate PRs (#2258, #2259, #2260, #2257). Bots are comparing against this branch alone; the docs will be accurate once all PRs merge. |
||
| - **OCI platform** is set to the target architecture instead of hardcoded `amd64` | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not applicable — this is a docs-only PR, split from the arm64-support branch. The code implementing these features (TARGET_ARCH, SMT, fetch-busybox, OCI platform) is in separate PRs (#2258, #2259, #2260, #2257). Bots are comparing against this branch alone; the docs will be accurate once all PRs merge. |
||
| - **Busybox binaries** are committed for both architectures and selected automatically via Go build tags | ||
|
|
||
| ### Cross-architecture deployment | ||
|
|
||
| `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`). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not applicable — this is a docs-only PR, split from the arm64-support branch. The code implementing these features (TARGET_ARCH, SMT, fetch-busybox, OCI platform) is in separate PRs (#2258, #2259, #2260, #2257). Bots are comparing against this branch alone; the docs will be accurate once all PRs merge. |
||
|
|
||
| ```bash | ||
| # Run orchestrator targeting amd64 paths from an arm64 host | ||
| TARGET_ARCH=amd64 ./bin/orchestrator | ||
|
Comment on lines
+258
to
+262
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new section documents Useful? React with 👍 / 👎.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not applicable — this is a docs-only PR, split from the arm64-support branch. The code implementing these features (TARGET_ARCH, SMT, fetch-busybox, OCI platform) is in separate PRs (#2258, #2259, #2260, #2257). Bots are comparing against this branch alone; the docs will be accurate once all PRs merge. |
||
|
|
||
| # Or in .env file (read at runtime) | ||
| echo "TARGET_ARCH=amd64" >> .env.local | ||
| ``` | ||
|
|
||
| `TARGET_ARCH` affects: | ||
| - Firecracker and kernel binary path resolution (`{version}/{arch}/...`) | ||
| - OCI image platform for container pulls | ||
|
|
||
| It does **not** affect: | ||
| - Makefile compilation (see `BUILD_ARCH` below) | ||
| - Hardware-dependent runtime behavior (SMT detection, CPU info) which always uses the actual host architecture | ||
|
|
||
| ### Building for ARM64 | ||
|
|
||
| `BUILD_ARCH` defaults to `amd64`. To build ARM64 binaries: | ||
|
|
||
| ```bash | ||
| # Single command | ||
| BUILD_ARCH=arm64 make build-local | ||
|
|
||
| # Or set in .env.local for persistent override | ||
| echo "BUILD_ARCH=arm64" >> .env.local | ||
| ``` | ||
|
|
||
| This applies to all services: orchestrator, envd, client-proxy. | ||
|
|
||
| --- | ||
|
|
||
| ## Environment Variables | ||
|
|
||
| Automatically set in local mode. Set before running to override: | ||
|
|
||
| - `TARGET_ARCH` - Target architecture override (`amd64` or `arm64`; default: host architecture) | ||
| - `HOST_ENVD_PATH` - Envd binary path (default: `../envd/bin/envd`) | ||
| - `HOST_KERNELS_DIR` - Kernel versions dir (local: `{storage}/kernels`, prod: `/fc-kernels`) | ||
| - `FIRECRACKER_VERSIONS_DIR` - Firecracker versions dir (local: `{storage}/fc-versions`, prod: `/fc-versions`) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code doesn't actually disable SMT —
fc/client.go:329setssmt := trueunconditionally with no ARM64 branch. Either the behavior isn't implemented yet or this claim is incorrect.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not applicable — this is a docs-only PR, split from the arm64-support branch. The code implementing these features (TARGET_ARCH, SMT, fetch-busybox, OCI platform) is in separate PRs (#2258, #2259, #2260, #2257). Bots are comparing against this branch alone; the docs will be accurate once all PRs merge.