Code review comment for ~graylog-charmers/charm-graylog:core-resource

Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

We did something similar to this MP for prometheus; during that review, stub requested a helper for developers to know how to use these snap resources:

https://code.launchpad.net/~prometheus-charmers/prometheus2-charm/+git/prometheus2-charm/+merge/367206

I added something similar here:

$ make charmrelease
---------------------------------------------------------------------
graylog supports core and graylog snap resources.

Attached resources will be processed during charm deployment. If a
zero-byte resource is found, the charm will install the relevant snap
from the store. This provides flexibility in choosing which snaps will
be installed by the charm.

For example, release a charm that uses the core snap from the store
(0-byte resource attached) along with a specific graylog snap:

cd /tmp
rm empty-core.snap && touch empty-core.snap
snap download --channel=stable graylog
charm push /Users/kwmonroe/charms/builds/graylog --resource core=/tmp/empty-core.snap --resource graylog=/tmp/graylog_*.snap
charm release <revision> --resource core-<m> --resource graylog-<n>

If the resources you want already exist in the charm store, omit the
declarations during 'charm push' and specify resource revisions
during 'charm release':

charm push /Users/kwmonroe/charms/builds/graylog
charm release <revision> --resource core-0 --resource graylog-3
---------------------------------------------------------------------

« Back to merge proposal