Migrating Remote Applications using cross model relations has now landed in
develop branch and should be pushed to the edge snap as soon as it’s run through our CI (install via
snap install juju --edge --classic).
Please have a play with this new feature and let us know if you encounter any issues.
An example of a need to migrate an application maybe to upgrade your application to a more up to date controller or help manage the usage of a application. Either way they’re super useful and add some powerful constructs to Juju itself.
More information about CMR can be found at the cross-mode-relations docs
Whilst developing the feature we also added some new integration tests. If you’re so inclined to see the code, you can have a look at how they work. Go crib from them if you want a more solid follow through, but as an abridge version below should be sufficient.
Using your existing bootstrapped controller, bootstrap your new controller (
dest in this example) and wait for it to come up.
juju migrate src-model dest
You can follow the progress by doing
juju status (
watch -c juju status is your friend) of the current model and also waiting for the
src-model to appear in
The migration should be repeatable if there are any problems in migration.
It’s important to note that there are a few caveats when using relations and offers in general, that also affect CMR.
- If you attempt to destroy a model/controller that has an existing offer, you’ll be blocked and it’s important that you remove that offer first, before attempting to destroy the controller.
- Ensuring a relation is up and running before attempting to migrate the model is required. You’ll get an error when this happens, but retrying again should succeed.