Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Container Canary - Lightning Talk

Container Canary - Lightning Talk

Q: What is Container Canary?
A: It’s a tool for validating container images

▪ You can define your container requirements as
specification that can be checked into version
control.
▪ Requirements are implemented as Checks that
follow the Kubernetes core.v1.Probes API.
▪ Using the canary CLI you can validate a
container against the specification.
▪ This effectively gives you unit tests for your
containers 🎉

Jacob Tomlinson

July 14, 2022
Tweet

More Decks by Jacob Tomlinson

Other Decks in Technology

Transcript

  1. SciPy 2022 Lightning Talk - Container Canary
    Jacob Tomlinson

    View Slide

  2. Regressions 😔
    Recently I made a change to the RAPIDS Docker image so that they could be used on the
    Kubeflow Notebooks platform. In doing so I broke an NVIDIA service.
    To avoid making my colleagues sad again in the future I built Container Canary.

    View Slide

  3. Q: What is Container Canary?
    ▪ You can define your container requirements as
    specification that can be checked into version
    control.
    ▪ Requirements are implemented as Checks that
    follow the Kubernetes core.v1.Probes API.
    ▪ Using the canary CLI you can validate a
    container against the specification.
    ▪ This effectively gives you unit tests for your
    containers 🎉
    A: It’s a tool for validating container
    images.

    View Slide

  4. Q: When is this useful?
    A: When building container images with the
    goal of them being used on different
    platforms.
    ▪ Many compute platforms support
    bring-your-own-container, but have some
    requirements the container must meet.
    ▪ Images may be expected to run services on
    specific ports, use a specific UID, use a
    specific working directory, etc.
    ▪ These requirements are often documented but
    not enforced in a technical way.
    ▪ Container Canary allows you to codify those
    requirements and test containers ahead of
    time

    View Slide

  5. Example: Binder
    Binder specifies requirements in it’s
    documentation for using your own container
    images in Binder environments.
    If your container doesn’t fulfil these
    requirements then the notebook job will fail
    to start and give you an error. But not
    necessarily tell you what went wrong.
    You might have an existing container image
    that you want to use with Binder, but you’ll
    need to manually check that you’ve done all
    the steps in the documentation to ensure it
    works.

    View Slide

  6. Example: Binder
    With Container Canary we can capture those
    requirements as a manifest. On the left you
    can see the example Binder manifest we
    provide in the GitHub repo.
    Now you can test your container before you
    try to use it with Binder and identify
    exactly which requirement is failing.
    Below is an example of validating the
    Docker image I used for my GPU Python
    tutorial yesterday.

    View Slide

  7. How can you help?
    ● Test your containers!
    ● Star the project
    ● Put your manifests on GitHub for
    others to enjoy

    View Slide

  8. Thank you!

    View Slide