lp:~frankban/charms/precise/juju-gui/bug-1132905-log-hook
- Get this branch:
- bzr branch lp:~frankban/charms/precise/juju-gui/bug-1132905-log-hook
Branch merges
- Juju GUI Hackers: Pending requested
-
Diff: 285 lines (+83/-41)6 files modifiedhooks/config-changed (+2/-11)
hooks/install (+4/-14)
hooks/start (+2/-6)
hooks/stop (+6/-10)
hooks/utils.py (+23/-0)
tests/test_utils.py (+46/-0)
Related bugs
Related blueprints
Branch information
- Owner:
- Francesco Banconi
- Status:
- Development
Recent revisions
- 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 servicesR=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. - 26. By Francesco Banconi
-
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
values. - 25. By Francesco Banconi
-
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
CC=
https://codereview. appspot. com/7102044 - 24. By Nicola Larosa
-
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
CC=
https://codereview. appspot. com/7103043 - 23. By Francesco Banconi
-
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
CC=
https://codereview. appspot. com/7064068
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:~charmers/charms/precise/juju-gui/trunk