Created by Gary Poster on 2013-02-08 and last modified on 2013-02-08
Get this branch:
bzr branch lp:~gary/juju-gui/bug1117896
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

32. By Gary Poster on 2013-02-08

might fix bug 1117896. Untested.

31. By Francesco Banconi on 2013-02-06

Add an option to start test server.

Added the "serve-tests" option to the charm,
defaulting to False. When the option is enabled
it is possible to run the Juju GUI unit tests
using https://[sevice url]/test/.

I needed to conditionally add the corresponding
location to the nginx configuration file.
I discussed with Gary about possible ways to
achieve this. Using the standard Python string
substitution seemed hacky, and the resulting
template file could be less readable. We decided
to start using a templating library: ended up with
tempita because it is lightweight and it is already
used in maas.

nginx is now configured so that the /test/ location:
- serves unit tests if "serve-tests" is True;
- redirects to / if "serve-tests" is False.
The latter is required because otherwise the test
location would be added to the browser appcache:
the index.html file would be served and it references
the manifest file.

Also fixed dependency management in the install
hook. Now all the Python libraries required by the
charm are installed at the beginning of the process,
before utils, launchpadlib, tempita etc. are imported.


- deploy the charm;
- juju set juju-gui serve-tests=true;
- go to "https://[sevice url]/test/";
- you should see tests run (mocha html reporter).


test-debug (staging=true) fails to run because
it attempts to load external (insecure) resources.
Filed bug #1116320.

R=gary.poster, teknico

30. By Francesco Banconi on 2013-02-01

Serve HTTPS and WebSocket on the same port.

The WebSocket connection must be established on
port 443, so that using Firefox securely no longer
requires the user to accept a self-signed certificate
twice: once for the HTTPS port and once for the wss port.

HAProxy is used to do that: juju-gui/ppa contains the
development release of HAProxy, supporting SSL.
HTTPS traffic is sent to nginx (port 8000), and wss
connections are redirected to the underlaying API
backend (port 8080). The juju-api-port option has been
removed: since that port is no longer exposed, the one
being used can be considered just an internal

Other changes:

Updated documentation.

Moved static upstart configuration files set up to the
install hook. This way, a config change no longer causes
them to be rewritten as they are over and over.

Some renaming and clean up.


- deploy the charm
- open the application using Firefox
- add the security exception
- you should see the Juju GUI login screen
- now try staging: juju set juju-gui staging=true
- compulsively refresh Firefox
- admire the services

R=gary.poster, teknico

29. By Francesco Banconi on 2013-01-24

Fixes for bug #1103035.

Add the "curl" package as an install dependency: some OS images may not
include it by default.

Remove the "user" and "password" options from the "config.yaml" file.
Those credentials are easily discoverable and insecure. The code still
hardwires bypassing the authenticating step when deploying to staging.

Move the "maintainer" line to below the "summary" one in "metadata.yaml".

README file:

- list the currently supported web browsers;
- explain the self-signed certificate workaround currently needed to
  make Firefox work;
- anonymize the EC2 addresses.

R=gary.poster, matthew.scott

28. By Francesco Banconi on 2013-01-22

Fix "file not found" error.

If the last stable release does not contain
a file, deploying a charm failed with a
"file not found" error. We encounter this
problem, e.g., while uploading a new release:
the release is created in Launchpad, but the
file takes a bit before being ready.
Now the relevant function tries previous
releases before failing.
Also fixed a functional test failing because
now staging does not require explicit
authentication (user and password are
provided by the config file).

R=bac, teknico

27. By Francesco Banconi on 2013-01-21

Fix charm according to "charm proof"

Add copyright file and maintainer, and remove "juju" key.
Landing Gary's branch.


26. By Francesco Banconi on 2013-01-17

User, password and read-only options.

This branch adds three more options to
the charm. If staging is true, user and
password options are ignored, and the
authentication is automatically handled
by the charm, providing staging pre-defined


25. By Francesco Banconi on 2013-01-11

Juju GUI source as env var + Charm test branch

This branch introduces the possibility to provide
the Juju GUI source (used in tests) by setting an
environment variable. This way the charm tests can
be run as part of the release qa process, e.g.:

$ JUJU_GUI_SOURCE=lp:mybranch jitsu test juju-gui ...

or, to test a new trunk release:

$ JUJU_GUI_SOURCE=trunk jitsu test juju-gui ...

Also updated the test exercising the process of
making a release from a branch, i.e. when the
juju-gui-source option points to a Bazaar branch.

Now the branch used is a customized one, present in
`lp:~frankban/juju-gui/charm-tests-branch` (please
feel free to suggest another, more sane, location,
and please take a look at that as part of your reviews).
This is a test branch containing only a minimal
Makefile and a release tarball. There, `make distfile`
is almost a no-op, and for this reason the charm test
speed is slightly increased (~4 minutes on ec2).
Source: http://bazaar.launchpad.net/~frankban/juju-gui/charm-tests-branch/files

R=gary.poster, teknico

24. By Nicola Larosa on 2013-01-11

Update the README and HACKING docs

Update the README.md and HACKING.md docs to reflect the current
status. Add to the former a section and link to the demo/staging
server (https://uistage.jujucharms.com:8080/).

R=gary.poster, frankban

23. By Francesco Banconi on 2013-01-11

Implemented Selenium tests and login-help.

This branch introduces integration tests based
on Selenium. This way it is possible to check that
the GUI actually works, is connected to the API
backend, etc.

Firefox is the webdriver used here, it is installed
by default in Ubuntu. All the graphical operations
are executed in memory thanks to xvfbwrapper.

This branch also includes the changes Gary made to
add a charm option for the login help text.

R=gary.poster, teknico

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.