From 5bdf514645e6ba603f813f299c68ff7fb12daa3c Mon Sep 17 00:00:00 2001 From: James Kirsch Date: Thu, 30 Jul 2020 12:36:39 -0700 Subject: [PATCH] Refactor httpd install to base image Refactor installing and initial setup of httpd and mod wsgi from individual services to base image. Change-Id: I651a55a9ebe258ef403d33de010a4dfb368a4021 --- docker/aodh/aodh-base/Dockerfile.j2 | 40 +++---------- docker/barbican/barbican-api/Dockerfile.j2 | 10 ---- docker/cinder/cinder-api/Dockerfile.j2 | 37 ++---------- .../cloudkitty/cloudkitty-api/Dockerfile.j2 | 25 +-------- docker/cyborg/cyborg-api/Dockerfile.j2 | 23 +------- docker/freezer/freezer-api/Dockerfile.j2 | 19 +------ docker/gnocchi/gnocchi-base/Dockerfile.j2 | 22 +------- docker/heat/heat-base/Dockerfile.j2 | 31 +--------- docker/horizon/Dockerfile.j2 | 28 ++-------- docker/ironic/ironic-api/Dockerfile.j2 | 37 ++---------- docker/ironic/ironic-pxe/Dockerfile.j2 | 8 --- docker/keystone/keystone-base/Dockerfile.j2 | 24 +------- docker/manila/manila-api/Dockerfile.j2 | 37 ++---------- docker/masakari/masakari-base/Dockerfile.j2 | 13 +---- docker/mistral/mistral-api/Dockerfile.j2 | 29 +--------- docker/monasca/monasca-base/Dockerfile.j2 | 15 +---- docker/nova/nova-api/Dockerfile.j2 | 36 +----------- docker/octavia/octavia-api/Dockerfile.j2 | 29 +--------- docker/openstack-base/Dockerfile.j2 | 19 ++++++- docker/panko/panko-base/Dockerfile.j2 | 25 ++------- docker/placement/placement-api/Dockerfile.j2 | 34 ++--------- docker/qinling/qinling-base/Dockerfile.j2 | 18 ++---- docker/vitrage/vitrage-api/Dockerfile.j2 | 12 +--- docker/vitrage/vitrage-base/Dockerfile.j2 | 24 +++----- docker/zaqar/zaqar-base/Dockerfile.j2 | 56 +++++++------------ docker/zun/zun-base/Dockerfile.j2 | 30 ++++------ 26 files changed, 120 insertions(+), 561 deletions(-) diff --git a/docker/aodh/aodh-base/Dockerfile.j2 b/docker/aodh/aodh-base/Dockerfile.j2 index ec55885fb3..238c39fd83 100644 --- a/docker/aodh/aodh-base/Dockerfile.j2 +++ b/docker/aodh/aodh-base/Dockerfile.j2 @@ -14,61 +14,35 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {# NOTE(aschultz): added api because the common package doesn't include the wsgi file. I think this needs fixing #} {% set aodh_base_packages = [ - 'httpd', - 'mod_ssl', 'openstack-aodh-api', 'openstack-aodh-common', - 'python3-ldappool', - 'python3-mod_wsgi' + 'python3-ldappool' ] %} {{ macros.install_packages(aodh_base_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/aodh \ - && cp -a /usr/bin/aodh-api /var/www/cgi-bin/aodh/ \ - && 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 + && cp -a /usr/bin/aodh-api /var/www/cgi-bin/aodh/ {% elif base_package_type == 'deb' %} {% set aodh_base_packages = [ 'aodh-common', - 'apache2', - 'libapache2-mod-wsgi-py3', 'python3-aodh', 'python3-ldappool' ] %} {{ macros.install_packages(aodh_base_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/aodh \ - && cp -a /usr/lib/python3/dist-packages/aodh/api/app.wsgi /var/www/cgi-bin/aodh/ \ - && echo > /etc/apache2/ports.conf + && cp -a /usr/lib/python3/dist-packages/aodh/api/app.wsgi /var/www/cgi-bin/aodh/ {% endif %} {% elif install_type == 'source' %} - {% if base_package_type == 'rpm' %} - {% set aodh_base_packages = [ - 'httpd', - 'mod_ssl', - 'python3-ldappool', - 'python3-mod_wsgi' - ] %} + {% set aodh_base_packages = [ + 'python3-ldappool' + ] %} {{ macros.install_packages(aodh_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/aodh \ - && 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_package_type == 'deb' %} - - {% set aodh_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', - 'python3-ldappool' - ] %} - -{{ macros.install_packages(aodh_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/aodh \ - && echo > /etc/apache2/ports.conf - {% endif %} +RUN mkdir -p /var/www/cgi-bin/aodh ADD aodh-base-archive /aodh-base-source diff --git a/docker/barbican/barbican-api/Dockerfile.j2 b/docker/barbican/barbican-api/Dockerfile.j2 index a789668e55..8aa2c14e7f 100644 --- a/docker/barbican/barbican-api/Dockerfile.j2 +++ b/docker/barbican/barbican-api/Dockerfile.j2 @@ -10,30 +10,20 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set barbican_api_packages = [ - 'httpd', - 'mod_ssl', 'openstack-barbican-api', - 'python3-mod_wsgi', 'uwsgi-plugin-python3' ] %} {{ macros.install_packages(barbican_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_package_type == 'deb' %} {% set barbican_api_packages = [ - 'apache2', 'barbican-api', - 'libapache2-mod-wsgi-py3', 'uwsgi-plugin-python3' ] %} {{ macros.install_packages(barbican_api_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf - {% endif %} {% endif %} diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 index d62db9ca1a..57f4407b08 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -10,51 +10,22 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set cinder_api_packages = [ - 'httpd', - 'mod_ssl', - 'python3-keystone', - 'python3-mod_wsgi' + 'python3-keystone' ] %} -{{ macros.install_packages(cinder_api_packages | customizable("packages")) }} -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_package_type == 'deb' %} {% set cinder_api_packages = [ - 'apache2', - 'cinder-api', - 'libapache2-mod-wsgi-py3' + 'cinder-api' ] %} + {% endif %} {{ macros.install_packages(cinder_api_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/cinder \ - && cp -a /usr/bin/cinder-wsgi /var/www/cgi-bin/cinder/cinder-wsgi \ - && echo > /etc/apache2/ports.conf - {% endif %} + && cp -a /usr/bin/cinder-wsgi /var/www/cgi-bin/cinder/cinder-wsgi {% elif install_type == 'source' %} - - {% if base_package_type == 'rpm' %} {% set cinder_api_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi' ] %} {{ 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_package_type == 'deb' %} - {% set cinder_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} -{{ 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 diff --git a/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 b/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 index 54c2b70cb6..82becbbe05 100644 --- a/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 +++ b/docker/cloudkitty/cloudkitty-api/Dockerfile.j2 @@ -11,14 +11,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set cloudkitty_api_packages = [ - 'httpd', - 'mod_ssl', - 'openstack-cloudkitty-api', - 'python3-mod_wsgi' + 'openstack-cloudkitty-api' ] %} {{ macros.install_packages(cloudkitty_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_package_type == 'deb' %} @@ -26,29 +21,11 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% endif %} - {% elif install_type == 'source' %} - {% if base_package_type == 'rpm' %} {% set cloudkitty_api_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi' ] %} {{ macros.install_packages(cloudkitty_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_package_type == 'deb' %} - {% set cloudkitty_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} -{{ macros.install_packages(cloudkitty_api_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf - - {% endif %} - {% endif %} COPY extend_start.sh /usr/local/bin/kolla_cloudkitty_extend_start diff --git a/docker/cyborg/cyborg-api/Dockerfile.j2 b/docker/cyborg/cyborg-api/Dockerfile.j2 index 611ed73cf7..e071f7a73e 100644 --- a/docker/cyborg/cyborg-api/Dockerfile.j2 +++ b/docker/cyborg/cyborg-api/Dockerfile.j2 @@ -12,29 +12,10 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% elif install_type == 'source' %} - {% if base_package_type == 'rpm' %} - {% set cyborg_api_packages = [ - 'mod_ssl', - 'python3-mod_wsgi' - ] %} - {% elif base_package_type == 'deb' %} - {% set cyborg_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} - {% endif %} - -{% endif %} + {% set cyborg_api_packages = [ + ] %} {{ macros.install_packages(cyborg_api_packages | customizable("packages")) }} - -{% if base_package_type == 'rpm' %} -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_package_type == 'deb' %} -RUN echo > /etc/apache2/ports.conf - {% endif %} COPY extend_start.sh /usr/local/bin/kolla_cyborg_extend_start diff --git a/docker/freezer/freezer-api/Dockerfile.j2 b/docker/freezer/freezer-api/Dockerfile.j2 index f6bba058c6..27651d6ef9 100644 --- a/docker/freezer/freezer-api/Dockerfile.j2 +++ b/docker/freezer/freezer-api/Dockerfile.j2 @@ -14,28 +14,11 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} - {% if base_package_type == 'rpm' %} - {% set freezer_api_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi' + {% set freezer_api_packages = [ ] %} {{ macros.install_packages(freezer_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_package_type == 'deb' %} - {% set freezer_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} - -{{ macros.install_packages(freezer_api_packages | customizable("packages")) }} - -RUN echo > /etc/apache2/ports.conf - {% endif %} - ADD freezer-api-archive /freezer-api-source {% set freezer_api_pip_packages = [ diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/docker/gnocchi/gnocchi-base/Dockerfile.j2 index 217f73073f..e20aefddf0 100644 --- a/docker/gnocchi/gnocchi-base/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-base/Dockerfile.j2 @@ -20,23 +20,16 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set gnocchi_base_packages = [ 'gnocchi-common', - 'httpd', - 'mod_ssl', 'python3-boto3', 'python3-cradox', 'python3-ldappool', - 'python3-mod_wsgi' ] %} {{ macros.install_packages(gnocchi_base_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_package_type == 'deb' %} {% set gnocchi_base_packages = [ - 'apache2', 'build-essential', 'gnocchi-common', - 'libapache2-mod-wsgi-py3', 'librados-dev', 'python3-boto3', 'python3-dev', @@ -51,19 +44,15 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ ] %} {{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }} -RUN {{ macros.install_pip(gnocchi_base_pip_packages | customizable("pip_packages"), constraints=false, pip_version="pip3") }} \ - && truncate -s 0 /etc/apache2/ports.conf +RUN {{ macros.install_pip(gnocchi_base_pip_packages | customizable("pip_packages"), constraints=false, pip_version="pip3") }} {% endif %} {% elif install_type == 'source' %} {% if base_package_type == 'rpm' %} {% set gnocchi_base_packages = [ - 'httpd', 'librados2-devel', - 'mod_ssl', - 'python3-ldappool', - 'python3-mod_wsgi' + 'python3-ldappool' ] %} # on x86-64 pip grabs precompiled numpy/scipy - on aarch64/ppc64le @@ -77,14 +66,10 @@ RUN {{ macros.install_pip(gnocchi_base_pip_packages | customizable("pip_packages {% endif %} {{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/gnocchi \ - && 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 +RUN mkdir -p /var/www/cgi-bin/gnocchi {% elif base_package_type == 'deb' %} {% set gnocchi_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'librados-dev', 'python3-ldappool' ] %} @@ -100,7 +85,6 @@ RUN mkdir -p /var/www/cgi-bin/gnocchi \ {% endif %} {{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }} -RUN truncate -s 0 /etc/apache2/ports.conf {% endif %} ADD gnocchi-base-archive /gnocchi-base-source diff --git a/docker/heat/heat-base/Dockerfile.j2 b/docker/heat/heat-base/Dockerfile.j2 index 4819f5291d..dadf35f526 100644 --- a/docker/heat/heat-base/Dockerfile.j2 +++ b/docker/heat/heat-base/Dockerfile.j2 @@ -13,49 +13,22 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set heat_base_packages = [ - 'httpd', - 'mod_ssl', - 'openstack-heat-common', - 'python3-mod_wsgi' + 'openstack-heat-common' ] %} {{ macros.install_packages(heat_base_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_package_type == 'deb' %} {% set heat_base_packages = [ - 'apache2', - 'heat-common', - 'libapache2-mod-wsgi-py3' + 'heat-common' ] %} {{ macros.install_packages(heat_base_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf {% endif %} {% elif install_type == 'source' %} - -{% if base_package_type == 'rpm' %} - {% set heat_base_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi' ] %} {{ macros.install_packages(heat_base_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_package_type == 'deb' %} - - {% set heat_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} - -{{ macros.install_packages(heat_base_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf -{% endif %} ADD heat-base-archive /heat-base-source diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2 index 3a79a7ca06..c8d55d5f68 100644 --- a/docker/horizon/Dockerfile.j2 +++ b/docker/horizon/Dockerfile.j2 @@ -13,8 +13,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set horizon_packages = [ 'gettext', - 'httpd', - 'mod_ssl', 'openstack-cloudkitty-ui', 'openstack-dashboard', 'openstack-designate-ui', @@ -28,15 +26,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openstack-sahara-ui', 'openstack-trove-ui', 'openstack-vitrage-ui', - 'python3-mod_wsgi', ] %} {{ macros.install_packages(horizon_packages | customizable("packages")) }} {% block horizon_redhat_binary_setup %} -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 \ - && ln -s /usr/share/openstack-dashboard/openstack_dashboard /usr/lib/python{{ distro_python_version }}/site-packages/openstack_dashboard \ +RUN ln -s /usr/share/openstack-dashboard/openstack_dashboard /usr/lib/python{{ distro_python_version }}/site-packages/openstack_dashboard \ && ln -s /usr/share/openstack-dashboard/static /usr/lib/python{{ distro_python_version }}/site-packages/static \ && chown -R horizon: /etc/openstack-dashboard /usr/share/openstack-dashboard \ && chown -R apache: /usr/share/openstack-dashboard/static \ @@ -51,9 +46,7 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ {% elif base_package_type == 'deb' %} {% set horizon_packages = [ - 'apache2', 'gettext', - 'libapache2-mod-wsgi-py3', 'locales', 'openstack-dashboard', 'python3-designate-dashboard', @@ -75,8 +68,7 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ {{ macros.install_packages(horizon_packages | customizable("packages")) }} {% block horizon_ubuntu_binary_setup %} -RUN echo > /etc/apache2/ports.conf \ - && sed -i 's|\(ServerTokens \)OS|\1Prod|' /etc/apache2/conf-available/security.conf \ +RUN sed -i 's|\(ServerTokens \)OS|\1Prod|' /etc/apache2/conf-available/security.conf \ && ln -s ../mods-available/headers.load /etc/apache2/mods-enabled/headers.load \ && ln -s ../mods-available/expires.load /etc/apache2/mods-enabled/expires.load \ {% if base_distro == 'ubuntu' %} @@ -103,25 +95,14 @@ RUN echo > /etc/apache2/ports.conf \ {% if base_package_type == 'rpm' %} {% set horizon_packages = [ - 'gettext', - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi', + 'gettext' ] %} {{ macros.install_packages(horizon_packages | customizable("packages")) }} - -{% block horizon_redhat_source_setup %} -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 -{% endblock %} - {% elif base_package_type == 'deb' %} {% set horizon_packages = [ - 'apache2', 'gettext', - 'libapache2-mod-wsgi-py3', 'locales', 'tzdata' ] %} @@ -129,8 +110,7 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ {{ macros.install_packages(horizon_packages | customizable("packages")) }} {% block horizon_ubuntu_source_setup %} -RUN echo > /etc/apache2/ports.conf \ - && ln -s ../mods-available/headers.load /etc/apache2/mods-enabled/headers.load +RUN ln -s ../mods-available/headers.load /etc/apache2/mods-enabled/headers.load {% endblock %} {% endif %} diff --git a/docker/ironic/ironic-api/Dockerfile.j2 b/docker/ironic/ironic-api/Dockerfile.j2 index f6634a3b4c..799a0c2d7f 100644 --- a/docker/ironic/ironic-api/Dockerfile.j2 +++ b/docker/ironic/ironic-api/Dockerfile.j2 @@ -10,44 +10,19 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set ironic_api_packages = [ - 'httpd', - 'mod_ssl', - 'openstack-ironic-api', - 'python3-mod_wsgi', + 'openstack-ironic-api' ] %} {% elif base_package_type == 'deb' %} {% set ironic_api_packages = [ - 'apache2', - 'ironic-api', - 'libapache2-mod-wsgi-py3' + 'ironic-api' ] %} {% endif %} - -{% elif install_type == 'source' %} - {% if base_package_type == 'rpm' %} - {% set ironic_api_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi', - ] %} - {% elif base_package_type == 'deb' %} - {% set ironic_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} - {% endif %} - -{% endif %} - {{ macros.install_packages(ironic_api_packages | customizable("packages")) }} +{% elif install_type == 'source' %} -{% if base_package_type == 'rpm' %} -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_package_type == 'deb' %} -RUN echo > /etc/apache2/ports.conf - + {% set ironic_api_packages = [ + ] %} +{{ macros.install_packages(ironic_api_packages | customizable("packages")) }} {% endif %} COPY extend_start.sh /usr/local/bin/kolla_ironic_extend_start diff --git a/docker/ironic/ironic-pxe/Dockerfile.j2 b/docker/ironic/ironic-pxe/Dockerfile.j2 index 52b940bf46..10b8f62794 100644 --- a/docker/ironic/ironic-pxe/Dockerfile.j2 +++ b/docker/ironic/ironic-pxe/Dockerfile.j2 @@ -9,10 +9,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set ironic_pxe_packages = [ - 'httpd', 'ipxe-bootimgs', - 'mod_ssl', - 'python3-mod_wsgi', 'tftp-server', ] %} @@ -31,13 +28,9 @@ ENV ironic_arch=aarch64 {% endif %} {{ macros.install_packages(ironic_pxe_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_package_type == 'deb' %} {% set ironic_pxe_packages = [ - 'apache2', 'ipxe', - 'libapache2-mod-wsgi-py3', 'pxelinux', 'syslinux-common', 'tftpd-hpa' @@ -55,7 +48,6 @@ ENV ironic_arch=aarch64 {% endif %} {{ macros.install_packages(ironic_pxe_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf {% endif %} COPY tftp-map-file /map-file diff --git a/docker/keystone/keystone-base/Dockerfile.j2 b/docker/keystone/keystone-base/Dockerfile.j2 index 194480191f..f3b4c2d0ba 100644 --- a/docker/keystone/keystone-base/Dockerfile.j2 +++ b/docker/keystone/keystone-base/Dockerfile.j2 @@ -12,14 +12,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set keystone_base_packages = [ - 'httpd', 'mod_auth_mellon', 'mod_auth_openidc', - 'mod_ssl', 'openstack-keystone', 'python3-keystoneclient', - 'python3-ldappool', - 'python3-mod_wsgi' + 'python3-ldappool' ] %} RUN dnf module enable mod_auth_openidc -y @@ -27,17 +24,13 @@ RUN dnf module enable mod_auth_openidc -y {{ macros.install_packages(keystone_base_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/keystone \ && cp -a /usr/bin/keystone-wsgi-public /var/www/cgi-bin/keystone/main \ - && cp -a /usr/bin/keystone-wsgi-admin /var/www/cgi-bin/keystone/admin \ - && 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 + && cp -a /usr/bin/keystone-wsgi-admin /var/www/cgi-bin/keystone/admin {% elif base_package_type == 'deb' %} {% set keystone_base_packages = [ - 'apache2', 'keystone', 'libapache2-mod-auth-mellon', 'libapache2-mod-auth-openidc', - 'libapache2-mod-wsgi-py3', 'python3-ldappool' ] %} @@ -45,38 +38,27 @@ RUN mkdir -p /var/www/cgi-bin/keystone \ RUN mkdir -p /var/www/cgi-bin/keystone \ && cp -a /usr/bin/keystone-wsgi-public /var/www/cgi-bin/keystone/main \ && cp -a /usr/bin/keystone-wsgi-admin /var/www/cgi-bin/keystone/admin \ - && echo > /etc/apache2/ports.conf \ && rm -f /etc/apache2/sites-enabled/keystone.conf {% endif %} {% elif install_type == 'source' %} {% if base_package_type == 'rpm' %} {% set keystone_base_packages = [ - 'httpd', 'mod_auth_mellon', 'mod_auth_openidc', - 'mod_ssl', - 'python3-ldappool', - 'python3-mod_wsgi' + 'python3-ldappool' ] %} RUN dnf module enable mod_auth_openidc -y {{ macros.install_packages(keystone_base_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_package_type == 'deb' %} {% set keystone_base_packages = [ - 'apache2', 'libapache2-mod-auth-mellon', 'libapache2-mod-auth-openidc', - 'libapache2-mod-wsgi-py3', 'python3-ldappool' ] %} {{ macros.install_packages(keystone_base_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf - {% endif %} {% block keystone_source_install %} diff --git a/docker/manila/manila-api/Dockerfile.j2 b/docker/manila/manila-api/Dockerfile.j2 index a55e8e098e..b54367fbf5 100644 --- a/docker/manila/manila-api/Dockerfile.j2 +++ b/docker/manila/manila-api/Dockerfile.j2 @@ -10,50 +10,21 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set manila_api_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi', ] %} -{{ macros.install_packages(manila_api_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/manila \ - && cp -a /usr/bin/manila-wsgi /var/www/cgi-bin/manila/manila-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_package_type == 'deb' %} {% set manila_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'manila-api' ] %} + {% endif %} {{ macros.install_packages(manila_api_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/manila \ - && cp -a /usr/bin/manila-wsgi /var/www/cgi-bin/manila/manila-wsgi \ - && echo > /etc/apache2/ports.conf - {% endif %} - + && cp -a /usr/bin/manila-wsgi /var/www/cgi-bin/manila/manila-wsgi {% elif install_type == 'source' %} - {% if base_package_type == 'rpm' %} - {% set manila_api_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi', - ] %} + {% set manila_api_packages = [ + ] %} {{ macros.install_packages(manila_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_package_type == 'deb' %} - {% set manila_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} -{{ macros.install_packages(manila_api_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf - - {% endif %} RUN mkdir -p /var/www/cgi-bin/manila \ && cp -a /var/lib/kolla/venv/bin/manila-wsgi /var/www/cgi-bin/manila/manila-wsgi diff --git a/docker/masakari/masakari-base/Dockerfile.j2 b/docker/masakari/masakari-base/Dockerfile.j2 index 841d46dc27..1c99eb3006 100644 --- a/docker/masakari/masakari-base/Dockerfile.j2 +++ b/docker/masakari/masakari-base/Dockerfile.j2 @@ -19,28 +19,19 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% if base_package_type == 'rpm' %} {% set masakari_base_packages = [ - 'httpd', - 'mod_ssl', 'python3-ldappool', - 'python3-mod_wsgi' ] %} {{ macros.install_packages(masakari_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/masakari \ - && 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 - +RUN mkdir -p /var/www/cgi-bin/masakari {% elif base_package_type == 'deb' %} {% set masakari_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'python3-ldappool' ] %} {{ macros.install_packages(masakari_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/masakari \ - && echo > /etc/apache2/ports.conf +RUN mkdir -p /var/www/cgi-bin/masakari {% endif %} ADD masakari-base-archive /masakari-base-source diff --git a/docker/mistral/mistral-api/Dockerfile.j2 b/docker/mistral/mistral-api/Dockerfile.j2 index 7a8c47537c..36612f5a3a 100644 --- a/docker/mistral/mistral-api/Dockerfile.j2 +++ b/docker/mistral/mistral-api/Dockerfile.j2 @@ -10,45 +10,22 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set mistral_api_packages = [ - 'httpd', - 'mod_ssl', - 'openstack-mistral-api', - 'python3-mod_wsgi', + 'openstack-mistral-api' ] %} {{ macros.install_packages(mistral_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_package_type == 'deb' %} {% set mistral_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'mistral-api' ] %} {{ macros.install_packages(mistral_api_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf {% endif %} {% elif install_type == 'source' %} - {% if base_package_type == 'rpm' %} - {% set mistral_api_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi', - ] %} -{{ macros.install_packages(mistral_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_package_type == 'deb' %} - {% set mistral_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} + {% set mistral_api_packages = [ + ] %} {{ macros.install_packages(mistral_api_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf - {% endif %} {% endif %} COPY extend_start.sh /usr/local/bin/kolla_mistral_extend_start diff --git a/docker/monasca/monasca-base/Dockerfile.j2 b/docker/monasca/monasca-base/Dockerfile.j2 index 8ddc63d219..bf4284efee 100644 --- a/docker/monasca/monasca-base/Dockerfile.j2 +++ b/docker/monasca/monasca-base/Dockerfile.j2 @@ -15,29 +15,16 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ && /bin/false {% elif install_type == 'source' %} - {% if base_package_type == 'rpm' %} {% set monasca_base_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi', ] %} - -{{ macros.install_packages(monasca_base_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_package_type == 'deb' %} - {% set monasca_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'librdkafka-dev' ] %} + {% endif %} {{ macros.install_packages(monasca_base_packages | customizable("packages")) }} -RUN truncate -s 0 /etc/apache2/ports.conf - - {% endif %} {% block monasca_source_install %} diff --git a/docker/nova/nova-api/Dockerfile.j2 b/docker/nova/nova-api/Dockerfile.j2 index f0fdb8dcb4..28b645ab39 100644 --- a/docker/nova/nova-api/Dockerfile.j2 +++ b/docker/nova/nova-api/Dockerfile.j2 @@ -11,55 +11,25 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set nova_api_packages = [ - 'httpd', - 'mod_ssl', - 'openstack-nova-api', - 'python3-mod_wsgi', + 'openstack-nova-api' ] %} {{ macros.install_packages(nova_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_package_type == 'deb' %} {% set nova_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'nova-api', 'python3-memcache' ] %} {{ macros.install_packages(nova_api_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf {% endif %} - {% elif install_type == 'source' %} - {% if base_package_type == 'rpm' %} - - {% set nova_api_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi', - ] %} - + {% set nova_api_packages = [ + ] %} {{ macros.install_packages(nova_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_package_type == 'deb' %} - - {% set nova_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} - -{{ macros.install_packages(nova_api_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf - - {% endif %} - {% endif %} COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start diff --git a/docker/octavia/octavia-api/Dockerfile.j2 b/docker/octavia/octavia-api/Dockerfile.j2 index e5b4dcf550..3f66ed6438 100644 --- a/docker/octavia/octavia-api/Dockerfile.j2 +++ b/docker/octavia/octavia-api/Dockerfile.j2 @@ -10,17 +10,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if install_type == 'binary' %} {% if base_package_type == 'rpm' %} {% set octavia_api_packages = [ - 'httpd', - 'mod_ssl', 'openstack-octavia-api', - 'python3-mod_wsgi', 'python3-ovn-octavia-provider' ] %} {% elif base_package_type == 'deb' %} {% set octavia_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', - 'octavia-api', + 'octavia-api' ] %} {% if base_distro == 'debian' %} @@ -36,19 +31,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% endif %} {% elif install_type == 'source' %} - {% if base_package_type == 'rpm' %} - {% set octavia_api_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi' - ] %} - - {% elif base_package_type == 'deb' %} - {% set octavia_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} - {% endif %} + {% set octavia_api_packages = [ + ] %} {% set octavia_api_plugins_pip_packages = [ '/plugins/*' @@ -62,13 +46,6 @@ RUN if [ "$(ls /plugins)" ]; then \ {{ macros.install_packages(octavia_api_packages | customizable("packages")) }} -{% if base_package_type == 'rpm' %} -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_package_type == 'deb' %} -RUN echo > /etc/apache2/ports.conf -{% endif %} - COPY extend_start.sh /usr/local/bin/kolla_octavia_extend_start RUN chmod 755 /usr/local/bin/kolla_octavia_extend_start diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 7f019b7a05..247576b2b6 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -15,10 +15,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set openstack_base_packages = [ 'avahi-libs', 'gnutls', + 'httpd', 'initscripts', 'libxslt', 'libyaml', 'mailcap', + 'mod_ssl', 'openssl', 'python3-alembic', 'python3-anyjson', @@ -49,6 +51,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python3-migrate', 'python3-mimeparse', 'python3-mistralclient', + 'python3-mod_wsgi', 'python3-muranoclient', 'python3-neutronclient', 'python3-novaclient', @@ -93,7 +96,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'python3-vitrageclient', 'python3-webob', 'python3-zaqarclient', - 'systemd-sysv', + 'systemd-sysv' ] %} {% elif base_package_type == 'deb' %} @@ -101,6 +104,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build # This will prevent questions from being asked during the install ENV DEBIAN_FRONTEND noninteractive {% set openstack_base_packages = [ + 'apache2', + 'libapache2-mod-wsgi-py3', 'openssl', 'patch', 'python3-aodhclient', @@ -146,6 +151,7 @@ ENV DEBIAN_FRONTEND noninteractive 'gcc', 'gcc-c++', 'git', + 'httpd', 'iproute', 'libffi-devel', 'libxml2-devel', @@ -153,6 +159,7 @@ ENV DEBIAN_FRONTEND noninteractive 'libyaml-devel', 'make', 'mariadb-devel', + 'mod_ssl', 'openldap-devel', 'openssl', 'openssl-devel', @@ -160,15 +167,18 @@ ENV DEBIAN_FRONTEND noninteractive 'postgresql', 'postgresql-devel', 'python3-devel', + 'python3-mod_wsgi', 'sqlite-devel', 'zip' ] %} {% elif base_package_type == 'deb' %} {% set openstack_base_packages = [ + 'apache2', 'build-essential', 'ca-certificates', 'git', + 'libapache2-mod-wsgi-py3', 'libffi-dev', 'libmariadb-dev-compat', 'libpcre3-dev', @@ -319,4 +329,11 @@ RUN {{ macros.install_pip(openstack_base_pip_packages | customizable("pip_packag {% endif %} +{% if base_package_type == 'rpm' %} +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_package_type == 'deb' %} +RUN echo > /etc/apache2/ports.conf +{% endif %} + {% block openstack_base_footer %}{% endblock %} diff --git a/docker/panko/panko-base/Dockerfile.j2 b/docker/panko/panko-base/Dockerfile.j2 index 1504b2a54f..72023fcc19 100644 --- a/docker/panko/panko-base/Dockerfile.j2 +++ b/docker/panko/panko-base/Dockerfile.j2 @@ -13,46 +13,29 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set panko_base_packages = [ - 'httpd', - 'mod_ssl', 'openstack-panko-common', - 'python3-ldappool', - 'python3-mod_wsgi' + 'python3-ldappool' ] %} -{{ macros.install_packages(panko_base_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_package_type == 'deb' %} {% set panko_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' ] %} -{{ macros.install_packages(panko_base_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf {% endif %} + +{{ macros.install_packages(panko_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} {% if base_package_type == 'rpm' %} {% set panko_base_packages = [ - 'httpd', - 'mod_ssl', - 'python3-ldappool', - 'python3-mod_wsgi' + 'python3-ldappool' ] %} {{ macros.install_packages(panko_base_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_package_type == 'deb' %} {% set panko_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'python3-ldappool' ] %} {{ macros.install_packages(panko_base_packages | customizable("packages")) }} -RUN truncate -s 0 /etc/apache2/ports.conf {% endif %} ADD panko-base-archive /panko-base-source diff --git a/docker/placement/placement-api/Dockerfile.j2 b/docker/placement/placement-api/Dockerfile.j2 index 01e32c196a..c91179c591 100644 --- a/docker/placement/placement-api/Dockerfile.j2 +++ b/docker/placement/placement-api/Dockerfile.j2 @@ -11,52 +11,26 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set placement_api_packages = [ - 'httpd', - 'mod_ssl', - 'openstack-placement-api', - 'python3-mod_wsgi' + 'openstack-placement-api' ] %} {{ macros.install_packages(placement_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_package_type == 'deb' %} {% set placement_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'placement-api' ] %} {{ macros.install_packages(placement_api_packages | customizable("packages")) }} -RUN truncate -s 0 /etc/apache2/ports.conf \ - && rm -f /etc/apache2/sites-enabled/placement-api.conf +RUN rm -f /etc/apache2/sites-enabled/placement-api.conf {% endif %} {% elif install_type == 'source' %} - {% if base_package_type == 'rpm' %} - - {% set placement_api_packages = [ - 'httpd', - 'mod_ssl', - 'python3-mod_wsgi' - ] %} + {% set placement_api_packages = [ + ] %} {{ macros.install_packages(placement_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_package_type == 'deb' %} - - {% set placement_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3' - ] %} - -{{ macros.install_packages(placement_api_packages | customizable("packages")) }} -RUN truncate -s 0 /etc/apache2/ports.conf - - {% endif %} {% endif %} COPY extend_start.sh /usr/local/bin/kolla_placement_extend_start diff --git a/docker/qinling/qinling-base/Dockerfile.j2 b/docker/qinling/qinling-base/Dockerfile.j2 index 38aa61163d..5faa4e9143 100644 --- a/docker/qinling/qinling-base/Dockerfile.j2 +++ b/docker/qinling/qinling-base/Dockerfile.j2 @@ -19,30 +19,20 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% if base_package_type == 'rpm' %} {% set qinling_base_packages = [ - 'httpd', - 'mod_ssl', - 'python3-ldappool', - 'python3-mod_wsgi' + 'python3-ldappool' ] %} -{{ macros.install_packages(qinling_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/qinling \ - && 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_package_type == 'deb' %} {% set qinling_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'python3-ldappool' ] %} -{{ macros.install_packages(qinling_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/qinling \ - && echo > /etc/apache2/ports.conf {% endif %} +{{ macros.install_packages(qinling_base_packages | customizable("packages")) }} +RUN mkdir -p /var/www/cgi-bin/qinling + ADD qinling-base-archive /qinling-base-source {% set qinling_base_pip_packages = [ diff --git a/docker/vitrage/vitrage-api/Dockerfile.j2 b/docker/vitrage/vitrage-api/Dockerfile.j2 index 169a4b12bc..a4f1a78bad 100644 --- a/docker/vitrage/vitrage-api/Dockerfile.j2 +++ b/docker/vitrage/vitrage-api/Dockerfile.j2 @@ -12,31 +12,23 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set vitrage_api_packages = [ - 'httpd', - 'mod_ssl', 'openstack-vitrage-api', - 'python3-ldappool', - 'python3-mod_wsgi' + 'python3-ldappool' ] %} {{ macros.install_packages(vitrage_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_package_type == 'deb' %} {% if base_distro == 'debian' %} {% set vitrage_api_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'python3-ldappool', 'vitrage-api' ] %} {{ macros.install_packages(vitrage_api_packages | customizable("packages")) }} RUN mkdir -p /var/www/cgi-bin/vitrage \ - && cp -a /usr/lib/python3/dist-packages/vitrage/api/app.wsgi /var/www/cgi-bin/vitrage/ \ - && echo > /etc/apache2/ports.conf + && cp -a /usr/lib/python3/dist-packages/vitrage/api/app.wsgi /var/www/cgi-bin/vitrage/ {% else %} diff --git a/docker/vitrage/vitrage-base/Dockerfile.j2 b/docker/vitrage/vitrage-base/Dockerfile.j2 index 9c6188ffce..0fb62b3daa 100644 --- a/docker/vitrage/vitrage-base/Dockerfile.j2 +++ b/docker/vitrage/vitrage-base/Dockerfile.j2 @@ -45,26 +45,18 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% if base_package_type == 'rpm' %} {% set vitrage_base_packages = [ - 'httpd', - 'mod_ssl', - 'python3-ldappool', - 'python3-mod_wsgi' - ] %} - -{{ macros.install_packages(vitrage_base_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_package_type == 'deb' %} - - {% set vitrage_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'python3-ldappool' ] %} {{ macros.install_packages(vitrage_base_packages | customizable("packages")) }} -RUN echo > /etc/apache2/ports.conf + + {% elif base_package_type == 'deb' %} + + {% set vitrage_base_packages = [ + 'python3-ldappool' + ] %} + +{{ macros.install_packages(vitrage_base_packages | customizable("packages")) }} {% endif %} {% set vitrage_base_pip_packages = [ diff --git a/docker/zaqar/zaqar-base/Dockerfile.j2 b/docker/zaqar/zaqar-base/Dockerfile.j2 index c89f8cb0aa..d12f386dea 100644 --- a/docker/zaqar/zaqar-base/Dockerfile.j2 +++ b/docker/zaqar/zaqar-base/Dockerfile.j2 @@ -14,57 +14,41 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set zaqar_base_packages = [ 'openstack-zaqar', - 'httpd', - 'mod_ssl', - 'python3-ldappool', - 'python3-mod_wsgi' - ] %} - -{{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} \ - && mkdir -p /var/www/cgi-bin/zaqar \ - && chown -R zaqar: /var/www/cgi-bin/zaqar \ - && cp -a /usr/lib/python{{ distro_python_version }}/site-packages/zaqar/transport/wsgi/app.py /var/www/cgi-bin/zaqar/ \ - && 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_package_type == 'deb' %} - {% set zaqar_base_packages = [ - 'zaqar-common', - 'apache2', - 'libapache2-mod-wsgi-py3', 'python3-ldappool' ] %} {{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} \ && mkdir -p /var/www/cgi-bin/zaqar \ && chown -R zaqar: /var/www/cgi-bin/zaqar \ - && cp -a /usr/lib/python3/dist-packages/zaqar/transport/wsgi/app.py /var/www/cgi-bin/zaqar/ \ - && echo > /etc/apache2/ports.conf + && cp -a /usr/lib/python{{ distro_python_version }}/site-packages/zaqar/transport/wsgi/app.py /var/www/cgi-bin/zaqar/ + + {% elif base_package_type == 'deb' %} + {% set zaqar_base_packages = [ + 'zaqar-common', + 'python3-ldappool' + ] %} + +{{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} \ + && mkdir -p /var/www/cgi-bin/zaqar \ + && chown -R zaqar: /var/www/cgi-bin/zaqar \ + && cp -a /usr/lib/python3/dist-packages/zaqar/transport/wsgi/app.py /var/www/cgi-bin/zaqar/ {% endif %} {% elif install_type == 'source' %} {% if base_package_type == 'rpm' %} {% set zaqar_base_packages = [ - 'httpd', - 'mod_ssl', - 'python3-ldappool', - 'python3-mod_wsgi' - ] %} - -{{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} \ - && 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_package_type == 'deb' %} - {% set zaqar_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'python3-ldappool' ] %} -{{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} \ - && echo > /etc/apache2/ports.conf +{{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} + + {% elif base_package_type == 'deb' %} + {% set zaqar_base_packages = [ + 'python3-ldappool' + ] %} + +{{ macros.install_packages(zaqar_base_packages | customizable("packages")) }} {% endif %} {% set zaqar_base_pip_packages = [ diff --git a/docker/zun/zun-base/Dockerfile.j2 b/docker/zun/zun-base/Dockerfile.j2 index 0af49daba1..50e0bbe4d1 100644 --- a/docker/zun/zun-base/Dockerfile.j2 +++ b/docker/zun/zun-base/Dockerfile.j2 @@ -19,30 +19,22 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% if base_package_type == 'rpm' %} {% set zun_base_packages = [ - 'httpd', - 'mod_ssl', - 'numactl', - 'python3-ldappool', - 'python3-mod_wsgi' - ] %} - -{{ macros.install_packages(zun_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/zun \ - && 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_package_type == 'deb' %} - - {% set zun_base_packages = [ - 'apache2', - 'libapache2-mod-wsgi-py3', 'numactl', 'python3-ldappool' ] %} {{ macros.install_packages(zun_base_packages | customizable("packages")) }} -RUN mkdir -p /var/www/cgi-bin/zun \ - && echo > /etc/apache2/ports.conf +RUN mkdir -p /var/www/cgi-bin/zun + + {% elif base_package_type == 'deb' %} + + {% set zun_base_packages = [ + 'numactl', + 'python3-ldappool' + ] %} + +{{ macros.install_packages(zun_base_packages | customizable("packages")) }} +RUN mkdir -p /var/www/cgi-bin/zun {% endif %} ADD zun-base-archive /zun-base-source