Merge lp://qastaging/~frankban/charms/precise/juju-gui/http-proxy into lp://qastaging/~juju-gui/charms/precise/juju-gui/trunk
Status: | Merged |
---|---|
Merged at revision: | 156 |
Proposed branch: | lp://qastaging/~frankban/charms/precise/juju-gui/http-proxy |
Merge into: | lp://qastaging/~juju-gui/charms/precise/juju-gui/trunk |
Diff against target: |
583 lines (+340/-12) 12 files modified
hooks/backend.py (+5/-1) server-requirements.pip (+4/-2) server/guiserver/__init__.py (+10/-3) server/guiserver/apps.py (+5/-0) server/guiserver/handlers.py (+61/-1) server/guiserver/manage.py (+5/-1) server/guiserver/tests/helpers.py (+13/-1) server/guiserver/tests/test_apps.py (+8/-0) server/guiserver/tests/test_handlers.py (+132/-0) server/guiserver/tests/test_utils.py (+66/-0) server/guiserver/utils.py (+26/-1) tests/test_backends.py (+5/-2) |
To merge this branch: | bzr merge lp://qastaging/~frankban/charms/precise/juju-gui/http-proxy |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Ceppi (community) | Abstain | ||
Juju GUI Charmers | Pending | ||
Review via email:
|
Description of the change
Add putcharm support to the GUI server.
Implement a proxy handler propagating requests/responses from
the GUI to the real juju-core HTTPS endpoint.
Tests: `make unittest`.
QA:
QA must be done using juju-core trunk.
I used revno 2265 for the following.
1) Bootstrap a juju environment, deploy the GUI charm
and get the latest GUI sources:
juju bootstrap
make deploy
juju set juju-gui juju-gui-source="https:/
2) wait for the GUI to be ready
(using `juju debug-log` or `tailf ~/.juju/
if you bootstrapped a local environment).
This step takes a while.
3) Open the GUI with Chrome and log in. Open the network tab of the
Chrome JavaScript console and refresh.
4) In the terminal, open and observe the GUI server logs:
juju ssh juju-gui/0 sudo tailf /var/log/
5) Drag and drop a zipped archive of a local charm.
Charm files (e.g. metadata.yaml) must be on the zip root.
You can use an haproxy archive I used for tests:
it is available in http://
At this point you should see a 200 response in the gui server logs,
and a notification in the GUI itself.
Moreover, if you inspect the request from the JavaScript console,
you should see a response including info about the charm you
just uploaded: if you used haproxy, you should see
{"CharmURL"
Done!. If you want additional fun, you can now try to
execute the following in the Chrome console:
app.
Replace "local:
In a couple of seconds you should see the "myservice" box appearing
in a pending state. Congratulations, you deployed a local
charm from the GUI! :-)
6) Destroy the environment.
Reviewers: mp+203612_ code.launchpad. net,
Message:
Please take a look.
Description:
Add putcharm support to the GUI server.
Implement a proxy handler propagating requests/responses from
the GUI to the real juju-core HTTPS endpoint.
Tests: `make unittest`.
QA:
QA must be done using juju-core trunk.
I used revno 2265 for the following.
1) Bootstrap a juju environment, deploy the GUI charm /github. com/juju/ juju-gui. git"
and get the latest GUI sources:
juju bootstrap
make deploy
juju set juju-gui
juju-gui-source="https:/
2) wait for the GUI to be ready local/log/ unit-juju- gui-0.log`
(using `juju debug-log` or `tailf ~/.juju/
if you bootstrapped a local environment).
This step takes a while.
3) Open the GUI with Chrome and log in. Open the network tab of the
Chrome JavaScript console and refresh.
4) In the terminal, open and observe the GUI server logs: upstart/ guiserver. log
juju ssh juju-gui/0 sudo tailf /var/log/
5) Drag and drop a zipped archive of a local charm. ubuntuone. com/3FRDrcjSECy Hp3xLmMIZLY
Charm files (e.g. metadata.yaml) must be on the zip root.
You can use an haproxy archive I used for tests:
it is available in http://
At this point you should see a 200 response in the gui server logs, :"local: precise/ haproxy- 0"}.
and a notification in the GUI itself.
Moreover, if you inspect the request from the JavaScript console,
you should see a response including info about the charm you
just uploaded: if you used haproxy, you should see
{"CharmURL"
Done!. If you want additional fun, you can now try to env.deploy( 'local: precise/ haproxy- 0', 'myservice', null, null, precise/ haproxy- 0" with the charm URL you used.
execute the following in the Chrome console:
app.
1)
Replace "local:
In a couple of seconds you should see the "myservice" box appearing
in a pending state. Congratulations, you deployed a local
charm from the GUI! :-)
6) Destroy the environment.
https:/ /code.launchpad .net/~frankban/ charms/ precise/ juju-gui/ http-proxy/ +merge/ 203612
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/57820043/
Affected files (+340, -12 lines): requirements. pip guiserver/ __init_ _.py guiserver/ apps.py guiserver/ handlers. py guiserver/ manage. py guiserver/ tests/helpers. py guiserver/ tests/test_ apps.py guiserver/ tests/test_ handlers. py guiserver/ tests/test_ utils.py guiserver/ utils.py backends. py
A [revision details]
M hooks/backend.py
M server-
M server/
M server/
M server/
M server/
M server/
M server/
M server/
M server/
M server/
M tests/test_