Skip to content

Commit d532b5c

Browse files
committed
ci(release): update ubuntu release canary variants
Split the `ubuntu` release canary into three jobs: - `ubuntu-deb`: test that `install.sh` installs the OpenShell .deb package on Ubuntu when snapd is not present. - `ubuntu-deb-native-docker`: test that `install.sh` installs the OpenShell .deb package on Ubuntu when a native docker daemon is present -- this will change when snapd 2.77 is released to the `latest/stable` channel, which will allow the `openshell` snap to connect to non-snap Docker daemons; this job will then be renamed to `ubuntu-snap-native-docker`. - `ubuntu-snap-without-docker`: test that `install.sh` installs both the `openshell` and `docker` snaps if snapd is present and there is no Docker daemon installed. In all variants, the canary tests that `openshell status` succeeds after installation. Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
1 parent bef7411 commit d532b5c

2 files changed

Lines changed: 90 additions & 55 deletions

File tree

‎.agents/skills/test-release-canary/SKILL.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ The Release Canary (`.github/workflows/release-canary.yml`) smoke-tests the arti
1212
| Job | Runner | Verifies |
1313
|---|---|---|
1414
| `macos` | `macos-latest-xlarge` | `install.sh` resolves the Homebrew formula, brew installs the cask, and `openshell status` reaches the brew-services–backed local gateway with the VM driver. |
15-
| `ubuntu` | `ubuntu-latest` | `install.sh` installs the Debian package, the post-install systemd user service starts, and `openshell status` reaches the local gateway with the Docker driver. |
15+
| `ubuntu-deb-native-docker` | `ubuntu-latest` | `install.sh` auto-detects the Debian package when both snapd and native Docker are present, installs the deb, the post-install systemd user service starts, and `openshell status` reaches the local gateway with the Docker driver. Once snapd 2.77 is released to `latest/stable`, `install.sh` should install the `openshell` snap here instead, even with native Docker present. This job should then be renamed to `ubuntu-snap-native-docker`, and its purpose will be to verify that the openshell snap installs and works when a native (non-snap) Docker is already present on the system. |
16+
| `ubuntu-deb` | `ubuntu-latest` | `install.sh` installs the Debian package after snapd is fully removed (forcing the deb path), starts the systemd user service, and `openshell status` reaches the local gateway with the Docker driver. |
17+
| `ubuntu-snap-without-docker` | `ubuntu-latest` | `install.sh` auto-detects and installs both the `openshell` and `docker` snaps from the Snap Store when snapd is present and there is no Docker daemon on the system, the gateway daemon starts with auto-connected interfaces, and `openshell status` reaches the local gateway. |
1618
| `fedora` | `fedora:latest` container | `install.sh` installs the RPM packages, the local gateway starts under Podman, and `openshell status` succeeds. |
1719
| `kubernetes` | `ubuntu-latest` + kind | `helm install oci://ghcr.io/nvidia/openshell/helm-chart --version 0.0.0-dev` succeeds in a kind cluster, the gateway pod becomes Ready, port-forward exposes 8080, and the released CLI registers the in-cluster gateway and runs `openshell status` against it. |
1820

@@ -107,8 +109,9 @@ Loopback registration auto-derives the gateway name to `openshell` if `--name` i
107109

108110
| Symptom | Likely cause | Where to look |
109111
|---|---|---|
110-
| `macos`/`ubuntu`/`fedora` job fails on `install.sh` | Latest tagged release missing an asset, checksum mismatch, or `install.sh` regression on this branch. | Job log around the `curl … install.sh \| sh` step. |
111-
| `macos`/`ubuntu`/`fedora` job fails on `openshell status` | Local gateway service did not start (systemd/brew/podman). Often a driver issue. | Service logs in the job log; `OPENSHELL_DRIVERS` env in the "Ensure …" step. |
112+
| `macos`/`ubuntu-deb-native-docker`/`ubuntu-deb`/`fedora` job fails on `install.sh` | Latest tagged release missing an asset, checksum mismatch, or `install.sh` regression on this branch. | Job log around the `curl … install.sh \| sh` step. |
113+
| `macos`/`ubuntu-deb-native-docker`/`ubuntu-deb`/`fedora` job fails on `openshell status` | Local gateway service did not start (systemd/brew/podman). Often a driver issue. | Service logs in the job log; `OPENSHELL_DRIVERS` env in the "Ensure …" step. |
114+
| `ubuntu-snap-without-docker` job fails on `openshell status` | Snap gateway daemon did not start. | `snap services openshell` and `snap logs openshell.gateway` in the job log. |
112115
| `kubernetes` job fails on `helm install --wait` | Chart did not deploy in 5 min — usually image pull failure or readiness probe failing. | "Diagnostics on failure" step dumps `helm status`, manifest, pod describe, pod logs. |
113116
| `kubernetes` job fails on `kubectl wait` | Gateway pod stuck `CrashLoopBackOff` or `ImagePullBackOff`. | Diagnostics dump; check `:dev` image existence at `ghcr.io/nvidia/openshell/gateway`. |
114117
| `kubernetes` job fails on `openshell gateway add` or `status` | Port-forward not reachable, or CLI/gateway proto mismatch. | `port-forward.log` and `openshell gateway list` in the diagnostics dump. |

‎.github/workflows/release-canary.yml‎

