Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(114)

Issue 28250044: Make quickstart idempotent.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by frankban
Modified:
10 years, 5 months ago
Reviewers:
rharding, gary.poster, mp+195592
Visibility:
Public.

Description

Make 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+641 lines, -182 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M quickstart/__init__.py View 1 chunk +1 line, -1 line 0 comments Download
M quickstart/app.py View 1 6 chunks +110 lines, -32 lines 0 comments Download
M quickstart/juju.py View 2 chunks +28 lines, -23 lines 0 comments Download
M quickstart/manage.py View 1 2 chunks +15 lines, -6 lines 0 comments Download
M quickstart/tests/helpers.py View 1 chunk +30 lines, -0 lines 0 comments Download
M quickstart/tests/test_app.py View 1 13 chunks +234 lines, -62 lines 0 comments Download
M quickstart/tests/test_juju.py View 8 chunks +119 lines, -55 lines 0 comments Download
M quickstart/tests/test_manage.py View 1 1 chunk +4 lines, -3 lines 0 comments Download
M quickstart/tests/test_utils.py View 1 chunk +73 lines, -0 lines 0 comments Download
M quickstart/utils.py View 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 6
frankban
Please take a look.
10 years, 5 months ago (2013-11-18 12:22:24 UTC) #1
gary.poster
LGTM with a few trivials and a small. QA good. Very nice functionality. Thank you! ...
10 years, 5 months ago (2013-11-18 15:02:19 UTC) #2
gary.poster
One QA note. The end of your instructions said this: -------------------------- Final check: - .venv/bin/python ...
10 years, 5 months ago (2013-11-18 15:04:26 UTC) #3
rharding
LGTM and qa-ok. I'm with Gary on the is_bootstrapped being a bit confusing sometimes in ...
10 years, 5 months ago (2013-11-18 15:42:55 UTC) #4
frankban
*** Submitted: Make quickstart idempotent. - do not bootstrap an environment if already bootstrapped; - ...
10 years, 5 months ago (2013-11-18 17:17:35 UTC) #5
frankban
10 years, 5 months ago (2013-11-18 18:03:37 UTC) #6
Thank you both for the great reviews!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b