The “Upgrade Series” feature development is nearing general availability. If you would like to be able to test this feature while in development the following will get you started:
- Ensure you are working at the tip of the development branch. The edge Snap can be installed via:
$ snap install --edge juju
- Deploy a charm which implements the
post-series-upgradehooks. You can deploy
cs:~ecjones/ubuntu-series-upgrade-0which contains a minimal implementation for these hooks. Be sure to specify a series from which you can upgrade (of course, you won’t be able to upgrade from the latest supported series)
juju deploy cs:~ecjones/ubuntu-series-upgrade-0 --series xenial
- Run the prepare command
juju upgrade-series prepare <machine> <series>
At this point you can run juju status and watch the pre upgrade charm hook run.
You should also see the unit agents shut down (their init system services are stopped). Currently, this is not very pretty from a
juju status perspective since
juju status reports that it has lost connection to its application units and nothing more.
- Once the hook completes
and the units are shut down (lost connection)try the complete command
juju upgrade-series complete <machine>
juju status should reveal that the units have started back up and have established connectivity.
- Both hooks should have run to completion without issue
The test charm above implements the
post-series-upgrade hooks. Currently the hooks are implemented to idle (sleep) for 2 minutes. This will give you chance to inspect the status of the running application to ensure that all is functioning as you would expect.