DescriptionMake quickstart idempotent.
- do not bootstrap an environment if already bootstrapped;
- do not deploy the GUI if already there.
Sorry, the diff is long, but there are a lot of tests.
Tests: make check
QA:
- .venv/bin/python juju-quickstart -e ec2
and ensure the GUI is correctly deployed;
- .venv/bin/python juju-quickstart -e ec2
again, to check it recognizes that env is
already bootstrapped and the
GUI unit is already there;
In the following steps, sometimes the browser
can get confused about certs, wss conections
etc. If the GUI is not loading correctly,
try harder, use incognito mode, change the
browser.
- juju destroy-service -e ec2 juju-gui;
- .venv/bin/python juju-quickstart -e ec2
again, to check the service and the unit
are correctly re-deployed;
Incidentally the step above, in the case it
succeeds, also demonstrates that the GUI can
safely be redeployed in the same machine: I
wasn't sure about this and this means we are
cleaning up things correctly in our charm, yay!
- juju unexpose -e ec2 juju-gui;
- .venv/bin/python juju-quickstart -e ec2
again, to check that the service is
properly re-exposed;
- juju destroy-unit -e ec2 juju-gui/0;
- .venv/bin/python juju-quickstart -e ec2
again, to check that the unit is
re-added on the existing service
(this time it should be named juju-gui/1);
- juju destroy-service -e ec2 juju-gui;
- juju deploy -e ec2 juju-gui (if juju exits with a
"service already exists" error, retry after a while);
- .venv/bin/python juju-quickstart -e ec2 \
bundle:~jorge/mediawiki-simple/4/mediawiki-simple;
The last command, executed right after juju-deploy should
also demonstrates that incidentally quickstart
can also be used to watch an already running
deployment, and that a bundle can still be deployed;
Final check:
- .venv/bin/python juju-quickstart -e ec2;
just to ensure quickstart is not surprised
that the unit is not in the bootstrap node
(i.e. you should see "juju-gui/0 is ready on machine 1").
Thanks a lot for testing all of this.
I added a card to automate the QA above with
a collection of functional tests.
Remember to destroy your ec2 environment.
https://code.launchpad.net/~frankban/juju-quickstart/idempotent-feature/+merge/195592
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 15
Patch Set 2 : Make quickstart idempotent. #
MessagesTotal messages: 6
|