Merge lp://qastaging/~frankban/charms/trusty/juju-gui/wss-secure into lp://qastaging/~juju-gui/charms/trusty/juju-gui/trunk
Status: | Merged |
---|---|
Merged at revision: | 262 |
Proposed branch: | lp://qastaging/~frankban/charms/trusty/juju-gui/wss-secure |
Merge into: | lp://qastaging/~juju-gui/charms/trusty/juju-gui/trunk |
Diff against target: |
277 lines (+138/-25) 8 files modified
config.yaml (+7/-0) hooks/backend.py (+15/-4) hooks/cached-website-relation-joined (+36/-0) hooks/utils.py (+8/-0) hooks/web-relation-joined (+5/-8) metadata.yaml (+2/-0) tests/test_backends.py (+33/-13) tests/test_utils.py (+32/-0) |
To merge this branch: | bzr merge lp://qastaging/~frankban/charms/trusty/juju-gui/wss-secure |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email:
|
Description of the change
Secure WebSockets on insecure GUI server.
Add the ability to explicitly set the WebSocket
protocol used by the connection established by the GUI
client.
Also implement the cached-website relation, that can be used,
for instance, to balance GUI WebSocket connections
in a relation with Apache2.
Both changes are useful in our production env.
Also fixed a bug on the web relation always sending
port 80 or 443 even when a customized port was specified
in the charm options.
Tests: `make unittest`.
QA:
- `juju bootstrap` an environment;
- `make deploy` this branch;
- wait for the GUI to be ready;
- visit the GUI and check that everything works,
and no errors are present in the JS console;
- run `juju set juju-gui secure=false`;
- wait for the GUI to be ready;
- visit the GUI on port 80 (insecure mode) and check
that everything works, and no errors are present
in the JS console;
- run `juju set juju-gui ws-secure=true`;
- wait for the GUI to be ready;
- visit the GUI on port 80 (insecure mode) and check
that NOTHING works, and you see an error in the JS
console similar to this: "WebSocket connection to
'wss:
failed";
- done, destroy the environment, thank you!
Reviewers: mp+261946_ code.launchpad. net,
Message:
Please take a look.
Description:
Secure WebSockets on insecure GUI server.
Add the ability to explicitly set the WebSocket
protocol used by the connection established by the GUI
client.
Also implement the cached-website relation, that can be used,
for instance, to balance GUI WebSocket connections
in a relation with Apache2.
Both changes are useful in our production env.
Also fixed a bug on the web relation always sending
port 80 or 443 even when a customized port was specified
in the charm options.
Tests: `make unittest`.
QA:
- `juju bootstrap` an environment;
- `make deploy` this branch;
- wait for the GUI to be ready;
- visit the GUI and check that everything works,
and no errors are present in the JS console;
- run `juju set juju-gui secure=false`;
- wait for the GUI to be ready;
- visit the GUI on port 80 (insecure mode) and check
that everything works, and no errors are present
in the JS console;
- run `juju set juju-gui ws-secure=true`;
- wait for the GUI to be ready;
- visit the GUI on port 80 (insecure mode) and check
that NOTHING works, and you see an error in the JS
console similar to this: "WebSocket connection to
'wss:// 10.0.3. 37/ws/environme nt/c54a52a6- b307-44ca- 8af2-2afc84f969 e4/api'
failed";
- done, destroy the environment, thank you!
https:/ /code.launchpad .net/~frankban/ charms/ trusty/ juju-gui/ wss-secure/ +merge/ 261946
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/242300043/
Affected files (+139, -25 lines): website- relation- joined relation- joined backends. py
A [revision details]
M config.yaml
M hooks/backend.py
A hooks/cached-
M hooks/utils.py
M hooks/web-
M metadata.yaml
M tests/test_
M tests/test_utils.py