Migrate cinder-api under apache

Cinder ubuntu binary was already migrated under apache.
This change migrates rest of the distros/install types to
be executed under an apache process.

Change-Id: I8544eec5bfebf771d758f13abf4dfbc802f5d24f
This commit is contained in:
Eduardo Gonzalez 2017-06-07 14:32:04 +02:00
parent b9ab96ce40
commit d708e95658
4 changed files with 16 additions and 14 deletions

View File

@ -19,11 +19,9 @@
- service.enabled | bool
- config_json.changed | bool
or cinder_conf.changed | bool
or wsgi_cinder_api.changed | bool
or policy_json.changed | bool
or cinder_api_container.changed | bool
or (kolla_base_distro in ['debian', 'ubuntu']
and kolla_install_type == 'binary'
and wsgi_cinder_api | changed)
- name: Restart cinder-scheduler container
vars:

View File

@ -38,8 +38,6 @@
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- kolla_base_distro in ['debian', 'ubuntu']
- kolla_install_type == 'binary'
notify:
- Restart cinder-api container

View File

@ -1,6 +1,7 @@
{% set command = '/usr/sbin/apache2 -DFOREGROUND' if kolla_base_distro in ['ubuntu', 'debian'] and kolla_install_type == 'binary' else 'cinder-api --config-file /etc/cinder/cinder.conf' %}
{% set cinder_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set cinder_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{
"command": "{{ command }}",
"command": "{{ cinder_cmd }} -DFOREGROUND",
"config_files": [
{
"source": "{{ container_config_directory }}/cinder.conf",
@ -8,19 +9,19 @@
"owner": "cinder",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/cinder-wsgi.conf",
"dest": "/etc/{{ cinder_dir }}/cinder-wsgi.conf",
"owner": "cinder",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/policy.json",
"dest": "/etc/cinder/policy.json",
"owner": "cinder",
"perm": "0600",
"optional": true
}{% if kolla_base_distro in ['ubuntu', 'debian'] and kolla_install_type == 'binary' %},
{
"source": "{{ container_config_directory }}/cinder-wsgi.conf",
"dest": "/etc/apache2/conf-enabled/cinder-wsgi.conf",
"owner": "cinder",
"perm": "0600"
}{% endif %}
}
],
"permissions": [
{

View File

@ -0,0 +1,5 @@
---
features:
- |
Cinder-api service has been migrated to run under
an apache wsgi process.