Skip to content
Open
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
145 changes: 70 additions & 75 deletions .github/workflows/e2e-suites.yml

Large diffs are not rendered by default.

22 changes: 5 additions & 17 deletions tests/tmachine/ansible/playbooks/drivers/podman/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
HOME: /home/tmachine
XDG_RUNTIME_DIR: /run/user/1000

# The binaries installer runs a plain-HTTP gateway named tmachine from a
# system service and puts the CLI in /usr/local/bin. The package installers
# run the packaged user service, install the CLI in /usr/bin and register
# the gateway as openshell, using the package default network and namespace.
# The binaries installer runs a plain-HTTP gateway from a system service
# and puts the CLI in /usr/local/bin. The package installers run the
# packaged user service and install the CLI in /usr/bin. Both register the
# gateway as openshell, using the default network and namespace.
- name: Detect the installer
ansible.builtin.stat:
path: /usr/local/bin/openshell
Expand All @@ -61,19 +61,7 @@
ansible.builtin.set_fact:
podman_e2e_binaries: "{{ podman_e2e_binaries_cli.stat.exists }}"
podman_e2e_cli: "{{ '/usr/local/bin/openshell' if podman_e2e_binaries_cli.stat.exists else '/usr/bin/openshell' }}"
podman_e2e_gateway: "{{ 'tmachine' if podman_e2e_binaries_cli.stat.exists else 'openshell' }}"

- name: Remove any previous OpenShell gateway registration
when: podman_e2e_binaries
ansible.builtin.command:
argv: [/usr/local/bin/openshell, gateway, remove, tmachine]
changed_when: false
failed_when: false

- name: Register the configured OpenShell gateway
when: podman_e2e_binaries
ansible.builtin.command:
argv: [/usr/local/bin/openshell, gateway, add, http://127.0.0.1:17670, --local, --name, tmachine]
podman_e2e_gateway: openshell

- name: Run Podman E2E archive tests
ansible.builtin.command:
Expand Down
8 changes: 5 additions & 3 deletions tests/tmachine/ansible/playbooks/openshell-k3s-ha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
hosts: all
become: true
gather_facts: false
vars:
openshell_client_gateway_name: openshell
tasks:
# The chart's server certificate covers the Service DNS name but not its
# ClusterIP, and the node resolver cannot reach cluster DNS.
Expand All @@ -75,7 +77,7 @@

- name: Create guest mTLS directory
ansible.builtin.file:
path: /home/tmachine/.config/openshell/gateways/tmachine/mtls
path: "/home/tmachine/.config/openshell/gateways/{{ openshell_client_gateway_name }}/mtls"
state: directory
owner: tmachine
group: tmachine
Expand All @@ -84,7 +86,7 @@
- name: Write guest client TLS bundle
ansible.builtin.copy:
content: "{{ (k3s_client_tls.stdout | from_json).data[item] | b64decode }}"
dest: "/home/tmachine/.config/openshell/gateways/tmachine/mtls/{{ item }}"
dest: "/home/tmachine/.config/openshell/gateways/{{ openshell_client_gateway_name }}/mtls/{{ item }}"
owner: tmachine
group: tmachine
mode: "0600"
Expand All @@ -95,7 +97,7 @@
- name: Remove baseline guest gateway registration
become: false
ansible.builtin.command:
argv: [/usr/local/bin/openshell, gateway, remove, tmachine]
argv: [/usr/local/bin/openshell, gateway, remove, "{{ openshell_client_gateway_name }}"]

- name: Register guest gateway
ansible.builtin.include_role:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
- "{{ openshell_client_gateway_endpoint | default('http://127.0.0.1:17670') }}"
- --local
- --name
- "{{ openshell_client_gateway_name | default('tmachine') }}"
- "{{ openshell_client_gateway_name | default('openshell') }}"
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
[openshell.drivers.docker]
socket_path = "{{ openshell_runtime_socket }}"
image_pull_policy = "if_not_present"
sandbox_label = "tmachine"
sandbox_label = "openshell"
grpc_endpoint = "http://127.0.0.1:17670"
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[openshell.drivers.podman]
socket_path = "{{ openshell_runtime_socket }}"
image_pull_policy = "if_not_present"
network_name = "tmachine"
network_name = "openshell"
health_check_interval_secs = 10
stop_timeout_secs = 15
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ allow_unauthenticated_users = true
signing_key_path = "/var/lib/openshell/pki/jwt/signing.pem"
public_key_path = "/var/lib/openshell/pki/jwt/public.pem"
kid_path = "/var/lib/openshell/pki/jwt/kid"
gateway_id = "tmachine"
gateway_id = "openshell"

{% block driver %}{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,3 @@
name: openshell_client
vars:
openshell_client_gateway_endpoint: https://127.0.0.1:17670
openshell_client_gateway_name: openshell
Loading