How to configure with an overlay bundle

See also: Overlay bundle, juju deploy --overlay

Contents:

At deploy time

Suppose you want to deploy mediawiki and also apply an overlay bundle called custom-wikimedia.yaml. This can be done in one step at deploy time, as shown below, using the --overlay flag:

juju deploy mediawiki \
  --overlay ./custom-mediawiki.yaml
Expand to see a more advanced scenario with OpenStack

For a more advanced scenario, consider the deployment of a base OpenStack cloud. This is done by combining a bundle with an overlay. The overlay is necessary to make the bundle deployable within the local environment. It may also override parameters existing in the bundle (e.g. storage) as well as add parameters (e.g. constraints). For example, to deploy OpenStack Yoga running on Focal nodes within the local MAAS environment:

juju deploy ./bundle-focal-yoga.yaml \
   --overlay ./overlay-focal-yoga-mymaas.yaml

Here we add a feature to an OpenStack cloud that is not present in the base bundle. The extra feature is described by its own overlay. For example, to deploy OpenStack Yoga running on Focal nodes within the local MAAS environment and add Shared filesystem services:

juju deploy ./bundle-focal-yoga.yaml \
   --overlay ./overlay-focal-yoga-mymaas.yaml \
   --overlay ./overlay-focal-yoga-mymaas-shared-filesystem.yaml

Post deploy time

Suppose now that have a model where you’ve already deployed mediawiki. You’ve also made some other changes in your model. Finally, you’d like to apply an overlay bundle custom-mediawiki.yaml. This is a two-step process:

First, export your model to a bundle. We’ll call it mediawiki-bundle.yaml.

juju export-bundle --filename mediawiki-model-bundle.yaml

Second, deploy your exported model bundle and apply your overlay bundle at deploy time:

juju deploy ./mediawiki-model-bundle.yaml \
  --overlay ./custom-mediawiki.yaml
Expand to see a more advanced scenario with OpenStack

Now consider the use case of adding a feature to an existing OpenStack cloud. Like before, the extra feature is described by its own overlay. Here a timestamp is included in the exported bundle filename:

juju export-bundle --filename exported-bundle-focal-yoga-2022-06-07.yaml

Then, for example, to add manual zone Swift services to the cloud:

juju deploy ./exported-bundle-focal-yoga-2022-06-07.yaml \
   --overlay ./overlay-focal-yoga-mymaas-manual-swift.yaml

Last updated 1 year, 3 months ago.