Charmcraft supports the development of operators using the Charmed Operator Framework. It enables developers to build, upload and release operators on Charmhub and collaboration through charm libraries.
This new version was just released to candidate
channel, we’d appreciate any tests on this, please report here any issues you find. Once we find this is solid enough, we will release it to stable
.
It includes the following changes:
-
The Charm and Bundle packing is now done through a parts lifecycle process in the same manner as
snapcraft
.- the charm’s requirements and entrypoint can now be specified in the config, to simplify repetitive packing.
- it opens a world of possibilities to pack charms and bundles: explore the parts lifecycle docs if you have special packaging requirements.
-
Introduced a mechanism to validate that the charm was built using the best charm crafting practices (see all analyzers and linters).
- this infrastructure is run automatically when packing the charm, aborting the process if problems are found (can be overruled with
--force
). - all linters and checkers can be called explicitly using the new
analyze
command (use--format=json
to produce a machine-consumable output). - these verifications can be explicitly ignored (see
analysis
key in the config).
- this infrastructure is run automatically when packing the charm, aborting the process if problems are found (can be overruled with
-
The packing procedure no longer includes all the project’s files by default (see this forum post for further reference).
-
When packing charms in Charmcraft-driven LXD containers, perform additional validation of LXD configuration and user permissions to improve user experience.
-
Introduced
--destructive-mode
option to pack charm on host instead of using an LXD container (use with caution as this mode allows changes to system configuration). -
Fixed a regression when listing revisions and showing status for bundles.
Use Charmcraft to:
- Initialise a new charm and directory structure
- Build your Charmed Operator into a charm for distribution
- Register your charm name on Charmhub
- Upload your charms to Charmhub
- Release your charms into channels
- Publish and fetch charm libraries
We recommend the Charmed Operator Framework for charm development, but Charmcraft will help you publish charms written in any language. The Charmed Operator Framework enables the development of operators in a simple and straightforward way, using standard Python structures to allow for clean, maintainable, and reusable code.
Happy charming!