Lines changed: 84 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,17 @@ jobs:
3030
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/${{ github.event.workflow_run.head_sha || github.sha }}/install.sh | sh
3131
openshell status
3232
33-
ubuntu:
34-
name: Ubuntu Docker
33+
ubuntu-deb-native-docker:
34+
name: Ubuntu (native Docker)
3535
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
3636
runs-on: ubuntu-latest
3737
timeout-minutes: 20
38+
# TODO: Once snapd 2.77 is released to latest/stable, the openshell snap
39+
# will be able to connect to system Docker via the docker interface,
40+
# removing the requirement for the docker snap. At that point,
41+
# install.sh should select snap here even with native Docker present.
42+
# Rename this job to `ubuntu-snap-native-docker`, replace the dpkg
43+
# assertion below with `snap list openshell`.
3844
steps:
3945
- name: Ensure Docker
4046
run: |
@@ -50,6 +56,82 @@ jobs:
5056
- name: Install and check status
5157
run: |
5258
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/${{ github.event.workflow_run.head_sha || github.sha }}/install.sh | sh
59+
# Expected to fail once snapd 2.77 is in latest/stable, at which
60+
# point install.sh should select snap instead of deb here.
61+
dpkg -l openshell | grep '^ii'
62+
openshell --version
63+
systemctl --user is-active openshell-gateway
64+
openshell status
65+
66+
ubuntu-deb:
67+
name: Ubuntu Debian package
68+
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
69+
runs-on: ubuntu-latest
70+
timeout-minutes: 20
71+
steps:
72+
- name: Remove snapd
73+
run: |
74+
set -euo pipefail
75+
# Remove all snaps in a single transaction. Core bases and content
76+
# providers cannot be removed before snaps that consume them, so
77+
# removing one at a time fails; snap handles ordering within a
78+
# single `snap remove` invocation.
79+
snaps=$(snap list 2>/dev/null | awk 'NR>1 {print $1}')
80+
if [ -n "$snaps" ]; then
81+
sudo snap remove $snaps
82+
fi
83+
sudo apt-get -y --purge remove snapd
84+
! command -v snap >/dev/null 2>&1
85+
86+
- name: Ensure Docker
87+
run: |
88+
if ! command -v docker >/dev/null 2>&1; then
89+
sudo apt-get update
90+
sudo apt-get install -y docker.io
91+
fi
92+
sudo systemctl start docker || sudo service docker start
93+
mkdir -p "${HOME}/.config/openshell"
94+
printf 'OPENSHELL_DRIVERS=docker\n' > "${HOME}/.config/openshell/gateway.env"
95+
docker info
96+
97+
- name: Install and check status
98+
run: |
99+
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/${{ github.event.workflow_run.head_sha || github.sha }}/install.sh | sh
100+
dpkg -l openshell | grep '^ii'
101+
openshell --version
102+
systemctl --user is-active openshell-gateway
103+
openshell status
104+
105+
ubuntu-snap-without-docker:
106+
name: Ubuntu without Docker preinstalled
107+
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
108+
runs-on: ubuntu-latest
109+
timeout-minutes: 20
110+
steps:
111+
- name: Ensure snapd
112+
run: |
113+
set -euo pipefail
114+
sudo apt-get update
115+
sudo apt-get install -y snapd
116+
sudo systemctl enable --now snapd.socket
117+
sudo systemctl start snapd
118+
sudo snap wait system seed.loaded
119+
120+
- name: Remove native Docker
121+
run: |
122+
set -euo pipefail
123+
sudo systemctl stop docker.service docker.socket 2>/dev/null || true
124+
sudo apt-get -y --purge remove docker-ce docker-ce-cli containerd.io \
125+
docker-buildx-plugin docker-compose-plugin docker.io 2>/dev/null || true
126+
! command -v docker >/dev/null 2>&1
127+
128+
- name: Install and check status
129+
run: |
130+
set -euo pipefail
131+
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/${{ github.event.workflow_run.head_sha || github.sha }}/install.sh | sh
132+
snap list openshell
133+
openshell --version
134+
sudo snap services openshell
53135
openshell status
54136
55137
fedora:
@@ -145,56 +227,6 @@ jobs:
145227
run: |
146228
docker rm -f "${FEDORA_CANARY_CONTAINER}" >/dev/null 2>&1 || true
147229
148-
ubuntu-snap:
149-
name: Ubuntu Snap
150-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
151-
runs-on: ubuntu-latest
152-
timeout-minutes: 20
153-
steps:
154-
- name: Install snapd
155-
run: |
156-
set -euo pipefail
157-
sudo apt-get update
158-
sudo apt-get install -y snapd
159-
sudo systemctl enable --now snapd.socket
160-
sudo systemctl start snapd
161-
sudo snap wait system seed.loaded
162-
163-
- name: Install Docker snap
164-
run: |
165-
set -euo pipefail
166-
sudo snap install docker
167-
168-
- name: Download snap from release-dev artifacts
169-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
170-
with:
171-
github-token: ${{ github.token }}
172-
run-id: ${{ github.event.workflow_run.id }}
173-
pattern: snap-linux-amd64
174-
path: release/
175-
merge-multiple: true
176-
177-
- name: Install snap (dangerous — from release, not store)
178-
run: |
179-
set -euo pipefail
180-
sudo snap install ./release/*.snap --dangerous
181-
182-
- name: Connect interfaces
183-
run: |
184-
set -euo pipefail
185-
sudo snap connect openshell:docker docker:docker-daemon
186-
sudo snap connect openshell:log-observe
187-
sudo snap connect openshell:system-observe
188-
189-
- name: Register snap gateway and check status
190-
run: |
191-
set -euo pipefail
192-
openshell --version
193-
sudo snap services openshell
194-
openshell gateway add http://127.0.0.1:17670 --local --name snap-docker
195-
openshell gateway select snap-docker
196-
openshell status
197-
198230
kubernetes:
199231
name: Kubernetes Helm (kind)
200232
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}

0 commit comments

Comments
 (0)