Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .github/workflows/branch-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -569,22 +569,6 @@ jobs:
suite-name: additional-ca
test-name: additional_ca

podman-external-driver-e2e:
needs: [pr_metadata, build-binaries-linux, build-conformance, build-gateway-plain, build-external-drivers, build-images]
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
permissions:
actions: read
contents: read
packages: read
uses: ./.github/workflows/e2e-podman-test.yml
with:
prebuilt-conformance: true
image-tag: ${{ github.sha }}
gateway-artifact: openshell-gateway-plain-x86_64-unknown-linux-gnu
external-driver-binary: openshell-driver-podman
suite-matrix: >-
[{"suite":"external-driver","runner":"ubuntu-26.04","podman_major":"5","podman_package_version":"5.7.0+ds2-3build1","conmon_package_version":"2.1.13+ds1-2","cmd":"mise run --no-deps --skip-deps e2e:podman:external-driver"}]

vm-external-driver-e2e:
needs: [pr_metadata, build-binaries-linux, build-conformance, build-gateway-plain, build-vm-driver-linux]
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
Expand Down Expand Up @@ -785,7 +769,6 @@ jobs:
- podman-additional-ca-e2e
- vm-e2e
- vm-additional-ca-e2e
- podman-external-driver-e2e
- vm-external-driver-e2e
- kubernetes-e2e
- kubernetes-app-listener-e2e
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/e2e-podman-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ on:
required: false
type: boolean
default: false
external-driver-binary:
required: false
type: string
default: ""
suite-matrix:
required: true
type: string
Expand Down Expand Up @@ -63,11 +59,6 @@ jobs:
with:
artifact-name: ${{ inputs.gateway-artifact }}

- if: inputs.external-driver-binary != ''
uses: ./.github/actions/setup-e2e-driver
with:
binary: ${{ inputs.external-driver-binary }}

