Applications and charms

An application in Juju is a collection of identical application units that is installed and configured via a charm. A charm represent the distilled knowledge of experts for its corresponding application. They make it easy to reliably and repeatedly deploy applications, which can then be scaled up and down with minimal effort.

Charms are available in the public online Charm Store but they can also be developed and run locally. See the Charm writing guide if you want to write your own charms.

Common application and charm management tasks are summarised below. The most important ones are Deploying applications and Managing relations.

Actions

Actions are charm-specific bits of code that can be called at will from the command line. The Working with actions page provides full coverage of the subject.

Application groups

Application groups allow an operator to manage groups of the same application by providing custom application names during deployment. See the Application groups page for details.

Application high availability

Application high availability pertains to the distribution of units over availability zones. See the Application high availability page for full information.

Application metrics

Metrics for applications can be collected for the purposes of model-level assessment of application utilisation and capacity planning. See the Application metrics page to learn more.

Configure applications

Applications can have their configuration options set during, or after, deployment. The Configuring applications page explains how this is done.

Constraints

Constraints are used to specify minimal requirements for the machine that will host an application. See page Using constraints for details.

Credentials and application trust

Some applications may require access to the backing cloud in order to fulfill their purpose. In such cases, the credential associated with the current model would need to be shared with the application. See section Trusting an application with a credential for details.

Deploy applications

The Deploying applications page covers an array of methods for getting your applications deployed.

The Deploying applications - advanced page contains more advanced use cases.

See the Deploying charms offline page for guidance when deploying in a network-restricted environment.

Applications can be deployed and configured as a collection of charms. This subject is treated on the Charm bundles page.

Display information for deployed applications

Once an application is deployed it is possible to display information on it. This is done with the show-application command. For example:

juju deploy postgresql pgsql
juju show-application pgsql

Sample output:

pgsql:
  charm: postgresql
  series: bionic
  channel: stable
  principal: true
  exposed: false
  remote: false
  endpoint-bindings:
    coordinator: ""
    data: ""
    db: ""
    db-admin: ""
    local-monitors: ""
    master: ""
    nrpe-external-master: ""
    replication: ""
    syslog: ""
Relate applications

When an application requires another application in order to fulfil its purpose they need to be logically linked together. In Juju, such a link is called a relation. The Managing relations page explains this important concept.

Remove applications

Removing an application is a simple process. See the Removing things page for guidance.

Resources

A Juju resource is additional content/files that a charm can make use of, or may even require in order to run. See the Working with resources page for details.

Scale applications

Juju horizontally scales applications up and down by adding and removing application units. The Scaling applications page for details.

Storage

Using storage

Upgrade an application

Upgrading an application in Juju means to upgrade the application’s charm. See the Upgrading applications page for in-depth coverage.

Last updated 14 days ago. Help improve this document in the forum.