Snap Store Proxy

  • Wouter van Bommel
Channel Revision Published Runs on
latest/stable 7 27 Apr 2022
Ubuntu 20.04
latest/edge 11 22 May 2024
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04
juju deploy snap-store-proxy
Show information

Platform:

Ubuntu
24.04 22.04 20.04

This charm will install a snap-store-proxy on local premises. In order to do this, a registration bundle is required. This registration bundle can be obtained via the snap store-admin.

The charm can be installed in two ways. The preferred way is to use the snap-store itself, which means that the machine instances on which the snap-store-proxy-charm is installed, needs to be to connect to the store.

The other way is, to download the snap-store-proxy*.snap and the core20-*.snap and attach these as resources to the snap-store-proxy-charm during installation. After installation a resource can be updates via juju, by attaching a newer resource. This will be the only way to update the charm.

It is not possible to switch between these 2 modes of installation.

Basic install

An example juju-bundle, that can be used for installation:

applications:
  postgresql:
    charm: ch:postgresql
    channel: stable
    num_units: 1
  snap-store-proxy:
    charm: ch:snap-store-proxy-charm
    num_units: 1

relations:
- - postgresql:db-admin
  - snap-store-proxy:db-admin

Resource based install

When using a resource based install the core20 an snap-store-proxy snap’s can be downloaded via the command: snap download core20 and snap download snap-store-proxy. Once this is done the following juju bundle can be used for installation.

applications:
  postgresql:
    charm: ch:postgresql
    channel: stable
    num_units: 1
  snap-store-proxy:
    num_units: 1
    resources:
      snap-store-proxy: snap-store-proxy_<number>.snap
      core: core20_<number>.snap

relations:
- - postgresql:db-admin
  - snap-store-proxy:db-admin

Configuration

In both the installation examples above, the charm still needs to be registered. This registration has to be done via the snap store-admin and will produce a registration file. This registration file needs to be added to the charm option called registration_bundle.

I this file is called register.json the following command can be used:

juju config snap-store-proxy \
    registration_bundle=$(cat <output of store-admin register>)

Obviously this can also be added to the juju deployment bundle, both methods, registering during installation, or after installation, are supported.