Merge lp:~james-page/charms/trusty/glance/kilo into lp:~openstack-charmers-archive/charms/trusty/glance/next

Proposed by James Page
Status: Merged
Merged at revision: 104
Proposed branch: lp:~james-page/charms/trusty/glance/kilo
Merge into: lp:~openstack-charmers-archive/charms/trusty/glance/next
Diff against target: 310 lines (+251/-2)
8 files modified
hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken (+9/-0)
hooks/charmhelpers/contrib/openstack/templates/section-rabbitmq-oslo (+22/-0)
hooks/charmhelpers/core/services/helpers.py (+2/-2)
templates/kilo/glance-api-paste.ini (+77/-0)
templates/kilo/glance-api.conf (+83/-0)
templates/kilo/glance-registry-paste.ini (+30/-0)
templates/kilo/glance-registry.conf (+27/-0)
templates/parts/section-database (+1/-0)
To merge this branch: bzr merge lp:~james-page/charms/trusty/glance/kilo
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+254048@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #2880 glance-next for james-page mp254048
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/2880/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #2671 glance-next for james-page mp254048
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/2671/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2678 glance-next for james-page mp254048
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

Full amulet test output: http://paste.ubuntu.com/10676187/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2678/

104. By James Page

resync helpers

105. By James Page

Switch to using charm-helper templates for rabbitmq

106. By James Page

Switch to using charm-helper templates for keystone authtoken

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #2887 glance-next for james-page mp254048
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/2887/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #2678 glance-next for james-page mp254048
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/2678/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2685 glance-next for james-page mp254048
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  juju-test INFO : Results: 1 passed, 1 failed, 0 errored
  ERROR subprocess encountered error code 1

Full amulet test output: http://paste.ubuntu.com/10676417/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2685/

Revision history for this message
Liam Young (gnuoy) wrote :

