How to publish a charm bundle to Charmhub

See also:

You have packed your charm bundle. This document shows how to can now publish it to Charmhub.

The process is identical to that for a simple charm.

First, log in to Charmhub using Charmcraft:

$ charmcraft login

Second, register your bundle’s name:

$ charmcraft register-bundle super-bundle
You are now the publisher of bundle 'super-bundle' in Charmhub.

Now, upload your charm bundle:

$ charmcraft upload super-bundle.zip
Revision 1 of 'super-bundle' created

Each time you upload a new packed bundle, Charmhub will automatically provide different revisions. Charmhub will reject the upload if you try to upload a blob that has already been uploaded. You can verify which revisions are in Charmhub for a given bundle via charmcraft revisions super-bundle.

Uploading a bundle to Charmhub does not automatically make it available to the public. To do this, the bundle must be released into a channel:

$ charmcraft release super-bundle --revision=1 --channel=beta
Revision 1 of charm 'super-bundle' released to beta

Finally, inspect the status of your bundle:

$ charmcraft status super-bundle
Track    Channel    Version    Revision
latest   stable     -          -
         candidate  -          -
         beta       1          1
         edge       ↑          ↑

I’m not sure exactly where the information lives in the Juju docs now, but this page now contains a circular reference - juju docs are being redirected to charmhub, so

is actually pointing back to this page. I think this is the post it should reference, but I can’t find that in a docs page anymore.

1 Like

@toto see above for link not rendering correctly.

I hit this issue as well, so bumping this thread.
And thank you for the link Nick

I added the orphaned page I mentioned to the reference section of the docs navigation, and updated the two links on this page to point at it. It still needs looking at because I don’t think that page has ALL the specs you need for bundles, but it is better than going around in circles :wink:

should probably be charmcraft revisions super-bundle

1 Like

Fixed :slight_smile:

For future reference, these posts are mostly wikis now so you should be able to edit if something is obviously wrong :slight_smile:

This page is missing the charmcraft pack command which AFAICT is a requirement. I also recommend linking to other resources on the use of charmcraft (not just command help). I don’t know enough about the subject to propose new documentation.