lp:~gary/charms/precise/juju-gui/bug1218888
- Get this branch:
- bzr branch lp:~gary/charms/precise/juju-gui/bug1218888
Branch merges
- charmers: Pending requested
-
Diff: 209 lines (+82/-37)2 files modifiedhooks/utils.py (+7/-3)
tests/test_utils.py (+75/-34)
Related bugs
Bug #1218888: Switch to higher compression of GUI source | High | Fix Released |
Related blueprints
Branch information
- Owner:
- Gary Poster
- Status:
- Development
Recent revisions
- 115. By Francesco Banconi
-
Introduce local GUI releases.
Implemented the new "local" juju-gui-source option.
By default the GUI release is now retrieved from
the charm itself, so that in the deployment process
the charm can avoid connecting to Launchpad.This should result in the charm being able to be
deployed behind a firewall without the traditional
workarounds. Note that this is not yet demonstrated
and must be QAed in a real firewalled environment.The process tries is like the following:
- if juju-gui-source is "local", the last tarball
in the releases dir is installed;
- if juju-gui-source is a stable or development version,
the charm checks if that version is present in the
local repository before downloading it from Launchpad.
- the rest of the options should still work as usual
(but some QA could help, e.g. deploying from a branch).Also updated the charm documentation and added some
missing tests.Tests: `make unittest` from the branch root
(I am currently running the functional tests).QA (assuming 0.10.1 is the latest GUI release):
- `juju bootstrap --debug`;
- `make deploy`;
- check the logs: no PPAs are used, the local release
is installed;
- `juju set juju-gui juju-gui-source= 0.10.0` ;
- check the logs: the release is downloaded from
Launchpad;
- `juju set juju-gui juju-gui-source= 0.10.1` ;
- check the logs: the charm successfully find
the 0.10.1 release in the local repository and
avoids downloading it from Launchpad.
- keep trying to break the charm in all the ways
you can imagine...Thank you.
R=matthew.scott, gary.poster
CC=
https://codereview. appspot. com/14545044 - 114. By Francesco Banconi
-
Avoid installing from PPA if not required.
No longer add the juju-gui PPA by default:
the external repository is added only if required,
i.e. if the legacy server is used or if a branch
is passed to juju-gui-source.The only missing bit to make the charm work well
from behind a firewall AFAICT is avoiding the release
to be downloaded from Launchpad.Also included the shelltoolbox file in the charm:
unfortunately the python-shelltoolbox package is
not available on precise. On the other hand, this
allows for getting rid of the bootstrap_utils.py
file, and the install hook now feels cleaner.Refactoring + some magic removal on the backend
framework. Now it should be less surprising, and
also allows for more customizations, e.g. what
I did in the install method.Also added missing tests for the backend framework:
those were required in order to increase our control
over what's really happening in the backend "hooks".Switched to the builtin Tornado server by default.
This diff is very big, I am sorry, but:
- you can ignore the bootstrap_utils removal;
- you can ignore the shelltoolbox.py file: it is
just a copy of the one present in the raring
python-shelltoolbox package;
- a lot of code is tests, the rest of the code
should be quite easy to follow.QA:
`make deploy` and watch the logs:
- no PPA should be installed by default;
- the deployment succeeds and the GUI works well;
switch to builtin-server= false and watch the logs:
- the PPA is installed (and then haproxy, apache...);
- the config-change hook exits without errors and
the GUI works well.Tests:
`make unittest`
(I ran the functional tests myself).Thank you!
R=gary.poster, rharding
CC=
https://codereview. appspot. com/14433049 - 113. By Francesco Banconi
-
Fix missing dependency and upgrade Tornado.
Upgrade Tornado to version 3.1.1 and add
the websocket-client dependency. - 111. By Gary Poster
-
Add password option to charm
In order to support ecosystems work, add a password option that lets the charm pre-fill the password in the GUI.
To QA, start up the charm, and verify that you need to enter your password in the GUI. Do not log in, or if you do, log out afterwards. Next, juju set juju-gui password=[YOUR ADMIN SECRET] and wait about 20 seconds for the charm to reconfigure itself. Then go to the browser again and you should not have to log in.
- 110. By Francesco Banconi
-
Bundle deployment support functional test.
This branch includes a charm functional test
exercising the builtin server bundle support.Reorganized the functional tests so that, at
least when the builtin server is used, the
deployed GUI service is reused by all tests.Also fixed a pyJuju clean up error when the
builtin server is used to serve the GUI.Added an helper function to retrieve, if
possible, the admin secret for the current
Juju environment, and a very simple WebSocket
client object used in tests.
Note that the websocket-client package used
by the client is now explicitly listed in
the requirements file, but it was already
installed before as a dependency of the
python juju client.No QA required.
Tests:
run `make test JUJU_ENV="your-juju- environment" `
from the root of this branch.
Note that it is not currently possible to run
juju-test with a juju-core local provider:
with LXC juju-core requires the bootstrap and
destroy-environment commands to be run as root.
For this reason, I suggest to run the tests
using ec2; in my machine they take about 1:15h.R=bac, gary.poster
CC=
https://codereview. appspot. com/13890044 - 109. By Francesco Banconi
-
New juju-deployer darwin version.
Switched to the new juju-deployer version,
which includes support for deployments started
by the GUI server.This allows us to remove the blocking/
deployer- specific
code from the GUI server.Also updated the relevant parts of the documentation.
Tests: run `make unittest` from the root of this branch.
R=gary.poster, bac
CC=
https://codereview. appspot. com/13824045 - 108. By Francesco Banconi
-
GUI server: cancel deployment feature.
Added an API call for cancelling a pending
deployment.Also updated the bundles module documentation.
For this first implementation, I discussed
with Gary a workaround to avoid scheduled
deployments to be included in the ProcessPool
executor's call queue: a time.sleep call is
added to the queue right after a new deployment.
This way, as described in the code, it is still
possible to cancel a scheduled deployment job
even if it is the first in the queue.Tests:
run `make unittest` from the root of this branch.QA:
- bootstrap a juju-core environment;
- deploy the GUI from this branch (`make deploy`);
- switch to the builtin server:
`juju set juju-gui builtin-server= true`;
- ensure the GUI is working well by visiting
https://GUI-ADDRESS . To test the deployer support and the
"cancel deployment" feature, use the script in
http://pastebin. ubuntu. com/6100815/ e.g.: - download and save the Python script;
- run it passing the GUI node address as first argument:
`python start-deployer-cancel. py GUI-ADDRESS`. The script does the following:
1) it logs in to the juju-core API server;
2) it starts/schedules three deployments;
3) it send two invalid Cancel requests;
4) it cancels the second deployment;
5) it shows the deployments status before and
after the deployment deletion.- if everything is ok, you should see an output like
this: http://pastebin. ubuntu. com/6100861/ ;
- you should also be able to check the deployment
progress from the GUI;
- when the two deployments are completed (it may take
some minutes) you should see wordpress, mysql and
mediawiki correctly deployed and displayed in the
topology view;
- visiting https://GUI-ADDRESS/ gui-server- info you
should see something like this:
{
"uptime": 970,
"deployer": [
{"Status": "completed", "DeploymentId": 0, "Time": 1379062144},
{"Status": "cancelled", "DeploymentId": 1, "Time": 1379061766},
{"Status": "completed", "DeploymentId": 2, "Time": 1379062156}
],
"apiversion": "go",
"sandbox": false,
"version": "0.2.0",
"debug": false,
"apiurl": "wss://ec2-50- 17-116- 51.compute- 1.amazonaws. com:17070"
}That's all, thanks a lot for QAing this branch!
R=rharding, bac
CC=
https://codereview. appspot. com/13549046
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:charms/juju-gui