lp:~frankban/juju-quickstart/changeset-prep
- Get this branch:
- bzr branch lp:~frankban/juju-quickstart/changeset-prep
Branch merges
- Brad Crittenden (community): Approve (code)
-
Diff: 99 lines (+17/-10)4 files modifiedquickstart/manage.py (+1/-1)
quickstart/models/bundles.py (+7/-3)
quickstart/tests/models/test_bundles.py (+5/-2)
tox.ini (+4/-4)
Branch information
Recent revisions
- 126. By Francesco Banconi
-
Juju bundlelib validation in quickstart.
Validate bundles using jujubundlelib.
Also add to the bundle model the ability
to return its change set.R=jeff.pihach, matthew.scott
CC=
https://codereview. appspot. com/232890043 - 125. By Francesco Banconi
-
Introduce jujubundlelib dependency.
Use the Reference model defined there.
R=matthew.scott
CC=
https://codereview. appspot. com/228460043 - 124. By Francesco Banconi
-
Always retrieve bundle from new cs endpoint.
This is a follow up from previous branch,
and also includes the remaining bits before
2.0.1 release.Even if a legacy bundle is specified, and even
if the legacy bundle data is retrieved for name
validation, always use the new bundle.yaml
charm store endpoint when returning the bundle
contents.This branch also include a drive by fix to always
run `apt-get update` before installing packages,
even in the case --distro-only is enabled.Tests: `make check`.
QA:
install bundles with quickstart:
`devenv/bin/juju- quickstart {bundle}`
Try the following bundles:
- devenv/bin/juju- quickstart mediawiki-single
- devenv/bin/juju- quickstart u/bigdata- dev/apache- analytics- sql
- devenv/bin/juju- quickstart bundle: mediawiki/ scalable
- devenv/bin/juju- quickstart bundle: ~landscape/ landscape- dense-maas/ landscape- dense-maas
- devenv/bin/juju- quickstart bundle: django/ example- single Those instead should return errors:
- devenv/bin/juju- quickstart mediawiki/trusty
- devenv/bin/juju- quickstart mediawiki-nosuch
- devenv/bin/juju- quickstart no-such
- devenv/bin/juju- quickstart bundle:no/such
- devenv/bin/juju- quickstart bundle:invalid
- devenv/bin/juju- quickstart bundle: ~landscape/ landscape- dense-maas/ landscape Thank you!
R=bac, rharding
CC=
https://codereview. appspot. com/215750043 - 123. By Francesco Banconi
-
Fix the old-style bundle regression.
This branch fixes
https://bugs.launchpad .net/juju- quickstart/ +bug/1429129
In essence, legacy bundles are converted by the
ingestion process like the following:
- if a basked includes multiple bundles, the resulting
v4 bundle name is {basket-name}-{ bundle- name} for
each {bundle-name};
- if a basket only includes one bundle, the v4 bundle
is just {basket-name}.
Previously quickstart always assumed the former: this
branch adds a check for the latter before exiting with
an error.This branch also introduces a charmstore module in
quickstart. All the interactions between quickstart
and the charm store are now collected in this module.As part of this refactoring, quickstart is now able
to distinguish HTTP 404 errors and all the other
generic IOErrors that can be raised when connecting
to the network.Also simplified the logging format and bootstrap logging
earlier in the application execution.Tests: `make check`.
QA:
install bundles with quickstart:
`devenv/bin/juju- quickstart {bundle}`
Try the following bundles:
- devenv/bin/juju- quickstart mediawiki-single
- devenv/bin/juju- quickstart u/bigdata- dev/apache- analytics- sql
- devenv/bin/juju- quickstart bundle: mediawiki/ scalable
- devenv/bin/juju- quickstart bundle: ~landscape/ landscape- dense-maas/ landscape- dense-maas
- devenv/bin/juju- quickstart bundle: django/ example- single Those instead should return errors:
- devenv/bin/juju- quickstart mediawiki/trusty
- devenv/bin/juju- quickstart mediawiki-nosuch
- devenv/bin/juju- quickstart no-such
- devenv/bin/juju- quickstart bundle:no/such
- devenv/bin/juju- quickstart bundle:invalid
- devenv/bin/juju- quickstart bundle: ~landscape/ landscape- dense-maas/ landscape R=jeff.pihach, rharding, bac
CC=
https://codereview. appspot. com/215070043 - 122. By Francesco Banconi
-
Support retrieving bundles from charm store v4.
This branch implements the ability to deploy
bundles from the new charm store, retrieving
them with the v4 API.Also introduce the new preferred bundle id
spelling, i.e. reflecting jujucharms.com paths,
like "mediawiki-single" or "u/who/bundle- name". The old "bundle:
basket/ name" identifiers are
still supported but deprecated.
Deploying a bundle by specifying a directory
containing the YAML file is instead not
supported anymore.Ok, after this brief summary let me take two
lines to really apologize for the huge diff.
While I was there, I refactored some historical
inconsistencies (e.g. models.Charm really being
just a charm or bundle reference), and I also
improved the bundle model API so that the work
is done in the model and not in manage as before.
There are a lot of tests too, and some documentation.
Nonetheless, let me say sorry again, this is
really too much stuff.With this branch Juju Quickstart is quite ready for
the v4 world. The "deploy bundle" API call to the GUI
server still uses the legacy format, but the ugliness
of being backward compatible with namespaced bundles
is very restrained and implemented in private logic
in the bundles model module.Tests: `make check`.
QA: run `devenv/
bin/juju- quickstart` to deploy
new style and old style bundles, with both version
3 and 4 formats. Note that version 3 can only be
provided with arbitrary URLs or local files.Thanks a lot!
R=rharding, matthew.scott
CC=
https://codereview. appspot. com/207040043 - 121. By Francesco Banconi
-
Add support for new Juju WebSocket API endpoints.
Recent Juju versions introduced a new API endpoint
path. In essence, instead of the usual
"wss://<address> :17070" , the new
"wss://<address> :17070/ environment/ <env-uuid> /api"
is used to connect to the API.
This allows for connecting to a specific environment
in a multi-environment state server scenario.In this branch the new API endpoint is used if a recent
Juju version is in use, and if it is possible to retrieve
the environment UUID from the jenv file.Also, when connecting to the GUI server (for creating
the auth token or for deploying bundles), use the new
GUI server API endpoints when possible, i.e. when the
charm is recent enough to support redirecting requests
to the new Juju endpoints.
Note that this feature is assumed to land in the next
juju-gui charm release (see settings.py). If that's
not the case, we'll need to increase the charm revisions
in settings.MINIMUM_ REVISIONS_ FOR_NEW_ API_ENDPOINT
before releasing the new Quickstart.Tests: `make check`
QA:
- bootstrap quickstart as usual: `devenv/bin/juju- quickstart` ;
- check that, if you are using juju devel (1.22beta), quickstart
properly connect to the new API endpoint;
- run quickstart again to deploy a bundle, e.g.:
`devenv/bin/juju- quickstart bundle: mediawiki/ single` ;
- ensure that the deployment request succeeds;
- if possible, do the above with and older version of Juju,
to ensure backward compatibility.Done, thank you!
R=martin.hilton, jeff.pihach
CC=
https://codereview. appspot. com/199490043 - 120. By Francesco Banconi
-
Refactor/split utils code.
Move code from utils to the new jujutools and models/bundles modules.
This branch only include moved code and it's done
in preparation for the Juju API new login work.R=bac
CC=
https://codereview. appspot. com/204770043 - 118. By Francesco Banconi
-
Make ftests fail if Juju env is not ready.
The functional tests are no longer silently skipped
if the default Juju environment cannot be found.Also fail if the environment is running, as this
would cause it to be destroyed at the end of the
suite.QA:
- bootstrap your default environment;
- run `make ftest`/`make fcheck` and ensure
the functional tests fail
(environment already bootstrapped);
- destroy your environment;
- run `make fcheck` again and ensure all the
suites complete successfully.R=jeff.pihach, kadams54
CC=
https://codereview. appspot. com/195690043
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:juju-quickstart