Earlier issue was due to the version of kilo being installed. Deployment completed successfully using after switching to vivid and ppa:james-page/kilo

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken'
2--- hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken 1970-01-01 00:00:00 +0000
3+++ hooks/charmhelpers/contrib/openstack/templates/section-keystone-authtoken 2015-03-25 09:25:43 +0000
4@@ -0,0 +1,9 @@
5+{% if auth_host -%}
6+[keystone_authtoken]
7+identity_uri = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/{{ auth_admin_prefix }}
8+auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}/{{ service_admin_prefix }}
9+admin_tenant_name = {{ admin_tenant_name }}
10+admin_user = {{ admin_user }}
11+admin_password = {{ admin_password }}
12+signing_dir = {{ signing_dir }}
13+{% endif -%}
14
15=== added file 'hooks/charmhelpers/contrib/openstack/templates/section-rabbitmq-oslo'
16--- hooks/charmhelpers/contrib/openstack/templates/section-rabbitmq-oslo 1970-01-01 00:00:00 +0000
17+++ hooks/charmhelpers/contrib/openstack/templates/section-rabbitmq-oslo 2015-03-25 09:25:43 +0000
18@@ -0,0 +1,22 @@
19+{% if rabbitmq_host or rabbitmq_hosts -%}
20+[oslo_messaging_rabbit]
21+rabbit_userid = {{ rabbitmq_user }}
22+rabbit_virtual_host = {{ rabbitmq_virtual_host }}
23+rabbit_password = {{ rabbitmq_password }}
24+{% if rabbitmq_hosts -%}
25+rabbit_hosts = {{ rabbitmq_hosts }}
26+{% if rabbitmq_ha_queues -%}
27+rabbit_ha_queues = True
28+rabbit_durable_queues = False
29+{% endif -%}
30+{% else -%}
31+rabbit_host = {{ rabbitmq_host }}
32+{% endif -%}
33+{% if rabbit_ssl_port -%}
34+rabbit_use_ssl = True
35+rabbit_port = {{ rabbit_ssl_port }}
36+{% if rabbit_ssl_ca -%}
37+kombu_ssl_ca_certs = {{ rabbit_ssl_ca }}
38+{% endif -%}
39+{% endif -%}
40+{% endif -%}
41
42=== modified file 'hooks/charmhelpers/core/services/helpers.py'
43--- hooks/charmhelpers/core/services/helpers.py 2015-03-04 09:50:53 +0000
44+++ hooks/charmhelpers/core/services/helpers.py 2015-03-25 09:25:43 +0000
45@@ -139,7 +139,7 @@
46
47 def __init__(self, *args, **kwargs):
48 self.required_keys = ['host', 'user', 'password', 'database']
49- super(HttpRelation).__init__(self, *args, **kwargs)
50+ RelationContext.__init__(self, *args, **kwargs)
51
52
53 class HttpRelation(RelationContext):
54@@ -154,7 +154,7 @@
55
56 def __init__(self, *args, **kwargs):
57 self.required_keys = ['host', 'port']
58- super(HttpRelation).__init__(self, *args, **kwargs)
59+ RelationContext.__init__(self, *args, **kwargs)
60
61 def provide_data(self):
62 return {
63
64=== added directory 'templates/kilo'
65=== added file 'templates/kilo/glance-api-paste.ini'
66--- templates/kilo/glance-api-paste.ini 1970-01-01 00:00:00 +0000
67+++ templates/kilo/glance-api-paste.ini 2015-03-25 09:25:43 +0000
68@@ -0,0 +1,77 @@
69+# Use this pipeline for no auth or image caching - DEFAULT
70+[pipeline:glance-api]
71+pipeline = versionnegotiation osprofiler unauthenticated-context rootapp
72+
73+# Use this pipeline for image caching and no auth
74+[pipeline:glance-api-caching]
75+pipeline = versionnegotiation osprofiler unauthenticated-context cache rootapp
76+
77+# Use this pipeline for caching w/ management interface but no auth
78+[pipeline:glance-api-cachemanagement]
79+pipeline = versionnegotiation osprofiler unauthenticated-context cache cachemanage rootapp
80+
81+# Use this pipeline for keystone auth
82+[pipeline:glance-api-keystone]
83+pipeline = versionnegotiation osprofiler authtoken context rootapp
84+
85+# Use this pipeline for keystone auth with image caching
86+[pipeline:glance-api-keystone+caching]
87+pipeline = versionnegotiation osprofiler authtoken context cache rootapp
88+
89+# Use this pipeline for keystone auth with caching and cache management
90+[pipeline:glance-api-keystone+cachemanagement]
91+pipeline = versionnegotiation osprofiler authtoken context cache cachemanage rootapp
92+
93+# Use this pipeline for authZ only. This means that the registry will treat a
94+# user as authenticated without making requests to keystone to reauthenticate
95+# the user.
96+[pipeline:glance-api-trusted-auth]
97+pipeline = versionnegotiation osprofiler context rootapp
98+
99+# Use this pipeline for authZ only. This means that the registry will treat a
100+# user as authenticated without making requests to keystone to reauthenticate
101+# the user and uses cache management
102+[pipeline:glance-api-trusted-auth+cachemanagement]
103+pipeline = versionnegotiation osprofiler context cache cachemanage rootapp
104+
105+[composite:rootapp]
106+paste.composite_factory = glance.api:root_app_factory
107+/: apiversions
108+/v1: apiv1app
109+/v2: apiv2app
110+
111+[app:apiversions]
112+paste.app_factory = glance.api.versions:create_resource
113+
114+[app:apiv1app]
115+paste.app_factory = glance.api.v1.router:API.factory
116+
117+[app:apiv2app]
118+paste.app_factory = glance.api.v2.router:API.factory
119+
120+[filter:versionnegotiation]
121+paste.filter_factory = glance.api.middleware.version_negotiation:VersionNegotiationFilter.factory
122+
123+[filter:cache]
124+paste.filter_factory = glance.api.middleware.cache:CacheFilter.factory
125+
126+[filter:cachemanage]
127+paste.filter_factory = glance.api.middleware.cache_manage:CacheManageFilter.factory
128+
129+[filter:context]
130+paste.filter_factory = glance.api.middleware.context:ContextMiddleware.factory
131+
132+[filter:unauthenticated-context]
133+paste.filter_factory = glance.api.middleware.context:UnauthenticatedContextMiddleware.factory
134+
135+[filter:authtoken]
136+paste.filter_factory = keystonemiddleware.auth_token:filter_factory
137+delay_auth_decision = true
138+
139+[filter:gzip]
140+paste.filter_factory = glance.api.middleware.gzip:GzipMiddleware.factory
141+
142+[filter:osprofiler]
143+paste.filter_factory = osprofiler.web:WsgiMiddleware.factory
144+hmac_keys = SECRET_KEY
145+enabled = yes
146
147=== added file 'templates/kilo/glance-api.conf'
148--- templates/kilo/glance-api.conf 1970-01-01 00:00:00 +0000
149+++ templates/kilo/glance-api.conf 2015-03-25 09:25:43 +0000
150@@ -0,0 +1,83 @@
151+[DEFAULT]
152+verbose = {{ verbose }}
153+use_syslog = {{ use_syslog }}
154+debug = {{ debug }}
155+workers = {{ workers }}
156+
157+known_stores = {{ known_stores }}
158+{% if rbd_pool -%}
159+default_store = rbd
160+{% elif swift_store -%}
161+default_store = swift
162+{% else -%}
163+default_store = file
164+{% endif -%}
165+
166+bind_host = {{ bind_host }}
167+
168+{% if ext -%}
169+bind_port = {{ ext }}
170+{% elif bind_port -%}
171+bind_port = {{ bind_port }}
172+{% else -%}
173+bind_port = 9292
174+{% endif -%}
175+
176+log_file = /var/log/glance/api.log
177+backlog = 4096
178+
179+registry_host = {{ registry_host }}
180+registry_port = 9191
181+registry_client_protocol = http
182+
183+{% if api_config_flags -%}
184+{% for key, value in api_config_flags.iteritems() -%}
185+{{ key }} = {{ value }}
186+{% endfor -%}
187+{% endif -%}
188+
189+{% if rabbitmq_host or rabbitmq_hosts -%}
190+notification_driver = rabbit
191+{% endif -%}
192+
193+{% if swift_store -%}
194+swift_store_auth_version = 2
195+swift_store_auth_address = {{ service_protocol }}://{{ service_host }}:{{ service_port }}/v2.0/
196+swift_store_user = {{ admin_tenant_name }}:{{ admin_user }}
197+swift_store_key = {{ admin_password }}
198+swift_store_create_container_on_put = True
199+swift_store_container = glance
200+swift_store_large_object_size = 5120
201+swift_store_large_object_chunk_size = 200
202+swift_enable_snet = False
203+{% endif -%}
204+
205+{% if rbd_pool -%}
206+rbd_store_ceph_conf = /etc/ceph/ceph.conf
207+rbd_store_user = {{ rbd_user }}
208+rbd_store_pool = {{ rbd_pool }}
209+rbd_store_chunk_size = 8
210+{% endif -%}
211+
212+delayed_delete = False
213+scrub_time = 43200
214+scrubber_datadir = /var/lib/glance/scrubber
215+image_cache_dir = /var/lib/glance/image-cache/
216+db_enforce_mysql_charset = False
217+
218+[glance_store]
219+filesystem_store_datadir = /var/lib/glance/images/
220+
221+[image_format]
222+disk_formats=ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso,root-tar
223+
224+{% include "section-keystone-authtoken" %}
225+
226+{% if auth_host -%}
227+[paste_deploy]
228+flavor = keystone
229+{% endif %}
230+
231+{% include "parts/section-database" %}
232+
233+{% include "section-rabbitmq-oslo" %}
234
235=== added file 'templates/kilo/glance-registry-paste.ini'
236--- templates/kilo/glance-registry-paste.ini 1970-01-01 00:00:00 +0000
237+++ templates/kilo/glance-registry-paste.ini 2015-03-25 09:25:43 +0000
238@@ -0,0 +1,30 @@
239+# Use this pipeline for no auth - DEFAULT
240+[pipeline:glance-registry]
241+pipeline = osprofiler unauthenticated-context registryapp
242+
243+# Use this pipeline for keystone auth
244+[pipeline:glance-registry-keystone]
245+pipeline = osprofiler authtoken context registryapp
246+
247+# Use this pipeline for authZ only. This means that the registry will treat a
248+# user as authenticated without making requests to keystone to reauthenticate
249+# the user.
250+[pipeline:glance-registry-trusted-auth]
251+pipeline = osprofiler context registryapp
252+
253+[app:registryapp]
254+paste.app_factory = glance.registry.api:API.factory
255+
256+[filter:context]
257+paste.filter_factory = glance.api.middleware.context:ContextMiddleware.factory
258+
259+[filter:unauthenticated-context]
260+paste.filter_factory = glance.api.middleware.context:UnauthenticatedContextMiddleware.factory
261+
262+[filter:authtoken]
263+paste.filter_factory = keystonemiddleware.auth_token:filter_factory
264+
265+[filter:osprofiler]
266+paste.filter_factory = osprofiler.web:WsgiMiddleware.factory
267+hmac_keys = SECRET_KEY
268+enabled = yes
269
270=== added file 'templates/kilo/glance-registry.conf'
271--- templates/kilo/glance-registry.conf 1970-01-01 00:00:00 +0000
272+++ templates/kilo/glance-registry.conf 2015-03-25 09:25:43 +0000
273@@ -0,0 +1,27 @@
274+[DEFAULT]
275+verbose = {{ verbose }}
276+use_syslog = {{ use_syslog }}
277+debug = {{ debug }}
278+workers = {{ workers }}
279+
280+bind_host = {{ bind_host }}
281+bind_port = 9191
282+log_file = /var/log/glance/registry.log
283+backlog = 4096
284+api_limit_max = 1000
285+limit_param_default = 25
286+
287+{% if registry_config_flags -%}
288+{% for key, value in registry_config_flags.iteritems() -%}
289+{{ key }} = {{ value }}
290+{% endfor -%}
291+{% endif -%}
292+
293+{% include "section-keystone-authtoken" %}
294+
295+{% if auth_host -%}
296+[paste_deploy]
297+flavor = keystone
298+{% endif %}
299+
300+{% include "parts/section-database" %}
301
302=== modified file 'templates/parts/section-database'
303--- templates/parts/section-database 2014-04-12 15:29:10 +0000
304+++ templates/parts/section-database 2015-03-25 09:25:43 +0000
305@@ -1,4 +1,5 @@
306 {% if database_host -%}
307 [database]
308 connection = {{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}{% if database_ssl_ca %}?ssl_ca={{ database_ssl_ca }}{% if database_ssl_cert %}&ssl_cert={{ database_ssl_cert }}&ssl_key={{ database_ssl_key }}{% endif %}{% endif %}
309+idle_timeout = 3600
310 {% endif -%}

Subscribers

People subscribed via source and target branches