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

Proposed by Celso Providelo on 2015-09-16
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 2015-09-16 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 on 2015-09-16

--devel uses local-provider

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ci_automation/juju.py'
2--- ci_automation/juju.py 2015-08-27 22:03:43 +0000
3+++ ci_automation/juju.py 2015-09-16 05:03:14 +0000
4@@ -185,31 +185,50 @@
5 destroy_environment(name, base)
6
7 os.makedirs(env_dir)
8+
9+ if devel:
10+ # EC2
11+ #env_config = {
12+ # 'type': 'ec2',
13+ # 'region': 'us-east-1',
14+ # 'image-stream': 'released',
15+ #}
16+ # LOCAL
17+ env_config = {
18+ 'type': 'local',
19+ 'admin-secret': 'super-secret',
20+ 'default-series': 'trusty',
21+ 'lxc-clone': True,
22+ # postgres chokes over aufs ...
23+ 'lxc-clone-aufs': True,
24+ }
25+ else:
26+ # PS4.5
27+ env_config = {
28+ 'type': 'openstack',
29+ 'control-bucket': 'juju-{}'.format(name),
30+ # If we ever remove this, we'll need to manually
31+ # set security group rules allowing ssh from
32+ # 91.189.90.53/32. Juju creates these rules for
33+ # 0.0.0.0, which juju-reaper removes (would
34+ # allow public SSH for any instance with a
35+ # floating IP).
36+ 'use-default-secgroup': True,
37+ # Otherwise we chew up Prodstack's disk IO
38+ # upgrading, but it doesn't work for 'bootstack' (our devel).
39+ 'image-stream': 'daily',
40+ }
41+
42 contents = {
43 'default': name,
44 'environments': {
45- name: {
46- 'type': 'openstack',
47- 'control-bucket': 'juju-{}'.format(name),
48- # If we ever remove this, we'll need to manually
49- # set security group rules allowing ssh from
50- # 91.189.90.53/32. Juju creates these rules for
51- # 0.0.0.0, which juju-reaper removes (would
52- # allow public SSH for any instance with a
53- # floating IP).
54- 'use-default-secgroup': 'true',
55- },
56- },
57+ name: env_config,
58+ }
59 }
60
61 if network:
62 contents['environments'][name]['network'] = network
63
64- if not devel:
65- # Otherwise we chew up Prodstack's disk IO
66- # upgrading, but it doesn't work for 'bootstack' (our devel).
67- contents['environments'][name]['image-stream'] = 'daily'
68-
69 with open(os.path.join(env_dir, 'environments.yaml'), 'w') as fp:
70 fp.write(yaml.dump(contents, default_flow_style=False))
71

Subscribers

People subscribed via source and target branches

to all changes: