This repository contains the Canonical Livepatch Server Juju charms for Kubernetes and machines. Livepatch Server serves kernel patches and their metadata to clients, allowing administrators to control patch rollout across their infrastructure.
For an on-prem deployment including the server's dependencies, use the Livepatch on-prem bundle instead of deploying a server charm on its own.
Deploy the charm appropriate for your Juju model:
# In a Kubernetes model
juju deploy canonical-livepatch-server-k8s# In a machine model
juju deploy canonical-livepatch-server-vmThe server requires PostgreSQL. The Kubernetes and machine charms use different endpoint names:
# In a Kubernetes model
juju deploy postgresql-k8s --trust
juju integrate canonical-livepatch-server-k8s:postgresql postgresql-k8s:database# In a machine model
juju deploy postgresql
juju integrate canonical-livepatch-server-vm:database postgresql:databaseSee the Kubernetes and machine charm READMEs for other integrations.
The charms share Python modules in shared/livepatch_common/ and Grafana
dashboards in shared/grafana_dashboards/. Charmcraft builds within each charm
directory, so these sources must be staged inside the charm trees before
packing or running per-charm tests:
make syncThe copies in livepatch-k8s-operator/src/livepatch_common/,
livepatch-machine-operator/src/livepatch_common/, and the charms' dashboard
directories are generated. Edit shared/, not the copies, and rerun
make sync after changes.
Build both charms with opcli (preferred), or pack them with Charmcraft:
make opcli-build
# Or:
make packBoth targets run make sync automatically. Every Make target that packs or
tests a charm now runs make sync first — including the per-charm targets
(make operator-prod-k8s for Kubernetes, make build-machine-charm,
make unit-test, and make integration-test for machine) — so the staged
copies can't go stale. You only need to run make sync by hand if you invoke
charmcraft pack or tox directly instead of through a Make target. The
artifacts are:
livepatch-k8s-operator/canonical-livepatch-server-k8s_amd64.charmlivepatch-machine-operator/canonical-livepatch-server_ubuntu@22.04-amd64.charm
Run every unit test suite from the repository root:
make unit-testThat runs the shared-module tests plus each charm's unit tests, syncing the shared sources into the charm trees first. To run a single suite:
make unit-test-shared # shared/tests against shared/livepatch_common
make unit-test-k8s # livepatch-k8s-operator
make unit-test-machine # livepatch-machine-operatorThese charms are distributed under the Apache License, Version 2.0. See LICENSE for details.