Skip to content

Simplify rock testing with containerd #410

@sed-i

Description

@sed-i

Currently, the rock testing workflow depends on microk8s registry, skopeo copying the rock to the microk8s local registry, and using kgoss.
Recently we started seeing timeout failures.

sudo concierge prepare -p microk8s --extra-snaps rockcraft,just,kubectl

However,

  • We now use "k8s" rather than "microk8s", so testing this locally means deploying a dedicated VM with conierge prepare -p microk8s instead of -p dev.
  • The current approach has many dependencies which are fragmented across this repo and the rock's justfile.
  • Use of kgoss with the microk8s registry is yet another level of indirection which complicates things.

We can accomplish the same with a single dependency - containerd - regardless of which k8s is installed, for example:

sudo ctr image import --base-name grafana/agent grafana-agent_0.44.6_amd64.rock
sudo ctr run --net-host -d grafana/agent:0.44.6 ga

# Run regular goss here
curl localhost:12345/agent/api/v1/targets

sudo ctr task kill ga
sudo ctr container rm ga

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions