pack¶
Build and pack a charm operator package or a bundle.
You can juju deploy the resulting .charm or bundle’s .zip file directly, or upload it to Charmhub with charmcraft upload.
For the charm you must be inside a charm directory with a valid metadata.yaml, requirements.txt including the ops package for the Python operator framework, and an operator entrypoint, usually src/charm.py. See charmcraft init to create a template charm directory structure.
For the bundle you must already have a bundle.yaml (can be generated by Juju) and a README.md file.
Usage¶
charmcraft pack [options]
Options¶
--bases-indexIndex of ‘bases’ configuration to build (can be used multiple times); zero-based, defaults to all.
--build-forSet architecture to build for.
--debugShell into the environment if the build fails.
--destructive-modeBuild in the current host.
--enable-fetch-service==SUPPRESS==.
--forceForce packing even after finding lint errors.
--formatProduce a machine-readable format (currently only json).
--include-all-charmsFor bundles, pack all charms whose source is inside the bundle directory.
--include-charmFor bundles, pack the charm in the referenced path. Can be used multiple times.
--measureDump measurements to the specified file.
--outputor-oOutput directory for created packages.
--output-bundleWrite the bundle configuration to this path.
--platformSet platform to build for.
--project-diror-pSpecify the project’s directory (defaults to current).
--shellShell into the environment in lieu of the step to run.
--shell-afterShell into the environment after the step has run.
--use-lxdBuild in a LXD container.
Global options¶
-hor--helpShow this help message and exit.
-qor--quietOnly show warnings and errors, not progress.
-vor--verboseShow debug information and be more verbose.
--verbositySet the verbosity level to ‘quiet’, ‘brief’, ‘verbose’, ‘debug’ or ‘trace’.
-Vor--versionShow the application version and exit.