Merge "Migrate cinder-api under apache"

changes/00/480200/2
Jenkins 6 years ago committed by Gerrit Code Review
commit db38eef3ae

@ -14,8 +14,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'python-keystone'
] %}
{{ 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
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set cinder_api_packages = [
'apache2',
@ -29,6 +32,7 @@ RUN mkdir -p /var/www/cgi-bin/cinder \
{% endif %}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set cinder_api_packages = [
'httpd',
@ -38,26 +42,26 @@ RUN mkdir -p /var/www/cgi-bin/cinder \
{{ macros.install_packages(cinder_api_packages | customizable("packages")) }}
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
{% elif base_distro in ['debian', 'ubuntu'] %}
{% elif base_distro in ['ubuntu'] %}
{% set cinder_api_packages = [
'apache2',
'libapache2-mod-wsgi'
] %}
{{ macros.install_packages(cinder_api_packages | customizable("packages")) }}
RUN echo > /etc/apache2/ports.conf
{% 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 %}
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 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 %}

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