How to Configure Proxy when Fetching Patches

Livepatch on-prem server can fetch patches through a proxy. However, the configuration steps vary depending on the deployment platform.

Juju on machine (LXD)

If Livepatch on-prem has been deployed using Juju on machines (LXD), users need to run the following Juju configuration commands:

$ juju config livepatch \
    http_proxy=http://proxy.example.com \
    https_proxy=http://proxy.example.com

Juju on Microk8s

If Livepatch on-prem has been deployed using Juju on Microk8s, users need to run the following Juju configuration commands:

$ juju config livepatch \
    patch-sync.proxy.enabled=true \
    patch-sync.proxy.http=http://proxy.example.com \
    patch-sync.proxy.https=http://proxy.example.com

Snap deployments

If Livepatch on-prem has been deployed using Snap, users can run the following commands to configure proxy:

$ sudo snap set canonical-livepatch-server lp.patch-sync.proxy.enabled=true
$ sudo snap set canonical-livepatch-server lp.patch-sync.proxy.http=http://proxy.example.com
$ sudo snap set canonical-livepatch-server lp.patch-sync.proxy.https=http://proxy.example.com

You can see the applied configuration by running the following:

$ sudo snap get canonical-livepatch-server lp.patch-sync.proxy
Key                          Value
lp.patch-sync.proxy.enabled  true
lp.patch-sync.proxy.http     http://proxy.example.com
lp.patch-sync.proxy.https    http://proxy.example.com