- uses: ./.github/actions/setup-e2e-podman
with:
podman-major: ${{ matrix.podman_major }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e-suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ jobs:
rows='[
{"environment":"ubuntu-docker-rootful","installer":"deb","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"ubuntu-docker-rootful","installer":"deb-external-docker-driver","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04","external_driver":true},
{"environment":"fedora-podman-rootful","installer":"rpm-external-podman-driver","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04","external_driver":true},
{"environment":"fedora-podman-rootless","installer":"rpm-external-podman-driver","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04","external_driver":true},
{"environment":"fedora-podman-rootful","installer":"rpm","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"fedora-podman-rootless","installer":"rpm","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"ubuntu-k3s","installer":"k3s","family":"conformance","package":"conformance","gateway":"tmachine","runner":"ubuntu-24.04"},
Expand Down
5 changes: 0 additions & 5 deletions tasks/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,6 @@ run = "e2e/rust/e2e-vm.sh"
description = "Build and launch-check openshell-gateway without compiled compute drivers"
run = "bash e2e/no-compute-driver-gateway.sh"

["e2e:podman:external-driver"]
description = "Run Podman conformance with a driver-free gateway and external Podman driver binary"
env = { OPENSHELL_E2E_EXTERNAL_COMPUTE_DRIVER = "1", OPENSHELL_E2E_PODMAN_FEATURES = "e2e-conformance-only" }
run = "e2e/rust/e2e-podman.sh"

["e2e:vm:external-driver"]
description = "Run VM E2E with a driver-free gateway and external VM driver binary"
env = { OPENSHELL_E2E_EXTERNAL_COMPUTE_DRIVER = "1" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@
# openshell_external_driver_name the name to register it under; a built-in
# driver's name cannot be selected over a socket
# The binary must be openshell-driver-<runtime> for the machine's container runtime
# (openshell_gateway_driver), which selects the settings in vars/<runtime>.yaml.
# (openshell_gateway_driver), which selects the settings in vars/<runtime>.yaml:
# openshell_external_driver_binary_name the installed executable's name
# openshell_external_driver_socket the compute socket the driver binds
# openshell_external_driver_args the runtime's own command-line arguments,
# after the common --bind-socket
# openshell_external_driver_requires the unit the service needs running first
# openshell_external_driver_config_template optional, for a driver that reads a
# configuration file
# openshell_external_driver_environment optional, extra Environment= entries
# openshell_external_driver_supplementary_groups optional
---
- name: Check the driver matches the container runtime
ansible.builtin.assert:
Expand Down Expand Up @@ -59,9 +68,10 @@
mode: "0755"

- name: Write the external driver configuration
when: openshell_external_driver_config_template is defined
become: true
ansible.builtin.template:
src: "driver-{{ openshell_gateway_driver }}.toml.j2"
src: "{{ openshell_external_driver_config_template }}"
dest: "/etc/openshell/driver-{{ openshell_external_driver_name }}.toml"
mode: "0644"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ SupplementaryGroups={{ openshell_external_driver_supplementary_groups }}
RuntimeDirectory=openshell-driver-{{ openshell_gateway_driver }}
Environment=OPENSHELL_SANDBOX_RUNTIME_IMAGE=docker.io/openshell/sandbox:tmachine
Environment=OPENSHELL_SUPERVISOR_IMAGE=docker.io/openshell/supervisor:tmachine
{% for entry in openshell_external_driver_environment | default([]) %}
Environment={{ entry }}
{% endfor %}
ExecStart=/usr/local/bin/{{ openshell_external_driver_binary_name }} \
--bind-socket {{ openshell_external_driver_socket }} \
--config /etc/openshell/driver-{{ openshell_external_driver_name }}.toml \
--gateway-bind {{ openshell_gateway_bind_address }}
--bind-socket {{ openshell_external_driver_socket }}{% for arg in openshell_external_driver_args %} \
{{ arg }}{% endfor %}

Restart=on-failure

[Install]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ openshell_external_driver_binary_name: openshell-driver-docker
openshell_external_driver_socket: /run/openshell-driver-docker/compute.sock
openshell_external_driver_supplementary_groups: docker
openshell_external_driver_requires: docker.service
openshell_external_driver_config_template: driver-docker.toml.j2
openshell_external_driver_args:
- --config
- "/etc/openshell/driver-{{ openshell_external_driver_name }}.toml"
- --gateway-bind
- "{{ openshell_gateway_bind_address }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# The Podman driver takes its settings as arguments, not a configuration file.
# It runs as the gateway's user: root for rootful Podman, and for rootless
# Podman the unprivileged user whose Podman socket it talks to. The rootless
# socket is a user unit, so the driver waits for that user's manager instead.
---
openshell_external_driver_binary_name: openshell-driver-podman
openshell_external_driver_socket: /run/openshell-driver-podman/compute.sock
openshell_external_driver_requires: >-
{{ ('user@' ~ openshell_gateway_uid ~ '.service')
if tmachine_container_runtime_is_rootless | bool else 'podman.socket' }}
openshell_external_driver_environment: >-
{{ ['XDG_RUNTIME_DIR=/run/user/' ~ openshell_gateway_uid]
if tmachine_container_runtime_is_rootless | bool else [] }}
openshell_external_driver_args:
- --podman-socket
- "{{ openshell_runtime_socket }}"
- --podman-tls-ca
- "{{ openshell_gateway_home }}/.local/state/openshell/tls/ca.crt"
- --gateway-port
- "17670"
- --network-name
- tmachine
80 changes: 50 additions & 30 deletions tests/tmachine/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,42 @@ let
openshell_sandbox_image = "../../artifacts/images/openshell-sandbox-tmachine.tar";
openshell_supervisor_image = "../../artifacts/images/openshell-supervisor-tmachine.tar";
};
# The packaged installers' inputs, shared with the ones that also run a
# compute driver as an external service.
debInputs = {
openshell_deb = "../../artifacts/packages/openshell.deb";
openshell_e2e_python_image = e2ePythonImage;
openshell_supervisor_image = "../../artifacts/images/openshell-supervisor-tmachine.tar";
openshell_sandbox_image = "../../artifacts/images/openshell-sandbox-tmachine.tar";
};
rpmInputs = {
openshell_rpm = "../../artifacts/packages/rpm/openshell.rpm";
openshell_gateway_rpm = "../../artifacts/packages/rpm/openshell-gateway.rpm";
openshell_e2e_python_image = e2ePythonImage;
openshell_supervisor_image = "../../artifacts/images/openshell-supervisor-tmachine.tar";
openshell_sandbox_image = "../../artifacts/images/openshell-sandbox-tmachine.tar";
};
# A packaged installer with the compute driver for the machine's container
# runtime run as an external service, built from the same revision as the
# gateway. The openshell_external_driver role reads the driver's settings
# for that runtime, so an installer for a driver works on any machine with
# that driver's runtime, such as both rootful and rootless Podman.
externalDriverInstaller =
{
package,
playbook,
inputs,
driver,
}:
{
name = "${package}-external-${driver}-driver";
use_galaxy = false;
playbooks = [ playbook ];
inputs = inputs // {
openshell_external_driver_binary = "../../artifacts/external-drivers/${gnuTarget}/openshell-driver-${driver}";
openshell_external_driver_name = "external";
};
};
fedoraPodman = podman: {
machine = "fedora";
driver = "podman";
Expand Down Expand Up @@ -202,30 +238,14 @@ let
playbooks = [
"ansible/playbooks/openshell-deb.yaml"
];
inputs = {
openshell_deb = "../../artifacts/packages/openshell.deb";
openshell_e2e_python_image = e2ePythonImage;
openshell_supervisor_image = "../../artifacts/images/openshell-supervisor-tmachine.tar";
openshell_sandbox_image = "../../artifacts/images/openshell-sandbox-tmachine.tar";
};
}
{
# The deb installer, with the Docker compute driver run as an external service,
# built from the same revision as the gateway.
name = "deb-external-docker-driver";
use_galaxy = false;
playbooks = [
"ansible/playbooks/openshell-deb.yaml"
];
inputs = {
openshell_deb = "../../artifacts/packages/openshell.deb";
openshell_e2e_python_image = e2ePythonImage;
openshell_external_driver_binary = "../../artifacts/external-drivers/${gnuTarget}/openshell-driver-docker";
openshell_external_driver_name = "external";
openshell_supervisor_image = "../../artifacts/images/openshell-supervisor-tmachine.tar";
openshell_sandbox_image = "../../artifacts/images/openshell-sandbox-tmachine.tar";
};
inputs = debInputs;
}
(externalDriverInstaller {
package = "deb";
driver = "docker";
playbook = "ansible/playbooks/openshell-deb.yaml";
inputs = debInputs;
})
{
# Installs the latest published release, as the baseline of an upgrade
# test, and stages the candidate under /var/lib/openshell-qualification
Expand All @@ -247,14 +267,14 @@ let
name = "rpm";
use_galaxy = false;
playbooks = [ "ansible/playbooks/openshell-rpm.yaml" ];
inputs = {
openshell_rpm = "../../artifacts/packages/rpm/openshell.rpm";
openshell_gateway_rpm = "../../artifacts/packages/rpm/openshell-gateway.rpm";
openshell_e2e_python_image = e2ePythonImage;
openshell_supervisor_image = "../../artifacts/images/openshell-supervisor-tmachine.tar";
openshell_sandbox_image = "../../artifacts/images/openshell-sandbox-tmachine.tar";
};
inputs = rpmInputs;
}
(externalDriverInstaller {
package = "rpm";
driver = "podman";
playbook = "ansible/playbooks/openshell-rpm.yaml";
inputs = rpmInputs;
})
];

testsuites = [
Expand Down
Loading