Action

See also: How to manage actions

In Juju, an action is a script that is triggered via the juju CLI client and applied to a unit. It contains a list of commands defined by a charm to allow a user with the right access level to interact with an application in ways specific to the application. This may include anything from creating a snapshot of a database, adding a user to a system, dumping debug information, etc.

See examples: Charmhub | kafka > Actions, Charmhub | prometheus-k8s > Actions, etc.

(Starting with juju v.3.0: ) Actions are identified by integers (instead of UUIDs).

(Starting with juju v.3.0: ) Running an action defaults to waiting for the output before returning. This synchronous behaviour allows actions to be easily included in command-line pipelines.

(Starting with juju v.3.0: ) The execution of an action is organised into tasks and operations. (If an action defines a named unit of work – e.g., back up the database – that can be executed on selected units, a task is the execution of the action on each target unit, and an operation is the group of tasks queued by running an action across one or more units.)