Run Zaqar with httpd in puppet service
This switches Zaqar to run with httpd when configured by puppet. Change-Id: I69b923dd76a60e9ec786cae886c137ba572ec906
This commit is contained in:
@@ -36,7 +36,26 @@ parameters:
|
|||||||
e.g. { zaqar-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
|
e.g. { zaqar-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
|
||||||
default: {}
|
default: {}
|
||||||
type: json
|
type: json
|
||||||
|
ZaqarWorkers:
|
||||||
|
type: string
|
||||||
|
description: Set the number of workers for zaqar::wsgi::apache
|
||||||
|
default: '%{::os_workers}'
|
||||||
|
EnableInternalTLS:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
|
conditions:
|
||||||
|
zaqar_workers_zero: {equals : [{get_param: ZaqarWorkers}, 0]}
|
||||||
|
|
||||||
|
resources:
|
||||||
|
|
||||||
|
ApacheServiceBase:
|
||||||
|
type: ./apache.yaml
|
||||||
|
properties:
|
||||||
|
ServiceNetMap: {get_param: ServiceNetMap}
|
||||||
|
DefaultPasswords: {get_param: DefaultPasswords}
|
||||||
|
EndpointMap: {get_param: EndpointMap}
|
||||||
|
EnableInternalTLS: {get_param: EnableInternalTLS}
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
role_data:
|
role_data:
|
||||||
@@ -44,16 +63,30 @@ outputs:
|
|||||||
value:
|
value:
|
||||||
service_name: zaqar
|
service_name: zaqar
|
||||||
config_settings:
|
config_settings:
|
||||||
zaqar::policy::policies: {get_param: ZaqarPolicies}
|
map_merge:
|
||||||
|
- get_attr: [ApacheServiceBase, role_data, config_settings]
|
||||||
|
- zaqar::policy::policies: {get_param: ZaqarPolicies}
|
||||||
zaqar::keystone::authtoken::password: {get_param: ZaqarPassword}
|
zaqar::keystone::authtoken::password: {get_param: ZaqarPassword}
|
||||||
zaqar::keystone::authtoken::project_name: 'service'
|
zaqar::keystone::authtoken::project_name: 'service'
|
||||||
zaqar::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
|
zaqar::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
|
||||||
zaqar::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
|
zaqar::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
|
||||||
zaqar::debug: {get_param: Debug}
|
zaqar::debug: {get_param: Debug}
|
||||||
zaqar::transport::websocket::bind: {get_param: [EndpointMap, ZaqarInternal, host]}
|
zaqar::transport::websocket::bind: {get_param: [EndpointMap, ZaqarInternal, host]}
|
||||||
zaqar::transport::wsgi::bind: {get_param: [ServiceNetMap, ZaqarApiNetwork]}
|
zaqar::wsgi::apache::ssl: false
|
||||||
|
zaqar::wsgi::apache::bind_host: {get_param: [ServiceNetMap, ZaqarApiNetwork]}
|
||||||
zaqar::message_pipeline: 'zaqar.notification.notifier'
|
zaqar::message_pipeline: 'zaqar.notification.notifier'
|
||||||
zaqar::unreliable: true
|
zaqar::unreliable: true
|
||||||
|
zaqar::wsgi::apache::servername:
|
||||||
|
str_replace:
|
||||||
|
template:
|
||||||
|
"%{hiera('fqdn_$NETWORK')}"
|
||||||
|
params:
|
||||||
|
$NETWORK: {get_param: [ServiceNetMap, ZaqarApiNetwork]}
|
||||||
|
-
|
||||||
|
if:
|
||||||
|
- zaqar_workers_zero
|
||||||
|
- {}
|
||||||
|
- zaqar::wsgi::apache::workers: {get_param: ZaqarWorkers}
|
||||||
service_config_settings:
|
service_config_settings:
|
||||||
keystone:
|
keystone:
|
||||||
zaqar::keystone::auth::password: {get_param: ZaqarPassword}
|
zaqar::keystone::auth::password: {get_param: ZaqarPassword}
|
||||||
@@ -83,10 +116,19 @@ outputs:
|
|||||||
grep '\bactive\b'
|
grep '\bactive\b'
|
||||||
when: zaqar_enabled.rc == 0
|
when: zaqar_enabled.rc == 0
|
||||||
tags: step0,validation
|
tags: step0,validation
|
||||||
- name: Stop zaqar service
|
- name: Check for zaqar running under apache (post upgrade)
|
||||||
|
tags: step1
|
||||||
|
shell: "httpd -t -D DUMP_VHOSTS | grep -q zaqar_wsgi"
|
||||||
|
register: zaqar_apache
|
||||||
|
ignore_errors: true
|
||||||
|
- name: Stop zaqar service (running under httpd)
|
||||||
|
tags: step1
|
||||||
|
service: name=httpd state=stopped
|
||||||
|
when: zaqar_apache.rc == 0
|
||||||
|
- name: Stop and disable zaqar service (pre-upgrade not under httpd)
|
||||||
tags: step1
|
tags: step1
|
||||||
when: zaqar_enabled.rc == 0
|
when: zaqar_enabled.rc == 0
|
||||||
service: name=openstack-zaqar state=stopped
|
service: name=openstack-zaqar state=stopped enabled=no
|
||||||
- name: Install openstack-zaqar package if it was disabled
|
- name: Install openstack-zaqar package if it was disabled
|
||||||
tags: step3
|
tags: step3
|
||||||
yum: name=openstack-zaqar state=latest
|
yum: name=openstack-zaqar state=latest
|
||||||
|
|||||||
3
releasenotes/notes/zaqar-httpd-e7d91bf396da28d0.yaml
Normal file
3
releasenotes/notes/zaqar-httpd-e7d91bf396da28d0.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Run the Zaqar WSGI service over httpd in Puppet.
|
||||||
Reference in New Issue
Block a user