canonical / charm-prometheus-juju-exporter

Charm that deploys exporter, publishing statistics about juju-deployed machines
Apache License 2.0
1 stars 8 forks source link

core22 snap installation issues in air-gapped environments #22

Closed przemeklal closed 1 year ago

przemeklal commented 1 year ago

I tried to deploy the charm in a "temporarily air-gapped" environment but it failed with the following error:

unit-prometheus-juju-exporter-0: 10:34:25 WARNING unit.prometheus-juju-exporter/0.install error: cannot perform the following tasks:
unit-prometheus-juju-exporter-0: 10:34:25 WARNING unit.prometheus-juju-exporter/0.install - Ensure prerequisites for "prometheus-juju-exporter" are available (cannot install snap base "core22": Post https://api.snapcraft.io/v2/snaps/refresh: Proxy Authentication Required)

I attached the local snap as follows:

juju attach-resource prometheus-juju-exporter exporter-snap=./prometheus-juju-exporter_3.snap

But snap core22 was still missing and currently, it's impossible to attach it as the resource.

My proposal is to implement a new resource for the core snap, similar to how other charms do it.

przemeklal commented 1 year ago

Workaround: snap download core22, scp it to the target units and install manually there.

mkalcok commented 1 year ago

@przemeklal I assume that this air-gapped environment is not using snap store proxy either, right? So the only way is to manually attach snap as a resource?

przemeklal commented 1 year ago

In this particular environment attaching core22 as a resource would be the only possible option. It would be the same solution that is used in the p-o-e charm for example.

mkalcok commented 1 year ago

I think that for now we won't be resolving this issue as the recommended way of dealing with air-gapped environments is to use Snap Store Proxy and it's also the direction that some other big charms are taking (e.g. kubernetes-control-plane)