Skip to content

Commit 0659fed

Browse files
committed
test(upgrade): use runtime image environment overrides
Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent 6062440 commit 0659fed

8 files changed

Lines changed: 74 additions & 16 deletions

File tree

‎.github/workflows/branch-e2e.yml‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -220,18 +220,6 @@ jobs:
220220
packages: write
221221
uses: ./.github/workflows/build-images.yml
222222

223-
build-deb:
224-
name: Build Debian packages
225-
needs: [pr_metadata, version, build-binaries, build-vm-driver]
226-
if: needs.pr_metadata.outputs.run_integration == 'true'
227-
permissions:
228-
contents: read
229-
packages: read
230-
uses: ./.github/workflows/deb-package.yml
231-
with:
232-
checkout-ref: ${{ github.sha }}
233-
deb-version: ${{ needs.version.outputs.deb_version }}
234-
235223
build-rpm:
236224
name: Build RPM packages
237225
needs: [pr_metadata, version, build-binaries]

‎crates/openshell-server/src/storage_proto.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ mod tests {
136136
// decoding or deadline updates cannot claim an existing attempt.
137137
// NetworkEndpoint retains pre.4 string fields and uses new tags for enums.
138138
const PUBLIC_RPC_SCHEMA_SHA256: &str =
139-
"18206c52e68fdb0af60f8bb8dfaf47d9bc8021222cb49cacffab6352d3ad5549";
139+
"75dc8ba3eea1457d0ffed3a2eee1a0ea471e3cb5743b819d7707592805ebf01a";
140140
const DURABLE_SCHEMA_SHA256: &str =
141-
"76487ab369fc3a4b03a179bb5e7ea6be8d20e380ad5563075dff8ee50e539406";
141+
"56baed61dd3b61272e648d60fcb6b37f4a71c6c6b192f1e3cb086f28df420bf1";
142142
const PUBLIC_DURABLE_OVERLAP_SHA256: &str =
143143
"761dea31a521b0650840fe2a823ad6e36a265ed323ba4506889781d630df0ee3";
144144
// A persisted Sandbox without endpoint status retains its lifecycle fields;

‎tests/ansible/playbooks/openshell-deb-upgrade-source.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
---
55
- name: Install prerelease OpenShell Debian upgrade source
66
ansible.builtin.import_playbook: openshell-deb.yaml
7+
vars:
8+
openshell_packaged_gateway_legacy_images: true
79

810
- name: Record OpenShell Debian upgrade source
911
hosts: all

‎tests/ansible/playbooks/openshell-rpm-upgrade-source.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
---
55
- name: Install prerelease OpenShell RPM upgrade source
66
ansible.builtin.import_playbook: openshell-rpm.yaml
7+
vars:
8+
openshell_packaged_gateway_legacy_images: true
79

810
- name: Record OpenShell RPM upgrade source
911
hosts: all

‎tests/ansible/playbooks/upgrade/deb.yaml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@
9999
deb: /var/tmp/openshell-upgrade-target.deb
100100
allow_downgrade: true
101101

102+
- name: Select candidate runtime images through the package environment
103+
ansible.builtin.copy:
104+
dest: /home/tmachine/.config/openshell/gateway.env
105+
mode: "0600"
106+
content: |
107+
OPENSHELL_COMPUTE_DRIVER=docker
108+
OPENSHELL_SANDBOX_RUNTIME_IMAGE=docker.io/openshell/sandbox:tmachine
109+
OPENSHELL_SUPERVISOR_IMAGE=docker.io/openshell/supervisor:tmachine
110+
102111
- name: Restart packaged OpenShell gateway service
103112
ansible.builtin.systemd_service:
104113
name: openshell-gateway.service
@@ -178,7 +187,7 @@
178187
sudo docker logs "${container}" 2>&1
179188
done
180189
sudo docker images
181-
sudo cat /var/lib/openshell-qualification/gateway.toml
190+
cat /home/tmachine/.config/openshell/gateway.env
182191
args:
183192
executable: /bin/bash
184193
environment: "{{ user_systemd_environment }}"

‎tests/ansible/playbooks/upgrade/rpm.yaml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@
135135
disable_gpg_check: true
136136
allow_downgrade: true
137137

138+
- name: Select candidate runtime images through the package environment
139+
ansible.builtin.copy:
140+
dest: /home/tmachine/.config/openshell/gateway.env
141+
mode: "0600"
142+
content: |
143+
OPENSHELL_COMPUTE_DRIVER=podman
144+
OPENSHELL_SANDBOX_RUNTIME_IMAGE=docker.io/openshell/sandbox:tmachine
145+
OPENSHELL_SUPERVISOR_IMAGE=docker.io/openshell/supervisor:tmachine
146+
138147
- name: Restart packaged OpenShell gateway service
139148
ansible.builtin.systemd_service:
140149
name: openshell-gateway.service
@@ -221,7 +230,7 @@
221230
podman logs "${container}" 2>&1
222231
done
223232
podman images
224-
sudo cat /var/lib/openshell-qualification/gateway.toml
233+
cat /home/tmachine/.config/openshell/gateway.env
225234
args:
226235
executable: /bin/bash
227236
environment: "{{ user_systemd_environment }}"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
---
5+
# pre.4 predates runtime-image environment overrides.
6+
- name: Create legacy upgrade source metadata directory
7+
become: true
8+
ansible.builtin.file:
9+
path: /var/lib/openshell-qualification
10+
state: directory
11+
owner: root
12+
group: root
13+
mode: "0755"
14+
15+
- name: Configure legacy upgrade source runtime images
16+
become: true
17+
ansible.builtin.copy:
18+
dest: /var/lib/openshell-qualification/gateway.toml
19+
owner: root
20+
group: root
21+
mode: "0644"
22+
content: |
23+
[openshell]
24+
version = 2
25+
26+
[openshell.gateway]
27+
compute_driver = "{{ openshell_gateway_driver }}"
28+
29+
[openshell.drivers.{{ openshell_gateway_driver }}]
30+
{% if openshell_gateway_driver == 'podman' %}
31+
socket_path = "{{ openshell_runtime_socket }}"
32+
{% endif %}
33+
sandbox_runtime_image = "docker.io/openshell/sandbox:tmachine"
34+
supervisor_image = "docker.io/openshell/supervisor:tmachine"
35+
36+
- name: Select legacy upgrade source configuration
37+
become: true
38+
ansible.builtin.copy:
39+
dest: "{{ openshell_gateway_home }}/.config/openshell/gateway.env"
40+
owner: "{{ openshell_gateway_user }}"
41+
group: "{{ openshell_gateway_user }}"
42+
mode: "0600"
43+
content: |
44+
OPENSHELL_GATEWAY_CONFIG=/var/lib/openshell-qualification/gateway.toml

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
OPENSHELL_SANDBOX_RUNTIME_IMAGE=docker.io/openshell/sandbox:tmachine
4646
OPENSHELL_SUPERVISOR_IMAGE=docker.io/openshell/supervisor:tmachine
4747
48+
- name: Prepare legacy upgrade source image configuration
49+
when: openshell_packaged_gateway_legacy_images | default(false) | bool
50+
ansible.builtin.include_tasks: legacy-images.yaml
51+
4852
- name: Start gateway user manager
4953
ansible.builtin.include_role:
5054
name: tmachine_user_manager

0 commit comments

Comments
 (0)