~pwlars/uci-engine/tr-pass-no-tests

« back to all changes in this revision

Viewing changes to juju-deployer/deploy.py

  • Committer: Ubuntu CI Bot
  • Author(s): Vincent Ladeuil
  • Date: 2014-08-05 07:10:33 UTC
  • mfrom: (731.1.5 persistent-pg)
  • Revision ID: ubuntu_ci_bot-20140805071033-2otb2lb60v9sdnlz
[r=Evan Dandrea, PS Jenkins bot] Add postgresql persistence to the ticket system service.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
        'CI_CODE_SOURCE': 'branch',
105
105
        'CI_BRANCH': 'lp:uci-engine',
106
106
        'CI_PAYLOAD_URL': 'n/a',
 
107
        'CI_STORAGE_PROVIDER': None,
107
108
        'CI_KEYS_BRANCH': '',
108
109
        'CI_LAUNCHPAD_USER': None,
109
110
        'CI_LAUNCHPAD_PPA_OWNER': None,
122
123
        'HP_TENANT_ID': None,
123
124
    }
124
125
 
 
126
    # The CI_STORAGE_PROVIDER is used for postgresql, for 'local' (lxc
 
127
    # containers, local files are used), for openstack deployments ('openstack'
 
128
    # provider), nova volumes named after the units are used.
 
129
    env_name = juju.environment_name()
 
130
    env = juju.environment(env_name)
 
131
    if env is not None:
 
132
        env_type = env.get('type', None)
 
133
    else:
 
134
        # Provide a safe default value when no juju env exist
 
135
        env_type = 'local'
 
136
    if env_type == 'openstack':
 
137
        os.environ['CI_STORAGE_PROVIDER'] = 'block-storage-broker'
 
138
    elif env_type == 'local':
 
139
        os.environ['CI_STORAGE_PROVIDER'] = 'local'
 
140
    else:
 
141
        msg = 'ERROR: {} is not a known juju deployment type for {}'
 
142
        sys.exit(msg.format(env_type, env_name))
 
143
 
125
144
    is_hpcloud = unit_config.is_hpcloud()
126
145
    missing_required = []
127
146
    for key in cheetah_vars: