~gary/charms/precise/juju-gui/markdown

« back to all changes in this revision

Viewing changes to hooks/start

  • Committer: Francesco Banconi
  • Date: 2012-12-13 08:42:59 UTC
  • mfrom: (9.1.5 juju-gui)
  • Revision ID: francesco.banconi@canonical.com-20121213084259-iy0pc1xc707hpx7z
Add support for jitsu deploy-to.

The charm already worked well when deployed in the bootstrap node using
the 'jitsu deploy-to' command. This branch adds a test for this behavior.

Other changes:

Slightly simplified how the staging option is retrieved in the start hook.

Fixed tests by changing the juju-gui upstart configuration file. Before
this change it was not possible for upstart to correctly stop the juju-gui
service, because upstart itself was not able to keep track of the PID.

Fixed the install hook: it was not idempotent (and the tests were broken
for this reason too).

R=matthew.scott, gary.poster
CC=
https://codereview.appspot.com/6929057

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
def main():
109
109
    config = get_config()
110
110
    juju_api_port = config['juju-api-port']
111
 
    start_gui(juju_api_port, config['juju-gui-console-enabled'],
112
 
              config.get('staging'))
113
 
    if config.get('staging'):
 
111
    staging = config.get('staging')
 
112
    start_gui(juju_api_port, config['juju-gui-console-enabled'], staging)
 
113
    if staging:
114
114
        start_improv(juju_api_port, config['staging-environment'])
115
115
    else:
116
116
        start_agent(juju_api_port)