Created by Gary Poster on 2013-09-30 and last modified on 2013-10-01
Get this branch:
bzr branch lp:~gary/charms/precise/juju-gui/credentialConfig
Only Gary Poster can upload to this branch. If you are Gary Poster please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Gary Poster

Recent revisions

113. By Gary Poster on 2013-10-01

fix some formatting issues

112. By Gary Poster on 2013-10-01

handle when password is absent

111. By Gary Poster on 2013-09-30

add option to set password

110. By Francesco Banconi on 2013-09-26

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.

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

109. By Francesco Banconi on 2013-09-23

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

108. By Francesco Banconi on 2013-09-13

GUI server: cancel deployment feature.

Added an API call for cancelling a pending

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.

run `make unittest` from the root of this branch.

- 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

107. By Brad Crittenden on 2013-09-12

[r=rick_h] Remove use-analytics and add ga-key for specifying Google Analytics key to use.

106. By Francesco Banconi on 2013-09-12

Create a new option for GUI debug mode.

Setting the juju-gui-debug option to true is
now possible to serve the GUI source files
individually (uncompressed). As a consequence,
setting staging to true no longer activates
debug mode as a side effect.

- deploy the GUI from this branch (make deploy);
- run `juju set juju-gui juju-gui-debug=true`,
  wait a minute and then verify the uncompressed
  files are served by Apache;
- run `juju set juju-gui builtin-server=true`,
  wait a minute and then verify the uncompressed
  files are correctly served by the Tornado server
  (tailf /var/log/upstart/guiserver.log can help).


105. By Francesco Banconi on 2013-09-04

GUI server deployer: update the Import request.

Updated the Import deployer request so that the Name
field is optional if the YAML one contains just one bundle.


104. By Francesco Banconi on 2013-09-03

The GUI no longer run from the charm directory.

Updated the GUI and (under pyJuju) the API agent
so that now the files are served from /var/lib/juju-gui.

That directory is also removed when the service is
destroyed. To do that, this branch introduces
the Backend.destroy method, called in the stop

QA: deploy the charm using this branch,
check everything is ok, check that the GUI files
are stored in /var/lib/juju-gui.
Then destroy the juju-gui service and ensure
that directory is cleaned up.


Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
This branch contains Public information 
Everyone can see this information.