Skip to content

Commit 1f66076

Browse files
committed
fix(tmachine): use local runtime images for Docker
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
1 parent 2154a75 commit 1f66076

6 files changed

Lines changed: 39 additions & 20 deletions

File tree

‎architecture/build.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,8 @@ the required roles and their dependencies before running playbooks.
258258
The `tests/artifacts.nix` helpers build the CLI, conformance CLI, and sandbox
259259
with musl, and the gateway and supervisor with GNU. Image assembly stages
260260
the gateway, sandbox, and supervisor as separate binaries for their respective
261-
Dockerfiles. The Fedora Podman scenarios import both local runtime images and
262-
configure the gateway to use them. The Ubuntu Docker scenario takes the sandbox
263-
binary directly as an input to its VM installation playbook.
261+
Dockerfiles. The Ubuntu Docker and Fedora Podman scenarios import both local
262+
runtime images and configure the gateway to use them.
264263

265264
## Python Wheel Packaging
266265

‎tests/ansible/playbooks/openshell.yaml‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99
- name: Wait for SSH
1010
ansible.builtin.wait_for_connection:
1111

12-
- name: Create OpenShell library directory
13-
become: true
14-
ansible.builtin.file:
15-
path: /usr/local/libexec/openshell
16-
state: directory
17-
mode: "0755"
18-
1912
- name: Install OpenShell CLI
2013
become: true
2114
ansible.builtin.copy:
@@ -29,11 +22,3 @@
2922
src: "{{ openshell_gateway_binary }}"
3023
dest: /usr/local/bin/openshell-gateway
3124
mode: "0755"
32-
33-
- name: Install OpenShell sandbox supervisor
34-
become: true
35-
ansible.builtin.copy:
36-
src: "{{ openshell_sandbox_binary }}"
37-
dest: /usr/local/libexec/openshell/openshell-sandbox
38-
mode: "0755"
39-
when: openshell_sandbox_binary is defined
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
---
5+
- name: Copy OpenShell runtime images
6+
become: true
7+
ansible.builtin.copy:
8+
src: "{{ item.src }}"
9+
dest: "/var/lib/openshell/{{ item.name }}.tar"
10+
owner: "{{ openshell_gateway_user }}"
11+
group: "{{ openshell_gateway_user }}"
12+
mode: "0600"
13+
loop:
14+
- name: sandbox
15+
src: "{{ openshell_sandbox_image }}"
16+
- name: supervisor
17+
src: "{{ openshell_supervisor_image }}"
18+
19+
- name: Load OpenShell runtime images
20+
become: true
21+
ansible.builtin.command:
22+
argv:
23+
- docker
24+
- load
25+
- --input
26+
- "/var/lib/openshell/{{ item }}.tar"
27+
loop:
28+
- sandbox
29+
- supervisor

‎tests/ansible/roles/openshell_gateway/tasks/main.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
group: "{{ openshell_gateway_user }}"
1515
mode: "0700"
1616

17+
- name: Prepare Docker gateway
18+
ansible.builtin.include_tasks: docker.yaml
19+
when: openshell_gateway_driver == "docker"
20+
1721
- name: Prepare Podman gateway
1822
ansible.builtin.include_tasks: podman.yaml
1923
when: openshell_gateway_driver == "podman"

‎tests/ansible/roles/openshell_gateway/templates/gateway-docker.toml.j2‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ default_image = "ghcr.io/nvidia/openshell-community/sandboxes/base:latest"
88
image_pull_policy = "if_not_present"
99
sandbox_label = "tmachine"
1010
grpc_endpoint = "http://host.openshell.internal:17670"
11-
supervisor_bin = "/usr/local/libexec/openshell/openshell-sandbox"
11+
sandbox_runtime_image = "docker.io/openshell/sandbox:tmachine"
12+
supervisor_image = "docker.io/openshell/supervisor:tmachine"
1213
{% endblock %}

‎tests/config.nix‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ let
4848
inputs = {
4949
openshell_cli_binary = "../target/${muslTarget}/debug/openshell";
5050
openshell_gateway_binary = "../target/${gnuTarget}/debug/openshell-gateway";
51-
openshell_sandbox_binary = "../target/${muslTarget}/debug/openshell-sandbox";
51+
openshell_supervisor_image = "../artifacts/images/openshell-supervisor-tmachine.tar";
52+
openshell_sandbox_image = "../artifacts/images/openshell-sandbox-tmachine.tar";
5253
};
5354
};
5455
}

0 commit comments

Comments
 (0)