How to manage models
- Add a model
- Change models
- Configure a model
- Compare a bundle to a model
- Destroy a model
- Examine a model
- List all models
- Disable commands
- Manage user access
- Migrate a model
- Enable SSH access
- Set constraints for a model
- Upgrade a model
- View logs
- View model status
- Establish cross-model relations
Models can be added easily to a controller. The Adding a model page provides a full explanation and includes examples.
juju add-model <model-name> [[<cloud>/]<region>]
switch command to change from one model to another. Running the command with no arguments will return the currently active controller and model.
juju switch <controller>[:<model>]
|Ways to change to a model:|
||Selects the last used model in controller ‘foo’ (if the latter exists), otherwise model ‘foo’ in the current controller.|
||Selects model ‘foo’ in the current controller.|
||Selects model ‘bar’ in controller ‘foo’.|
||Selects the last used model in controller ‘foo’.|
Configuration can occur at the model level. This will affect all Juju machines in the model. For instance, a logging level and API port can be stipulated. See the Configuring models page for explanations.
A Juju administrator can compare a model with a charm bundle. This is useful for determining what has changed since the bundle was deployed or just how a model differs from a bundle that was not yet used. This topic is covered on the Charm bundles page.
juju diff-bundle <bundle>
When a model is destroyed all associated applications and machines are also destroyed. It is a very destructive process. See page Removing things for details.
juju destroy-model <model>
It is possible to curtail command use for Juju users on a per-model basis. The Disabling commands page gives more information.
show-model command to examine a specific model.
juju show-model <model>
models command to list all models for a controller.
If you’re using multiple Juju users you will need to manage access to your models. See page Working with multiple users for a full explanation.
Model can be migrated from one controller to another. Model migration is useful when upgrading a controller and for load balancing. For a complete explanation see the Migrating models page.
SSH (Secure Shell) access can be provided to all machines, present and future, on a per-model basis. For in-depth coverage see page Machine authentication.
Charmed operators constraints can be managed at the model level. This will affect all charms used in the model unless overridden. Constraints are used to select minimum requirements for any future machines Juju may create. This subject is covered on page Setting constraints for a model.
Juju software is upgraded at the model level with the
upgrade-model command. This affects the Juju agents running on every machine Juju creates. This does not pertain to the Juju software package installed on a client system. See Upgrading models for complete coverage.
debug-log command to examine logs on a per-model basis. This allows inspection of activities occurring on multiple Juju machines simultaneously. Due to the expected large volume of data, advanced filtering is available. A full explanation is provided on the Juju logs page.
status command to view the status of a model. Tutorial Basic client usage gives an overview of the various elements of this command’s output.
juju status [--storage] [--relations]
Traditionally, when adding a relation between two applications (see Managing relations) the applications reside within the same model and controller. It is possible to overcome this limitation by employing cross model relations. This topic is covered on the Cross model relations page.
Last updated 17 days ago.