Merge lp:~cprov/tanuki-continuous-deployer/local-provider into lp:tanuki-continuous-deployer

Proposed by Celso Providelo
Status: Work in progress
Proposed branch: lp:~cprov/tanuki-continuous-deployer/local-provider
Merge into: lp:tanuki-continuous-deployer
Diff against target: 70 lines (+36/-17)
1 file modified
ci_automation/juju.py (+36/-17)
To merge this branch: bzr merge lp:~cprov/tanuki-continuous-deployer/local-provider
Reviewer Review Type Date Requested Status
Tanuki Squad Pending
Review via email: mp+271230@code.launchpad.net

Commit message

--devel option now deploys on top of a local-provider (lxc) environment

Description of the change

--devel option now deploys on top of a local-provider (lxc) environment

Setup as described in https://jujucharms.com/docs/stable/config-LXC

Install mojo spec dependency:

{{{
$ sudo apt-get install python-configparser
}}}

Deploy, let's say, spec-manager:

{{{
/cd.py --stage ols/mojo-ols-spec-manager/devel --branch ../tanuki-specs --base ~/juju-environments/ --devel
}}}

It should fail on top of aufs + ext4, we need to disable spi-postgresql SSL to avoid key permission issues (https://wiki.postgresql.org/wiki/May_2015_Fsync_Permissions_Bug)

To post a comment you must log in.

Unmerged revisions

21. By Celso Providelo

--devel uses local-provider

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ci_automation/juju.py'
--- ci_automation/juju.py 2015-08-27 22:03:43 +0000
+++ ci_automation/juju.py 2015-09-16 05:03:14 +0000
@@ -185,31 +185,50 @@
185 destroy_environment(name, base)185 destroy_environment(name, base)
186186
187 os.makedirs(env_dir)187 os.makedirs(env_dir)
188
189 if devel:
190 # EC2
191 #env_config = {
192 # 'type': 'ec2',
193 # 'region': 'us-east-1',
194 # 'image-stream': 'released',
195 #}
196 # LOCAL
197 env_config = {
198 'type': 'local',
199 'admin-secret': 'super-secret',
200 'default-series': 'trusty',
201 'lxc-clone': True,
202 # postgres chokes over aufs ...
203 'lxc-clone-aufs': True,
204 }
205 else:
206 # PS4.5
207 env_config = {
208 'type': 'openstack',
209 'control-bucket': 'juju-{}'.format(name),
210 # If we ever remove this, we'll need to manually
211 # set security group rules allowing ssh from
212 # 91.189.90.53/32. Juju creates these rules for
213 # 0.0.0.0, which juju-reaper removes (would
214 # allow public SSH for any instance with a
215 # floating IP).
216 'use-default-secgroup': True,
217 # Otherwise we chew up Prodstack's disk IO
218 # upgrading, but it doesn't work for 'bootstack' (our devel).
219 'image-stream': 'daily',
220 }
221
188 contents = {222 contents = {
189 'default': name,223 'default': name,
190 'environments': {224 'environments': {
191 name: {225 name: env_config,
192 'type': 'openstack',226 }
193 'control-bucket': 'juju-{}'.format(name),
194 # If we ever remove this, we'll need to manually
195 # set security group rules allowing ssh from
196 # 91.189.90.53/32. Juju creates these rules for
197 # 0.0.0.0, which juju-reaper removes (would
198 # allow public SSH for any instance with a
199 # floating IP).
200 'use-default-secgroup': 'true',
201 },
202 },
203 }227 }
204228
205 if network:229 if network:
206 contents['environments'][name]['network'] = network230 contents['environments'][name]['network'] = network
207231
208 if not devel:
209 # Otherwise we chew up Prodstack's disk IO
210 # upgrading, but it doesn't work for 'bootstack' (our devel).
211 contents['environments'][name]['image-stream'] = 'daily'
212
213 with open(os.path.join(env_dir, 'environments.yaml'), 'w') as fp:232 with open(os.path.join(env_dir, 'environments.yaml'), 'w') as fp:
214 fp.write(yaml.dump(contents, default_flow_style=False))233 fp.write(yaml.dump(contents, default_flow_style=False))
215234

Subscribers

People subscribed via source and target branches

to all changes: