Skip to content

Commit ed2e08b

Browse files
authored
refactor: rename "bare metal" to "native host" across codebase (#236)
The "bare metal" terminology was misleading since the deployment mode works equally well on VMs. "Native host" accurately conveys running directly on the host OS regardless of whether it's physical or virtual. Renames directories, modules, enum variants, struct names, config keys, CI workflow references, and documentation.
1 parent 00f6089 commit ed2e08b

39 files changed

Lines changed: 121 additions & 121 deletions

.github/workflows/e2e.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ jobs:
6262
});
6363
}
6464
65-
bare-metal:
66-
name: Bare-Metal
65+
native-host:
66+
name: Native-Host
6767
runs-on: [self-hosted, amd-aac02-rocm]
6868
if: github.event.workflow_run.conclusion == 'success'
6969
concurrency:
70-
group: bare-metal-cluster
70+
group: native-host-cluster
7171
queue: max
7272
env:
73-
STATUS_CONTEXT: "E2E / Bare-Metal"
73+
STATUS_CONTEXT: "E2E / Native-Host"
7474
BM_NODES: ${{ secrets.BM_NODES }}
7575
BM_SSH_USER: ${{ secrets.BM_SSH_USER }}
7676
BM_REMOTE_BASE: /tmp/spur-bm-${{ github.run_id }}
@@ -108,7 +108,7 @@ jobs:
108108
with:
109109
persist-credentials: false
110110
sparse-checkout: |
111-
deploy/bare-metal
111+
deploy/native-host
112112
scripts
113113
sparse-checkout-cone-mode: false
114114
path: trusted-repo
@@ -196,49 +196,49 @@ jobs:
196196
done
197197
done
198198
199-
- name: Run single-node bare-metal tests
199+
- name: Run single-node native-host tests
200200
env:
201201
SPUR_TEST_BM_NODES: ${{ env.BM_NODES }}
202202
SPUR_TEST_BM_SSH_USER: ${{ secrets.BM_SSH_USER }}
203203
SPUR_TEST_BM_BINARIES_DIR: /tmp/release-binaries
204-
SPUR_TEST_BM_DEPLOY_DIR: trusted-repo/deploy/bare-metal
204+
SPUR_TEST_BM_DEPLOY_DIR: trusted-repo/deploy/native-host
205205
SPUR_TEST_BM_REMOTE_DIR: ${{ env.BM_REMOTE_BASE }}/single-node
206206
RUST_LOG: info
207207
run: |
208208
chmod +x /tmp/e2e-bin/spur-k8s-tests
209-
/tmp/e2e-bin/spur-k8s-tests bare_metal::single_node --ignored --test-threads=1
209+
/tmp/e2e-bin/spur-k8s-tests native_host::single_node --ignored --test-threads=1
210210
211-
- name: Run multi-node bare-metal tests
211+
- name: Run multi-node native-host tests
212212
env:
213213
SPUR_TEST_BM_NODES: ${{ env.BM_NODES }}
214214
SPUR_TEST_BM_SSH_USER: ${{ secrets.BM_SSH_USER }}
215215
SPUR_TEST_BM_BINARIES_DIR: /tmp/release-binaries
216-
SPUR_TEST_BM_DEPLOY_DIR: trusted-repo/deploy/bare-metal
216+
SPUR_TEST_BM_DEPLOY_DIR: trusted-repo/deploy/native-host
217217
SPUR_TEST_BM_REMOTE_DIR: ${{ env.BM_REMOTE_BASE }}/multi-node
218218
RUST_LOG: info
219-
run: /tmp/e2e-bin/spur-k8s-tests bare_metal::multi_node --ignored --test-threads=1
219+
run: /tmp/e2e-bin/spur-k8s-tests native_host::multi_node --ignored --test-threads=1
220220

221-
- name: Run single-node GPU bare-metal tests
221+
- name: Run single-node GPU native-host tests
222222
env:
223223
SPUR_TEST_BM_NODES: ${{ env.BM_NODES }}
224224
SPUR_TEST_BM_SSH_USER: ${{ secrets.BM_SSH_USER }}
225225
SPUR_TEST_BM_BINARIES_DIR: /tmp/release-binaries
226-
SPUR_TEST_BM_DEPLOY_DIR: trusted-repo/deploy/bare-metal
226+
SPUR_TEST_BM_DEPLOY_DIR: trusted-repo/deploy/native-host
227227
SPUR_TEST_BM_REMOTE_DIR: ${{ env.BM_REMOTE_BASE }}/gpu-single-node
228228
SPUR_TEST_BM_GPU_VENV: /opt/spur-ci/gpu-venv
229229
RUST_LOG: info
230-
run: /tmp/e2e-bin/spur-k8s-tests bare_metal::gpu::single_node --ignored --test-threads=1
230+
run: /tmp/e2e-bin/spur-k8s-tests native_host::gpu::single_node --ignored --test-threads=1
231231

