diff --git a/.github/workflows/urunc-deploy-test.yml b/.github/workflows/urunc-deploy-test.yml index cd7a186a8..6c2a3e1c6 100644 --- a/.github/workflows/urunc-deploy-test.yml +++ b/.github/workflows/urunc-deploy-test.yml @@ -161,6 +161,7 @@ jobs: run: | docker exec urunc-deploy-test-control-plane ls -la /usr/local/bin/urunc || exit 1 docker exec urunc-deploy-test-control-plane ls -la /usr/local/bin/containerd-shim-urunc-v2 || exit 1 + docker exec urunc-deploy-test-control-plane ls -la /opt/urunc/bin/hluk || exit 1 - name: Deploy nginx-spt unikernel (arm64) if: matrix.arch == 'arm64' @@ -228,6 +229,36 @@ jobs: cat /tmp/logs.txt kubectl describe pod httpreply-fc-amd64 || true + - name: Deploy hello-hyperlight-unikraft unikernel (amd64) + if: matrix.arch == 'amd64' + run: | + cat < /host${urunc_config_file} + # The path of hluk is only kept when urunc-deploy installed it: until now + # hluk went on the PATH by hand, and a configured path that does not exist + # would hide a binary that does. URUNC_MONITORS_HYPERLIGHT_UNIKRAFT_PATH + # still sets it either way. + if ! printf '%s\n' "${hypervisors[@]}" | grep -qx hluk; then + sed -i '\|^path = "/opt/urunc/bin/hluk"$|d' /host${urunc_config_file} + fi override_urunc_config_from_env "/host${urunc_config_file}" echo "urunc configuration file installed at ${urunc_config_file}" } diff --git a/deployment/urunc-deploy/urunc-deploy/base/urunc-deploy.yaml b/deployment/urunc-deploy/urunc-deploy/base/urunc-deploy.yaml index 2166ea76f..aa8582617 100644 --- a/deployment/urunc-deploy/urunc-deploy/base/urunc-deploy.yaml +++ b/deployment/urunc-deploy/urunc-deploy/base/urunc-deploy.yaml @@ -48,7 +48,7 @@ spec: fieldRef: fieldPath: spec.nodeName - name: HYPERVISORS - value: "firecracker cloud-hypervisor qemu solo5-hvt solo5-spt" + value: "firecracker cloud-hypervisor qemu solo5-hvt solo5-spt hluk" - name: DEBUG value: "false" # Optional overrides for /etc/urunc/config.toml. Any URUNC_* variable diff --git a/docs/hypervisor-support.md b/docs/hypervisor-support.md index db32d08da..5a2b8bd66 100644 --- a/docs/hypervisor-support.md +++ b/docs/hypervisor-support.md @@ -298,6 +298,11 @@ install it: sudo install -m0755 hluk /usr/local/bin/hluk ``` +On Kubernetes, [`urunc-deploy`](../tutorials/How-to-urunc-on-k8s#urunc-deploy) +ships `hluk` and, with `hluk` in its `HYPERVISORS` list as it is by default, +installs it on every node under `/opt/urunc/bin` and points the configuration +it writes at it, so there is nothing to install by hand. + #### Hyperlight and `urunc` In the case of [Hyperlight](https://github.com/hyperlight-dev/hyperlight), diff --git a/docs/tutorials/How-to-urunc-on-k8s.md b/docs/tutorials/How-to-urunc-on-k8s.md index d6b73352b..38c847b33 100644 --- a/docs/tutorials/How-to-urunc-on-k8s.md +++ b/docs/tutorials/How-to-urunc-on-k8s.md @@ -230,7 +230,9 @@ During installation, the following steps take place: - The `urunc-deploy` Pod is deployed with privileges on the host, and the `containerd` configuration is mounted inside the Pod. - `urunc-deploy` performs the following tasks: * Copies `urunc` and `containerd-shim-urunc-v2` binaries to the host under `/usr/local/bin`. - * Copies hypervisor binaries to the host under `/opt/urunc/bin`. + * Copies the hypervisor binaries to the host under `/opt/urunc/bin`. The + `HYPERVISORS` environment variable of the DaemonSet names the ones to + install, all of them by default. * Copies QEMU data files to `/opt/urunc/share`. * Installs a configuration file at `/etc/urunc/config.toml`. * Registers `urunc` as a `containerd` runtime: with containerd 2.x through a