kolla/docker/nova/nova-placement-api/Dockerfile.j2
Mark Goddard cdcd5610e9 Fix lower-constraints and kolla CI jobs
Multiple fixes to fix multiple problems.

1. Bump setuptools requirement to 21.0.0

The 16.0.0 requirement breaks the lower-constraints job on Ubuntu
bionic. We see the following error:

AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

2. ubuntu-binary horizon image needs to use python3 for django
manage.py

3. ubuntu-binary nova-placement-api image needs to use python3 for
apache mod wsgi.

4. nova-libvirt needs exact qemu dependencies due to packaging change

5. OracleLinux repos definition was changed in official image.

6. Fetch InfluxDB gpg key for Ubuntu base image from influx server.

Change-Id: Ic797d41f53a5f146d112619f1683cbfbf3a85dc2
2019-03-15 12:01:25 +01:00

72 lines
2.5 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block nova_placement_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_package_type == 'rpm' %}
{% set nova_placement_api_packages = [
'httpd',
'mod_ssl',
'openstack-nova-placement-api'
] %}
{% if distro_python_version.startswith('3') %}
{% set nova_placement_api_packages = nova_placement_api_packages + ['python3-mod_wsgi'] %}
{% else %}
{% set nova_placement_api_packages = nova_placement_api_packages + ['mod_wsgi'] %}
{% endif %}
{{ macros.install_packages(nova_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 nova_placement_api_packages = [
'apache2',
'libapache2-mod-wsgi-py3',
'nova-placement-api'
] %}
{{ macros.install_packages(nova_placement_api_packages | customizable("packages")) }}
RUN truncate -s 0 /etc/apache2/ports.conf
{% endif %}
{% elif install_type == 'source' %}
{% if base_package_type == 'rpm' %}
{% set nova_placement_api_packages = [
'httpd',
'mod_ssl',
] %}
{% if distro_python_version.startswith('3') %}
{% set nova_placement_api_packages = nova_placement_api_packages + ['python3-mod_wsgi'] %}
{% else %}
{% set nova_placement_api_packages = nova_placement_api_packages + ['mod_wsgi'] %}
{% endif %}
{{ macros.install_packages(nova_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 nova_placement_api_packages = [
'apache2',
'libapache2-mod-wsgi'
] %}
{{ macros.install_packages(nova_placement_api_packages | customizable("packages")) }}
RUN truncate -s 0 /etc/apache2/ports.conf
{% endif %}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start
RUN chmod 755 /usr/local/bin/kolla_nova_extend_start
{% block nova_placement_api_footer %}{% endblock %}
{% block footer %}{% endblock %}