Upgrading to Juju 2.x

Procedure to upgrade to the latest Juju 2.x from an earlier version. The steps to take are:

  1. In case of any issues we run into, create a backup of the Juju data directory using a procedure like:

    $ service jujud-machine-2 stop $ service juju-db stop $ mkdir /var/local/backups $ cp /var/lib/juju /var/local/backups/juju $ service juju-db start

  2. Upgrade the Juju client package (where you’re running your Juju CLI commands from) to the latest available, which should be 2.1.3-0ubuntu1~16.04.1~juju1

  3. Once the client is upgraded, use:

    $ juju upgrade-juju -m <controller model name> –dry-run

    to check which version of the Juju agent the model will be upgraded to. It should be 2.1.3 - if so go ahead and run it without the –dry-run.

  4. Once completed (you can check juju debug-log -m <controller model name> to see when things have settled, and juju status -m <controller model name> to see which version Juju sees on the model), you can use the previous step on each other model.