kolla/docker/nova/nova-api/Dockerfile.j2
Dan Prince 10c26d90e9 Add Apache packages to nova-api container
Some projects that use Kolla docker containers (TripleO) run nova-api under
httpd. This patch adds the httpd package so that it exists in the container
and can optionally by used via Docker entrypoints.

As many of these projects do not require the use of Apache (it is opt-in) at
this point not all deployment frameworks support the use of it so
the existing configuration defaults have been left as-is for now.

Partial-Blueprint: apache-packages-for-apis

Change-Id: Id22da4626c659d8c9f457b71d9423e5fd9e8c25a
2017-01-12 12:07:24 -05:00

59 lines
1.3 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block nova_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set nova_api_packages = [
'openstack-nova-api',
'httpd',
'mod_wsgi'
] %}
{% elif base_distro in ['ubuntu'] %}
{% set nova_api_packages = [
'nova-api',
'python-memcache',
'apache2',
'libapache2-mod-wsgi'
] %}
{% endif %}
{{ macros.install_packages(nova_api_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set nova_api_packages = [
'httpd',
'mod_wsgi'
] %}
{% elif base_distro in ['ubuntu'] %}
{% set nova_api_packages = [
'apache2',
'libapache2-mod-wsgi'
] %}
{% endif %}
{{ macros.install_packages(nova_api_packages | customizable("packages")) }}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start
RUN chmod 755 /usr/local/bin/kolla_nova_extend_start
{% block nova_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER nova