232-
- name: Run multi-node GPU bare-metal tests
232+
- name: Run multi-node GPU native-host tests
233233
env:
234234
SPUR_TEST_BM_NODES: ${{ env.BM_NODES }}
235235
SPUR_TEST_BM_SSH_USER: ${{ secrets.BM_SSH_USER }}
236236
SPUR_TEST_BM_BINARIES_DIR: /tmp/release-binaries
237-
SPUR_TEST_BM_DEPLOY_DIR: trusted-repo/deploy/bare-metal
237+
SPUR_TEST_BM_DEPLOY_DIR: trusted-repo/deploy/native-host
238238
SPUR_TEST_BM_REMOTE_DIR: ${{ env.BM_REMOTE_BASE }}/gpu-multi-node
239239
SPUR_TEST_BM_GPU_VENV: /opt/spur-ci/gpu-venv
240240
RUST_LOG: info
241-
run: /tmp/e2e-bin/spur-k8s-tests bare_metal::gpu::multi_node --ignored --test-threads=1
241+
run: /tmp/e2e-bin/spur-k8s-tests native_host::gpu::multi_node --ignored --test-threads=1
242242

243243
- name: Collect cluster logs
244244
if: failure()
@@ -278,7 +278,7 @@ jobs:
278278
if: failure() && steps.scrub-logs.outcome == 'success'
279279
uses: actions/upload-artifact@v7
280280
with:
281-
name: bare-metal-logs
281+
name: native-host-logs
282282
path: /tmp/bm-logs/
283283
retention-days: 3
284284
if-no-files-found: ignore

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
cd ../..
8585
8686
mkdir -p "${DIST}/etc"
87-
cp deploy/bare-metal/spur.conf "${DIST}/etc/spur.conf.example"
87+
cp deploy/native-host/spur.conf "${DIST}/etc/spur.conf.example"
8888
8989
tar czf "${DIST}.tar.gz" "${DIST}"
9090
sha256sum "${DIST}.tar.gz" > "${DIST}.tar.gz.sha256"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
5555
# Include config + deploy examples
5656
mkdir -p "${DIST}/etc"
57-
cp deploy/bare-metal/spur.conf "${DIST}/etc/spur.conf.example"
57+
cp deploy/native-host/spur.conf "${DIST}/etc/spur.conf.example"
5858
5959
tar czf "${DIST}.tar.gz" "${DIST}"
6060
sha256sum "${DIST}.tar.gz" > "${DIST}.tar.gz.sha256"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spur run -- echo "hello from $(hostname)" # run a command
3131
spur queue # check the queue
3232
```
3333

34-
For production and multi-node deployments, see the [deployment guide](docs/deployment/bare-metal.rst).
34+
For production and multi-node deployments, see the [deployment guide](docs/deployment/native-host.rst).
3535

3636
## Documentation
3737

crates/spur-core/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ pub struct NotificationConfig {
580580
pub from_address: Option<String>,
581581
}
582582

583-
/// Job isolation configuration for bare-metal and container jobs.
583+
/// Job isolation configuration for native-host and container jobs.
584584
///
585585
/// Each layer operates independently and degrades gracefully when the
586586
/// kernel doesn't support it or spurd isn't running as root.
@@ -604,7 +604,7 @@ pub struct IsolationConfig {
604604
/// seccomp-BPF syscall filter (kernel 3.5+).
605605
#[serde(default = "default_true_fn")]
606606
pub seccomp: bool,
607-
/// Landlock filesystem access control (kernel 5.13+, bare-metal only).
607+
/// Landlock filesystem access control (kernel 5.13+, native-host only).
608608
#[serde(default = "default_true_fn")]
609609
pub landlock: bool,
610610
}

crates/spur-core/src/node.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ impl std::fmt::Display for NodeState {
197197
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
198198
#[serde(tag = "type")]
199199
pub enum NodeSource {
200-
/// Traditional bare-metal node running spurd.
200+
/// Traditional native-host node running spurd.
201201
#[default]
202-
BareMetal,
202+
NativeHost,
203203
/// Kubernetes node managed by the spur-k8s operator.
204204
Kubernetes { namespace: String },
205205
}
@@ -217,7 +217,7 @@ pub struct Node {
217217
#[serde(default)]
218218
pub admin_locked: bool,
219219
pub partitions: Vec<String>,
220-
/// Where this node comes from (bare-metal or K8s).
220+
/// Where this node comes from (native-host or K8s).
221221
#[serde(default)]
222222
pub source: NodeSource,
223223

crates/spur-k8s/src/heartbeat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const INTERVAL_SECS: u64 = 30;
1414

1515
/// Tracks the set of active K8s nodes and sends periodic `Heartbeat` RPCs
1616
/// to spurctld on their behalf, mirroring what `spurd`'s `reporter::heartbeat_loop`
17-
/// does for bare-metal nodes.
17+
/// does for native-host nodes.
1818
///
1919
/// `node_watcher` holds an `Arc<HeartbeatManager>` and calls `track`/`untrack`
2020
/// as nodes appear and disappear; the heartbeat task calls `run` under

crates/spur-tests/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ pub mod harness;
3636
// K8s integration tests (require a live cluster, run with `-- --ignored`)
3737
pub mod k8s;
3838

39-
// Bare-metal E2E tests (require SSH + nodes, run with `-- --ignored`)
40-
pub mod bare_metal;
39+
// Native-host E2E tests (require SSH + nodes, run with `-- --ignored`)
40+
pub mod native_host;
4141

4242
// Unit / component tests (no running daemons needed)
4343
pub mod t01_run;

crates/spur-tests/src/bare_metal/config.rs renamed to crates/spur-tests/src/native_host/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::path::PathBuf;
55

66
use anyhow::{bail, Result};
77

8-
/// Bare-metal test configuration from environment variables.
8+
/// Native-host test configuration from environment variables.
99
#[derive(Debug, Clone)]
1010
pub struct TestConfig {
1111
pub nodes: Vec<String>,

crates/spur-tests/src/bare_metal/fixture.rs renamed to crates/spur-tests/src/native_host/fixture.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ use super::ssh::SshNode;
1515

1616
const BM_BINARIES: [&str; 3] = ["spurctld", "spurd", "spur"];
1717

18-
/// Deployed bare-metal cluster for E2E tests.
19-
pub struct BareMetalFixture {
18+
/// Deployed native-host cluster for E2E tests.
19+
pub struct NativeHostFixture {
2020
pub config: TestConfig,
2121
pub nodes: Vec<SshNode>,
2222
pub node_names: Vec<String>,
@@ -29,7 +29,7 @@ pub struct BareMetalFixture {
2929
pub ssh_user: String,
3030
}
3131

32-
impl BareMetalFixture {
32+
impl NativeHostFixture {
3333
pub async fn deploy(config: TestConfig) -> Result<Self> {
3434
config.validate_binaries()?;
3535
info!("deploy: validated binaries");
@@ -152,7 +152,7 @@ impl BareMetalFixture {
152152

153153
info!("waiting for all nodes to become idle");
154154
fixture.wait_all_idle(Duration::from_secs(120)).await?;
155-
info!(nodes = ?fixture.node_names, "bare-metal cluster ready");
155+
info!(nodes = ?fixture.node_names, "native-host cluster ready");
156156
Ok(fixture)
157157
}
158158

@@ -305,7 +305,7 @@ impl BareMetalFixture {
305305
node.kill_processes("spurd").await?;
306306
node.rm_rf(&self.remote_dir).await?;
307307
}
308-
info!("bare-metal cluster torn down");
308+
info!("native-host cluster torn down");
309309
Ok(())
310310
}
311311

@@ -355,7 +355,7 @@ impl BareMetalFixture {
355355
/// compiled gpu_test binary, ephemeral venv with PyTorch, and generated
356356
/// job wrapper scripts that activate the venv.
357357
pub async fn ship_gpu_assets(&self) {
358-
let deploy = bare_metal_deploy_dir();
358+
let deploy = native_host_deploy_dir();
359359
let rd = &self.remote_dir;
360360
let venv_path = self.resolve_gpu_venv().await;
361361

@@ -702,7 +702,7 @@ memory_mb = 262144
702702
}
703703

704704
format!(
705-
r#"cluster_name = "bare-metal-ci"
705+
r#"cluster_name = "native-host-ci"
706706
707707
[scheduler]
708708
interval_secs = 1
@@ -749,14 +749,14 @@ pub fn parse_job_id(sbatch_output: &str) -> Option<u32> {
749749
.and_then(|s| s.parse().ok())
750750
}
751751

752-
/// Path to deploy/bare-metal scripts (respects `SPUR_TEST_BM_DEPLOY_DIR`).
753-
pub fn bare_metal_deploy_dir() -> std::path::PathBuf {
752+
/// Path to deploy/native-host scripts (respects `SPUR_TEST_BM_DEPLOY_DIR`).
753+
pub fn native_host_deploy_dir() -> std::path::PathBuf {
754754
if let Ok(dir) = std::env::var("SPUR_TEST_BM_DEPLOY_DIR") {
755755
return std::path::PathBuf::from(dir);
756756
}
757757
std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
758758
.parent()
759759
.and_then(|p| p.parent())
760-
.map(|p| p.join("deploy/bare-metal"))
761-
.unwrap_or_else(|| std::path::PathBuf::from("deploy/bare-metal"))
760+
.map(|p| p.join("deploy/native-host"))
761+
.unwrap_or_else(|| std::path::PathBuf::from("deploy/native-host"))
762762
}

0 commit comments

Comments
 (0)