lp:~hatch/charms/precise/juju-gui-conflict/trunk

Created by Jeff Pihach and last modified
Get this branch:
bzr branch lp:~hatch/charms/precise/juju-gui-conflict/trunk
Only Jeff Pihach can upload to this branch. If you are Jeff Pihach please log in for upload directions.

Related bugs

Related blueprints

Branch information

Owner:
Jeff Pihach
Status:
Development

Recent revisions

36. By Jeff Pihach

removed npm dependency

35. By Richard Harding

Adjust config comments to align with juju-gui tweaks for subapp support.

34. By Gary Poster

add support for socket_protocol so that the websocket address can be generated dynamically in the browser for greater deployment flexibility (such as canonistack), while maintaining backwards compatibility with earlier GUI releases. Note that, as of this writing, you need to use lp:juju-gui (trunk) to make this dynamic addressing work.
add ability to deploy insecurely (http/ws), in order to facilitate CI tests
add tests for new functionality
update documentation
speed up default deployment by only getting staging dependencies when needed, and only getting build dependencies when needed (bug 1117896). On EC2, this speeds up the default deployment (from release) by about 2.5 minutes.
work around backward incompatibility in update to charmhelpers' log function.
increase timeout for tests to make them pass more often

33. By Francesco Banconi

Handle browser warning dialog in deploy tests.

This branch fixes the test failures caused by
Firefox not being able to handle the
"your browser is not supported" dialog.

Also updated the charm testing branch, including
the latest stable release (v0.2.1): see
http://bazaar.launchpad.net/~juju-gui/juju-gui/charm-tests-branch/files

R=gary.poster, teknico
CC=
https://codereview.appspot.com/7398057

32. By Francesco Banconi

Add and use a log_hook context manager.

Replace the current calls to log_entry and log_exit in the __main__ of
the hooks with a log_hook context manager, simplifying the code a bit.

Avoiding log_entry and log_exit also temporarily works around a problem
they have with the juju-core handling of strings starting with "--" in
juju-log.

R=gary.poster
CC=
https://codereview.appspot.com/7379050

31. By Francesco Banconi

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.

QA:

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

Problems:

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

R=gary.poster, teknico
CC=
https://codereview.appspot.com/7306045

30. By Francesco Banconi

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
implementation.

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.

QA:

- 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
CC=
https://codereview.appspot.com/7253043

29. By Francesco Banconi

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
CC=
https://codereview.appspot.com/7205044

28. By Francesco Banconi

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
CC=
https://codereview.appspot.com/7177049

27. By Francesco Banconi

Fix charm according to "charm proof"

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

R=
CC=
https://codereview.appspot.com/7182044

Branch metadata

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

Subscribers