diff options
| author | Eduardo Gonzalez <dabarren@gmail.com> | 2017-05-09 13:36:25 +0200 |
|---|---|---|
| committer | Eduardo Gonzalez <dabarren@gmail.com> | 2017-07-04 08:44:12 +0000 |
| commit | e58e677d472d25ba86b1d79fe6c016e619c7a451 (patch) | |
| tree | e2aa27b3af023e904fc6194fe0a10df7a83cd1c8 | |
| parent | 5841abe910c50d34fbbf4dcfde7b6e92dd82bdae (diff) | |
| download | kolla-e58e677d472d25ba86b1d79fe6c016e619c7a451.tar.gz kolla-e58e677d472d25ba86b1d79fe6c016e619c7a451.zip | |
Migrate cinder-api under apache
Cinder-api in ubuntu binary was migrated
under apache because ubuntu packages removed
support to system services.
This change migrate other install_types under apache
to unify all types.
Change-Id: Iad6792142019134513a378a7ad9955888ef320e9
| -rw-r--r-- | docker/cinder/cinder-api/Dockerfile.j2 | 24 | ||||
| -rw-r--r-- | tools/releasenotes/notes/cinder-api-wsgi-b6124980d9ce9ae4.yaml | 5 |
2 files changed, 19 insertions, 10 deletions
diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 index 790f82286..07e4a7c48 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -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 %} diff --git a/tools/releasenotes/notes/cinder-api-wsgi-b6124980d9ce9ae4.yaml b/tools/releasenotes/notes/cinder-api-wsgi-b6124980d9ce9ae4.yaml new file mode 100644 index 000000000..c36afd426 --- /dev/null +++ b/tools/releasenotes/notes/cinder-api-wsgi-b6124980d9ce9ae4.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Cinder-api service has been migrated under + Apache wsgi process. |
