aboutsummaryrefslogtreecommitdiff
path: root/docker/openstack-base
diff options
context:
space:
mode:
authorJames Kirsch <generalfuzz@gmail.com>2020-07-30 12:36:39 -0700
committerMark Goddard <mark@stackhpc.com>2020-08-10 09:51:07 +0000
commit5bdf514645e6ba603f813f299c68ff7fb12daa3c (patch)
tree2bd0ed0e4f532575e59e646657afd33a0affe35d /docker/openstack-base
parent69092eb574222564fcd3ce752a41db7fe51d61b8 (diff)
downloadkolla-5bdf514645e6ba603f813f299c68ff7fb12daa3c.tar.gz
kolla-5bdf514645e6ba603f813f299c68ff7fb12daa3c.zip
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
Diffstat (limited to 'docker/openstack-base')
-rw-r--r--docker/openstack-base/Dockerfile.j219
1 files changed, 18 insertions, 1 deletions
diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2
index 7f019b7a0..247576b2b 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 %}