Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2592)

Issue 6846132: Juju GUI charm connects to its environment

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by frankban
Modified:
11 years, 3 months ago
Reviewers:
mp+137140
Visibility:
Public.

Description

Juju GUI charm connects to its environment This branch implements the ability to deploy the Juju GUI charm so that it is actually connected to the real Juju environment. This is done by starting the juju API agent pointing it to the Zookeeper address of the environment. That part is a translation into Python of what Kapil already did in the bash charm. Other changes: Changed README: now python-charmhelpers needs to be installed to run functional tests. python-shelltoolbox is installed as a dependency of python-charmhelpers. Added a juju-api-port config option. The staging and real API agents use by default different ports. I decided to add an option so that the user can select the port where the websocket server will be listening. In a future branch we should let users customize the Juju GUI port too. Added a staging boolean flag to the config options: by default is False (real env); users can set it to True to start the staging server. Also added a staging-environment config option: if Juju staging is started, here the users can select what kind of environment to show up in the GUI. Fixed start up configuration scripts: now upstart correctly keeps track of the process ids, and the services can be correctly stopped. Added an upstart configuration template for the real API agent. Added more functional tests, and implemented a workaround for bug 872264. I run the test suite in ec2 ~10 times without failures, setting the jitsu timeout to 40 minutes. Note that rsync raises an error during the test process: rsync: link_stat "/var/lib/juju/units/*/charm.log" failed: No such file or directory. This is not an error of the tests, but a test runner failure while trying to retrieve the logs from a destroyed unit. https://code.launchpad.net/~frankban/charms/precise/juju-gui/bug-1074412-real-env/+merge/137140 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 21

Patch Set 2 : Juju GUI charm connects to its environment #

Patch Set 3 : Juju GUI charm connects to its environment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -51 lines) Patch
M README.txt View 1 2 2 chunks +8 lines, -4 lines 0 comments Download
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M config.yaml View 1 2 1 chunk +21 lines, -3 lines 0 comments Download
M config/config.js.template View 1 1 chunk +1 line, -1 line 0 comments Download
A config/juju-api-agent.conf.template View 1 chunk +13 lines, -0 lines 0 comments Download
M config/juju-api-improv.conf.template View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M config/juju-gui.conf.template View 1 chunk +1 line, -1 line 0 comments Download
M hooks/install View 1 1 chunk +13 lines, -9 lines 0 comments Download
M hooks/start View 1 2 2 chunks +67 lines, -21 lines 0 comments Download
M hooks/stop View 1 2 2 chunks +9 lines, -2 lines 0 comments Download
M hooks/utils.py View 1 chunk +14 lines, -0 lines 0 comments Download
M revision View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/deploy.test View 1 3 chunks +61 lines, -6 lines 0 comments Download
M tests/test_utils.py View 1 chunk +20 lines, -1 line 0 comments Download

Messages

Total messages: 7
frankban
Please take a look.
11 years, 4 months ago (2012-11-30 10:10:31 UTC) #1
gary.poster
Hi Francesco. This looks good to me. Thank you. I have a very few actionable ...
11 years, 4 months ago (2012-11-30 14:32:18 UTC) #2
frankban
Please take a look. https://codereview.appspot.com/6846132/diff/1/config.yaml File config.yaml (right): https://codereview.appspot.com/6846132/diff/1/config.yaml#newcode16 config.yaml:16: default: 8081 On 2012/11/30 14:32:18, ...
11 years, 4 months ago (2012-11-30 17:37:01 UTC) #3
frankban
Thanks for the review Gary. Test timeouts are really weird, and I am still not ...
11 years, 4 months ago (2012-11-30 17:40:09 UTC) #4
bac
Hi Francesco, Approved with fixes. (I think that is one of the new things we're ...
11 years, 4 months ago (2012-11-30 18:57:11 UTC) #5
frankban
Thanks for the review Brad. I agree with you: shelltoolbox is a great tool, and ...
11 years, 3 months ago (2012-12-03 10:10:55 UTC) #6
frankban
11 years, 3 months ago (2012-12-03 11:18:05 UTC) #7
*** Submitted:

Juju GUI charm connects to its environment

This branch implements the ability to deploy the
Juju GUI charm so that it is actually connected to
the real Juju environment.
This is done by starting the juju API agent pointing
it to the Zookeeper address of the environment.
That part is a translation into Python of what Kapil
already did in the bash charm.

Other changes:

Changed README: now python-charmhelpers needs to be
installed to run functional tests. python-shelltoolbox
is installed as a dependency of python-charmhelpers.

Added a juju-api-port config option. The staging and
real API agents use by default different ports. I
decided to add an option so that the user can select
the port where the websocket server will be listening.
In a future branch we should let users customize the
Juju GUI port too.

Added a staging boolean flag to the config options:
by default is False (real env); users can set it to
True to start the staging server.

Also added a staging-environment config option:
if Juju staging is started, here the users can
select what kind of environment to show up in the GUI.

Fixed start up configuration scripts: now upstart
correctly keeps track of the process ids, and the
services can be correctly stopped.

Added an upstart configuration template for the real
API agent.

Added more functional tests, and implemented a
workaround for bug 872264. I run the test suite in ec2
~10 times without failures, setting the jitsu timeout
to 40 minutes.

Note that rsync raises an error during the test process:
rsync: link_stat "/var/lib/juju/units/*/charm.log" failed:
No such file or directory. This is not an error of the tests,
but a test runner failure while trying to retrieve the logs
from a destroyed unit.

R=gary.poster, bac
CC=
https://codereview.appspot.com/6846132
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b