Merge lp:~thomir-deactivatedaccount/adt-cloud-worker/trunk-separate-creds into lp:adt-cloud-worker

Proposed by Thomi Richards
Status: Merged
Approved by: Thomi Richards
Approved revision: 48
Merged at revision: 47
Proposed branch: lp:~thomir-deactivatedaccount/adt-cloud-worker/trunk-separate-creds
Merge into: lp:adt-cloud-worker
Diff against target: 101 lines (+36/-10)
3 files modified
README.rst (+25/-6)
adt-service.conf (+9/-2)
adt_cloud_worker/__init__.py (+2/-2)
To merge this branch: bzr merge lp:~thomir-deactivatedaccount/adt-cloud-worker/trunk-separate-creds
Reviewer Review Type Date Requested Status
Celso Providelo (community) Approve
Review via email: mp+258568@code.launchpad.net

Commit message

Split credentials for launching ephemeral testbed instances from talking to swift.

Description of the change

Split credentials for launching ephemeral testbed instances from talking to swift.

To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README.rst'
--- README.rst 2015-04-29 03:23:22 +0000
+++ README.rst 2015-05-07 22:12:37 +0000
@@ -64,19 +64,38 @@
6464
65Creating/updating the sample configuration file in 'adt-service.conf'::65Creating/updating the sample configuration file in 'adt-service.conf'::
6666
67 # `adt-cloud-worker` configuration file.
67 [adt]68 [adt]
68 name = foo69 archive_mirror = http://nova.clouds.archive.ubuntu.com/ubuntu/
69 tags = i386.nova amd64.nova70 #http_proxy = http://squid.internal:3128/
7071
72 # These determine how adt-run will boot nova instances.
73 os_username = foo
74 os_tenant_name = foo_project
75 os_password = <redacted>
76 os_auth_url = http://172.20.161.138:5000/v2.0/
77 os_region_name = bot-prototype
78 extra_args = --net-id=415a0839-eb05-4e7a-907c-413c657f4bf5
79
71 [amqp]80 [amqp]
72 uris = amqp://guest:guest@localhost:5672//81 uris = amqp://guest:guest@localhost:5672//
7382
74 [nova]83 [nova]
84 # These determine how this service talks to swift.
75 os_username = foo85 os_username = foo
76 os_tenant_name = foo_project86 os_tenant_name = foo_project
77 os_password = xxx87 os_password = <redacted>
78 os_auth_url = http://172.20.161.138:5000/v2.0/88 os_auth_url = http://172.20.161.138:5000/v2.0/
79 os_region_name = bot_prototype89 os_region_name = bot-prototype
90
91 [logstash]
92 host = localhost
93 port = 5959
94 version = 1
95
96 The logstash section is optional. If it's present, a logstash logging handler will be configured with those details.
97
98 Note that there are two sets of openstack authentication details. The [adt] section contains the details that adt-run will use to spawn testbed instances. The service reads these and exports them as environment variables that adt-run then reads. The [nova] section contains the options used to talk to swift (for publishing results) and glance (for grabbing image names).
80 99
81Running the executable for help::100Running the executable for help::
82101
83102
=== modified file 'adt-service.conf'
--- adt-service.conf 2015-04-27 20:01:09 +0000
+++ adt-service.conf 2015-05-07 22:12:37 +0000
@@ -3,17 +3,24 @@
3archive_mirror = http://nova.clouds.archive.ubuntu.com/ubuntu/3archive_mirror = http://nova.clouds.archive.ubuntu.com/ubuntu/
4#http_proxy = http://squid.internal:3128/4#http_proxy = http://squid.internal:3128/
55
6# These determine how adt-run will boot nova instances.
7os_username = foo
8os_tenant_name = foo_project
9os_password = <redacted>
10os_auth_url = http://172.20.161.138:5000/v2.0/
11os_region_name = bot-prototype
12extra_args = --net-id=415a0839-eb05-4e7a-907c-413c657f4bf5
13
6[amqp]14[amqp]
7uris = amqp://guest:guest@localhost:5672//15uris = amqp://guest:guest@localhost:5672//
816
9[nova]17[nova]
10# Matching OS_ env_vars.18# These determine how this service talks to swift.
11os_username = foo19os_username = foo
12os_tenant_name = foo_project20os_tenant_name = foo_project
13os_password = <redacted>21os_password = <redacted>
14os_auth_url = http://172.20.161.138:5000/v2.0/22os_auth_url = http://172.20.161.138:5000/v2.0/
15os_region_name = bot-prototype23os_region_name = bot-prototype
16extra_args = --net-id=415a0839-eb05-4e7a-907c-413c657f4bf5
1724
18[logstash]25[logstash]
19host = localhost26host = localhost
2027
=== modified file 'adt_cloud_worker/__init__.py'
--- adt_cloud_worker/__init__.py 2015-04-29 01:10:15 +0000
+++ adt_cloud_worker/__init__.py 2015-05-07 22:12:37 +0000
@@ -59,7 +59,7 @@
59 self.connection = connection59 self.connection = connection
60 self.config = config60 self.config = config
61 # Set the nova configuration env vars:61 # Set the nova configuration env vars:
62 _set_nova_environment_variables(self.config.items('nova'))62 _set_nova_environment_variables(self.config.items('adt'))
63 # Worker is named after the machine hostname created by juju:63 # Worker is named after the machine hostname created by juju:
64 # juju-<env_name>-machine-<machine_number>64 # juju-<env_name>-machine-<machine_number>
65 # By getting rid of the '-machine' term, the worker name is65 # By getting rid of the '-machine' term, the worker name is
@@ -107,7 +107,7 @@
107 adt_kwargs = body.copy()107 adt_kwargs = body.copy()
108 adt_kwargs['result_dir'] = result_dir108 adt_kwargs['result_dir'] = result_dir
109 adt_kwargs['nova_extra_args'] = self.config.get(109 adt_kwargs['nova_extra_args'] = self.config.get(
110 'nova', 'extra_args').split()110 'adt', 'extra_args').split()
111 adt_kwargs['nova_flavor'] = get_default_testbed_flavor()111 adt_kwargs['nova_flavor'] = get_default_testbed_flavor()
112 adt_kwargs['archive_mirror'] = self.config.get(112 adt_kwargs['archive_mirror'] = self.config.get(
113 'adt', 'archive_mirror')113 'adt', 'archive_mirror')

Subscribers

People subscribed via source and target branches

to all changes: