Manage extensions¶
See also: Extensions
View all the available extensions¶
To view all the available Rockcraft / Charmcraft extensions, run the
rockcraft list-extensions / charmcraft list-extensions command. For example:
$ charmcraft list-extensions
Extension name Supported bases Experimental bases
---------------- ----------------- --------------------
flask-framework [email protected]
View details about the extension in use¶
Suppose you’ve initialised a rock / charm with a profile that comes with
an extension (currently, flask-framework), and your
rockcraft.yaml / charmcraft.yaml > extensions lists this
extension.
Example
mkdir my-flask-app-k8s cd my-flask-app-k8s/ charmcraft init --profile flask-framework
Charmed operator package file and directory tree initialised. Now edit the following package files to provide fundamental charm metadataand other information: charmcraft.yamlsrc/charm.pyREADME.mdls -R
.:charmcraft.yaml requirements.txt src ./src:charm.pycat charmcraft.yaml
# This file configures Charmcraft.# See https://juju.is/docs/sdk/charmcraft-config for guidance. name: my-flask-app-k8s type: charm bases: - build-on: - name: ubuntu channel: "22.04" run-on: - name: ubuntu channel: "22.04" # (Required)summary: A very short one-line summary of the flask application. # (Required)description: | A comprehensive overview of your Flask application. extensions: - flask-framework # Uncomment the integrations used by your application# requires:# mysql:# interface: mysql_client# limit: 1# postgresql:# interface: postgresql_client# limit: 1To view details about what that extension is adding to your charm, set the
CHARMCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS environment variable to 1,
then run charmcraft expand-extensions. For example: