Add options.workers to the template

This change draws on the charms.openstack and layer-openstack-api
changes to provide the ability to configure the number of workers that
the aodh charm starts.  Note that the mitaka version uses the simpler
'workers' option, whereas the ocata version uses the more complex WSGI
version.

Change-Id: I015b75cf674c03dd12078c13eb958b99e7936945
Depends-On: I3cea350e536306655f5f109ec67ae7f0fba35fda
Depends-On: Id4145ffaa622727523003015d7012ece2f0eae4f
Related-Bug: #1677543
This commit is contained in:
Alex Kavanagh 2017-07-25 17:17:32 +01:00
parent 5cf126e88a
commit d950502c9c
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ debug = {{ options.debug }}
[api]
port = {{ options.service_listen_info.aodh_api.port }}
workers = {{ options.workers }}
[database]
{% if shared_db.uri -%}

View File

@ -1,7 +1,7 @@
Listen {{ options.service_listen_info.aodh_api.public_port }}
<VirtualHost *:{{ options.service_listen_info.aodh_api.public_port }}>
WSGIDaemonProcess aodh-api user=aodh group=aodh processes=2 threads=10 display-name=%{GROUP}
WSGIDaemonProcess aodh-api user=aodh group=aodh processes={{ options.wsgi_worker_context.processes }} threads=10 display-name=%{GROUP}
WSGIProcessGroup aodh-api
WSGIScriptAlias / /usr/share/aodh/app.wsgi
WSGIApplicationGroup %{GLOBAL}