Merge "Migrate cinder-api under apache"

This commit is contained in:
Jenkins
2017-07-06 07:55:25 +00:00
committed by Gerrit Code Review
2 changed files with 19 additions and 10 deletions

View File

@@ -14,8 +14,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'python-keystone' 'python-keystone'
] %} ] %}
{{ macros.install_packages(cinder_api_packages | customizable("packages")) }} {{ macros.install_packages(cinder_api_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ RUN mkdir -p /var/www/cgi-bin/cinder \
&& cp -a /usr/bin/cinder-wsgi /var/www/cgi-bin/cinder/cinder-wsgi \
&& sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
{% elif base_distro in ['debian', 'ubuntu'] %} {% elif base_distro in ['debian', 'ubuntu'] %}
{% set cinder_api_packages = [ {% set cinder_api_packages = [
'apache2', 'apache2',
@@ -29,6 +32,7 @@ RUN mkdir -p /var/www/cgi-bin/cinder \
{% endif %} {% endif %}
{% elif install_type == 'source' %} {% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set cinder_api_packages = [ {% set cinder_api_packages = [
'httpd', 'httpd',
@@ -38,26 +42,26 @@ RUN mkdir -p /var/www/cgi-bin/cinder \
{{ macros.install_packages(cinder_api_packages | customizable("packages")) }} {{ macros.install_packages(cinder_api_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
{% elif base_distro in ['debian', 'ubuntu'] %}
{% elif base_distro in ['ubuntu'] %}
{% set cinder_api_packages = [ {% set cinder_api_packages = [
'apache2', 'apache2',
'libapache2-mod-wsgi' 'libapache2-mod-wsgi'
] %} ] %}
{{ macros.install_packages(cinder_api_packages | customizable("packages")) }} {{ macros.install_packages(cinder_api_packages | customizable("packages")) }}
RUN echo > /etc/apache2/ports.conf RUN echo > /etc/apache2/ports.conf
{% endif %} {% endif %}
RUN mkdir -p /var/www/cgi-bin/cinder \
&& cp -a /var/lib/kolla/venv/bin/cinder-wsgi /var/www/cgi-bin/cinder/cinder-wsgi
{% endif %} {% endif %}
COPY extend_start.sh /usr/local/bin/kolla_cinder_extend_start COPY extend_start.sh /usr/local/bin/kolla_cinder_extend_start
RUN chmod 755 /usr/local/bin/kolla_cinder_extend_start RUN chmod 755 /usr/local/bin/kolla_cinder_extend_start \
&& chown -R cinder: /var/www/cgi-bin/cinder \
&& chmod 755 /var/www/cgi-bin/cinder/cinder-wsgi
{% block cinder_api_footer %}{% endblock %} {% block cinder_api_footer %}{% endblock %}
{% block footer %}{% endblock %} {% block footer %}{% endblock %}
{% if install_type == 'binary' and base_distro in ['debian', 'ubuntu'] %}
RUN chown -R cinder: /var/www/cgi-bin/cinder \
&& chmod 755 /var/www/cgi-bin/cinder/cinder-wsgi
{% else %}
USER cinder
{% endif %}

View File

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