Merge lp://qastaging/~frankban/juju-quickstart/bundle-urls into lp://qastaging/juju-quickstart

Proposed by Francesco Banconi
Status: Merged
Merged at revision: 59
Proposed branch: lp://qastaging/~frankban/juju-quickstart/bundle-urls
Merge into: lp://qastaging/juju-quickstart
Diff against target: 440 lines (+226/-47)
7 files modified
README.rst (+2/-2)
quickstart/__init__.py (+24/-1)
quickstart/manage.py (+51/-25)
quickstart/settings.py (+4/-1)
quickstart/tests/test_manage.py (+23/-0)
quickstart/tests/test_utils.py (+103/-16)
quickstart/utils.py (+19/-2)
To merge this branch: bzr merge lp://qastaging/~frankban/juju-quickstart/bundle-urls
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+211057@code.qastaging.launchpad.net

Description of the change

Improve bundle URLs support.

Add support for promulgated bundle short names.
Add support for jujucharms bundle URLs.
Improve help messages.

Tests: `make check`.

QA:

Run `.venv/bin/python juju-quickstart -h`
and please check the spelling of the whole
help message. Also ensure it is nicely
printed on a small terminal (e.g. 80x24).

Now let's check bundle errors: all the commands
below should return a pertinent error message:

.venv/bin/python juju-quickstart bundle:
.venv/bin/python juju-quickstart https://jujucharms.com/bundle/mediawiki/single/wtf
.venv/bin/python juju-quickstart https://jujucharms.com/bundle/mediawiki/double
.venv/bin/python juju-quickstart https://jujucharms.com/charms/mediawiki/single
.venv/bin/python juju-quickstart bundle:mediawiki/42/single
.venv/bin/python juju-quickstart bundle:~frankban/mediawiki/single

Deploy bundles, destroy the environment after each command.

Deploy the promulgated mediawiki single bundle:
.venv/bin/python juju-quickstart bundle:~charmers/mediawiki/6/single

Deploy the mediawiki scalable bundle:
.venv/bin/python juju-quickstart bundle:mediawiki/scalable

Deploy a bundle using its jujucharms URLs:
.venv/bin/python juju-quickstart https://jujucharms.com/bundle/~bac/charmworld-demo/charmworld-minimal/

Deploy a bundle using direct HTTPS:
.venv/bin/python juju-quickstart https://raw.github.com/castrojo/mongodb-bundle/master/bundles.yaml

https://codereview.appspot.com/75830045/

To post a comment you must log in.
Revision history for this message
Francesco Banconi (frankban) wrote :

Reviewers: mp+211057_code.launchpad.net,

Message:
Please take a look.

Description:
Improve bundle URLs support.

Add support for promulgated bundle short names.
Add support for jujucharms bundle URLs.
Improve help messages.

Tests: `make check`.

QA:

Run `.venv/bin/python juju-quickstart -h`
and please check the spelling of the whole
help message. Also ensure it is nicely
printed on a small terminal (e.g. 80x24).

Now let's check bundle errors: all the commands
below should return a pertinent error message:

.venv/bin/python juju-quickstart bundle:
.venv/bin/python juju-quickstart
https://jujucharms.com/bundle/mediawiki/single/wtf
.venv/bin/python juju-quickstart
https://jujucharms.com/bundle/mediawiki/double
.venv/bin/python juju-quickstart
https://jujucharms.com/charms/mediawiki/single
.venv/bin/python juju-quickstart bundle:mediawiki/42/single
.venv/bin/python juju-quickstart bundle:~frankban/mediawiki/single

Deploy bundles, destroy the environment after each command.

Deploy the promulgated mediawiki single bundle:
.venv/bin/python juju-quickstart bundle:~charmers/mediawiki/6/single

Deploy the mediawiki scalable bundle:
.venv/bin/python juju-quickstart bundle:mediawiki/scalable

Deploy a bundle using its jujucharms URLs:
.venv/bin/python juju-quickstart
https://jujucharms.com/bundle/~bac/charmworld-demo/charmworld-minimal/

Deploy a bundle using direct HTTPS:
.venv/bin/python juju-quickstart
https://raw.github.com/castrojo/mongodb-bundle/master/bundles.yaml

https://code.launchpad.net/~frankban/juju-quickstart/bundle-urls/+merge/211057

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/75830045/

Affected files (+229, -46 lines):
   M README.rst
   A [revision details]
   M quickstart/__init__.py
   M quickstart/manage.py
   M quickstart/settings.py
   M quickstart/tests/test_manage.py
   M quickstart/tests/test_utils.py
   M quickstart/utils.py

Revision history for this message
Richard Harding (rharding) wrote :

Thanks for this, mainly reviewed the docs. A couple of suggestions. Let
me know if any of the comments are unclear.

https://codereview.appspot.com/75830045/diff/1/quickstart/__init__.py
File quickstart/__init__.py (right):

https://codereview.appspot.com/75830045/diff/1/quickstart/__init__.py#newcode34
quickstart/__init__.py:34: * Bundles can be deployed, from local files,
HTTP(S) URLs or the charm store,
URLs <comma>

