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

Unified Diff: quickstart/manage.py

Issue 90570044: Support trusty environments.
Patch Set: Support trusty environments. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « quickstart/cli/views.py ('k') | quickstart/models/envs.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: quickstart/manage.py
=== modified file 'quickstart/manage.py'
--- quickstart/manage.py 2014-04-22 12:20:10 +0000
+++ quickstart/manage.py 2014-04-23 11:22:44 +0000
@@ -153,10 +153,9 @@
# The user requested a bundle deployment.
options.bundle and
# This is the official Juju GUI charm.
- charm.name == settings.JUJU_GUI_CHARM_NAME and
- not charm.user and
+ charm.name == settings.JUJU_GUI_CHARM_NAME and not charm.user and
# The charm at this revision does not support bundle deployments.
- charm.revision < settings.MINIMUM_CHARM_REVISION_FOR_BUNDLES
+ charm.revision < settings.MINIMUM_REVISIONS_FOR_BUNDLES[charm.series]
):
return parser.error(
'bundle deployments not supported by the requested charm '
@@ -449,16 +448,15 @@
print('bootstrapping the {} environment (type: {})'.format(
options.env_name, options.env_type))
- is_local = options.env_type == 'local'
requires_sudo = False
- if is_local:
+ if options.env_type == 'local':
# If this is a local environment, notify the user that "sudo" will be
# required to bootstrap the application, even in newer Juju versions
# where "sudo" is invoked by juju-core itself.
print('sudo privileges will be required to bootstrap the environment')
# If the Juju version is less than 1.17.2 then use sudo for local envs.
requires_sudo = juju_version < (1, 17, 2)
- already_bootstrapped, bsn_series = app.bootstrap(
+ already_bootstrapped, bootstrap_node_series = app.bootstrap(
options.env_name, requires_sudo=requires_sudo, debug=options.debug)
# Retrieve the admin-secret for the current environment.
@@ -478,15 +476,15 @@
print('connecting to {}'.format(api_url))
env = app.connect(api_url, admin_secret)
- # It is not possible to deploy on the bootstrap node if we are using the
- # local provider, or if the bootstrap node series is not compatible with
- # the Juju GUI charm.
- machine = '0'
- if is_local or (bsn_series != settings.JUJU_GUI_PREFERRED_SERIES):
- machine = None
+ # Inspect the environment and deploy the charm if required.
+ charm_url, machine, service_data, unit_data = app.check_environment(
+ env, settings.JUJU_GUI_SERVICE_NAME, options.charm_url,
+ options.env_type, bootstrap_node_series, already_bootstrapped)
unit_name = app.deploy_gui(
- env, settings.JUJU_GUI_SERVICE_NAME, machine,
- charm_url=options.charm_url, check_preexisting=already_bootstrapped)
+ env, settings.JUJU_GUI_SERVICE_NAME, charm_url, machine,
+ service_data, unit_data)
+
+ # Observe the deployment progress.
address = app.watch(env, unit_name)
env.close()
url = 'https://{}'.format(address)
« no previous file with comments | « quickstart/cli/views.py ('k') | quickstart/models/envs.py » ('j') | no next file with comments »

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