lp:~frankban/juju-quickstart/handle-jenv-envs
- Get this branch:
- bzr branch lp:~frankban/juju-quickstart/handle-jenv-envs
Branch merges
- Juju GUI Hackers: Pending requested
-
Diff: 725 lines (+364/-80)8 files modifiedquickstart/app.py (+13/-15)
quickstart/manage.py (+26/-12)
quickstart/models/jenv.py (+85/-7)
quickstart/tests/helpers.py (+49/-9)
quickstart/tests/models/test_jenv.py (+141/-7)
quickstart/tests/test_app.py (+22/-23)
quickstart/tests/test_juju.py (+9/-0)
quickstart/tests/test_manage.py (+19/-7)
Branch information
Recent revisions
- 107. By Francesco Banconi
-
Use both credentials to connect to Juju.
Use both the user name and password when connecting
to the Juju WebSocket API.Update the jenv models to reflect what we expect to
find in the jenv file.QA:
- use quickstart as usual
(.venv/bin/python juju-quickstart ...);
- the user is now printed to stdout;
- the environment and the GUI log in correctly,
in the case the environment is bootstrapped by
quickstart or already there.R=jay.wren, rharding, bac
CC=
https://codereview. appspot. com/190060043 - 106. By Francesco Banconi
-
Add support for the manual provider.
Also reorder the provider fields so
that required ones come first.
The hope for this is to improve the
user experience while creating
environments.Tests: `make check`.
QA: use quickstart as usual to set up
environments.
To test the manual provider, I've done
the following:- I used a separate vmware virtual machine:
let's assume its address is 192.168.1.5.
- Install the SSH server in the vm:
`sudo apt-get install ssh`.
- Copy your ssh credential over:
`scp -rp ~/.ssh 192.168.1.5:~`.
- Allow sudo power without password for your user on the vm, by
editing the /etc/sudoers file and adding the following:
$USER ALL=(ALL) NOPASSWD: ALL
where $USER is your user name.
- Run `.venv/bin/python juju-quickstart -i`, select the option to
create a new "Manual Provisioning" environment, select a name for it and
use the vm address as the "bootstrap host", save the environment
and then run it!
- wait for the environment to be ready, then run quickstart again
with the same environment to check it recognizes it's
already bootstrapped.
Done, thank you!R=rharding, matthew.scott
CC=
https://codereview. appspot. com/172410043 - 105. By Francesco Banconi
-
New bootstrap strategy.
This is a massive branch: my apologies.
But:
- a new module has been created (netutils), so there
are license headers and moreover some existing
functions (with their tests) have been just moved
from utils.py and must not be re-reviewed.
The only new function there is check_listening.
- most of the code are tests: we reached 700 unit
tests yay!This branch changes the way quickstart is run on an
existing environment: instead of always trying to
bootstrap, it looks for the jenv file for the current
environment, and, if present, it retrieves the API URL
from there. As a consequence, quickstart uses Juju
in a less expensive way, and it's also faster when
invoked on a bootstrapped environment.Split the app.bootstrap function to two new
functions: app.bootstrap and app.status. The intent
is to make them more reusable and more easy to test.Fix a subtle bug never reported and not easy to hit:
the environment type of an existing environment is
now retrieved from the jenv, rather than relying on
what's stored in the environments.yaml file.Also reorganized the tests for manage.run: over
time they ended up failing to achieve their goal
of describing how the application is run, and
become not really easy to update and change.
Now this situation should be improved.The little change to the HACKING file is to make
the rst to render correctly on sublime text.Tests: `make check`.
QA: run quickstart as usual on local and ec2.
Run quickstart again on an already bootstrapped
environment (local and ec2). You should no longer
see the "bootstrapping environment" message.
Instead, a more correct "reusing the already
bootstrapped..." message is displayed.
Also this should feel quicker, especially on ec2.Thank you!
R=bac, rharding
CC=
https://codereview. appspot. com/172380043 - 104. By Francesco Banconi
-
Code reorganization + docs.
Reorganize the jenv related code in preparation of the
bootstrap strategy change.Separate jenv handling from the environments.yaml file
management in models.As a consequence of only supporting juju >= 1.18 we
can now safely always retrieve the admin-secret from
the jenv file.Also updated the HACKING docs to include a brief
description of the project structure.Tests: `make check`.
QA: use quickstart as usual.
R=bac, rharding
CC=
https://codereview. appspot. com/169380043
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:juju-quickstart