https://codereview.appspot.com/75830045/diff/1/quickstart/__init__.py#newcode37
quickstart/__init__.py:37: into the GUI, to observe and manage the
environment visually.
into the Juju GUI. (I'd drop the rest)

https://codereview.appspot.com/75830045/diff/1/quickstart/manage.py
File quickstart/manage.py (right):

https://codereview.appspot.com/75830045/diff/1/quickstart/manage.py#newcode332
quickstart/manage.py:332: '1) a fully qualified bundle URL, starting
with "bundle:"\n'
Can we word this to start with the easy example that's recommended by
moving the promulgated bundle up here.

Then word it more that "You can also specify a user bundle, and a
specific revision...

This way we push the promoted and simple case and fall back to any
person's work.

https://codereview.appspot.com/75830045/

Revision history for this message
Brad Crittenden (bac) wrote :

Code LGTM

https://codereview.appspot.com/75830045/diff/1/quickstart/__init__.py
File quickstart/__init__.py (right):

https://codereview.appspot.com/75830045/diff/1/quickstart/__init__.py#newcode33
quickstart/__init__.py:33: (installing on an existing state server when
possible).
When not possible isn't there an additional machine?

https://codereview.appspot.com/75830045/diff/1/quickstart/manage.py
File quickstart/manage.py (right):

https://codereview.appspot.com/75830045/diff/1/quickstart/manage.py#newcode72
quickstart/manage.py:72: # remote location.
I'd move this second comment to the actual location it happens.

https://codereview.appspot.com/75830045/diff/1/quickstart/tests/test_manage.py
File quickstart/tests/test_manage.py (right):

https://codereview.appspot.com/75830045/diff/1/quickstart/tests/test_manage.py#newcode112
quickstart/tests/test_manage.py:112: # The options object is correctly
set up when a jujucharms bumdle URL
typo: bundle

https://codereview.appspot.com/75830045/

64. By Francesco Banconi

Changes as per review.

Revision history for this message
Francesco Banconi (frankban) wrote :

Please take a look.

https://codereview.appspot.com/75830045/diff/1/quickstart/__init__.py
File quickstart/__init__.py (right):

https://codereview.appspot.com/75830045/diff/1/quickstart/__init__.py#newcode33
quickstart/__init__.py:33: (installing on an existing state server when
possible).
On 2014/03/14 14:51:20, bac wrote:
> When not possible isn't there an additional machine?

Yes, when using local envs a new machine is created. Not sure if we
should specify it in this context.

https://codereview.appspot.com/75830045/diff/1/quickstart/__init__.py#newcode34
quickstart/__init__.py:34: * Bundles can be deployed, from local files,
HTTP(S) URLs or the charm store,
On 2014/03/14 14:37:08, rharding wrote:
> URLs <comma>

Done.

https://codereview.appspot.com/75830045/diff/1/quickstart/__init__.py#newcode37
quickstart/__init__.py:37: into the GUI, to observe and manage the
environment visually.
On 2014/03/14 14:37:08, rharding wrote:
> into the Juju GUI. (I'd drop the rest)

Done.

https://codereview.appspot.com/75830045/diff/1/quickstart/manage.py
File quickstart/manage.py (right):

https://codereview.appspot.com/75830045/diff/1/quickstart/manage.py#newcode72
quickstart/manage.py:72: # remote location.
On 2014/03/14 14:51:20, bac wrote:
> I'd move this second comment to the actual location it happens.

Done.

https://codereview.appspot.com/75830045/diff/1/quickstart/manage.py#newcode332
quickstart/manage.py:332: '1) a fully qualified bundle URL, starting
with "bundle:"\n'
On 2014/03/14 14:37:08, rharding wrote:
> Can we word this to start with the easy example that's recommended by
moving the
> promulgated bundle up here.

> Then word it more that "You can also specify a user bundle, and a
specific
> revision...

> This way we push the promoted and simple case and fall back to any
person's
> work.

Done.

https://codereview.appspot.com/75830045/diff/1/quickstart/tests/test_manage.py
File quickstart/tests/test_manage.py (right):

https://codereview.appspot.com/75830045/diff/1/quickstart/tests/test_manage.py#newcode112
quickstart/tests/test_manage.py:112: # The options object is correctly
set up when a jujucharms bumdle URL
On 2014/03/14 14:51:20, bac wrote:
> typo: bundle

Done.

https://codereview.appspot.com/75830045/

Revision history for this message
Brad Crittenden (bac) wrote :
Revision history for this message
Francesco Banconi (frankban) wrote :

*** Submitted:

Improve bundle URLs support.

Add support for promulgated bundle short names.
Add support for jujucharms bundle URLs.
Improve help messages.

Tests: `make check`.

QA:

Run `.venv/bin/python juju-quickstart -h`
and please check the spelling of the whole
help message. Also ensure it is nicely
printed on a small terminal (e.g. 80x24).

Now let's check bundle errors: all the commands
below should return a pertinent error message:

.venv/bin/python juju-quickstart bundle:
.venv/bin/python juju-quickstart
https://jujucharms.com/bundle/mediawiki/single/wtf
.venv/bin/python juju-quickstart
https://jujucharms.com/bundle/mediawiki/double
.venv/bin/python juju-quickstart
https://jujucharms.com/charms/mediawiki/single
.venv/bin/python juju-quickstart bundle:mediawiki/42/single
.venv/bin/python juju-quickstart bundle:~frankban/mediawiki/single

Deploy bundles, destroy the environment after each command.

Deploy the promulgated mediawiki single bundle:
.venv/bin/python juju-quickstart bundle:~charmers/mediawiki/6/single

Deploy the mediawiki scalable bundle:
.venv/bin/python juju-quickstart bundle:mediawiki/scalable

Deploy a bundle using its jujucharms URLs:
.venv/bin/python juju-quickstart
https://jujucharms.com/bundle/~bac/charmworld-demo/charmworld-minimal/

Deploy a bundle using direct HTTPS:
.venv/bin/python juju-quickstart
https://raw.github.com/castrojo/mongodb-bundle/master/bundles.yaml

R=rharding, bac
CC=
https://codereview.appspot.com/75830045

https://codereview.appspot.com/75830045/

Revision history for this message
Francesco Banconi (frankban) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches