Add nova-placement-api container
Change-Id: I30efc20e6d918e08860584c017455e6d5fa91a35 Closes-Bug: #1660987
This commit is contained in:
parent
4abfebaad3
commit
4a5f53eea1
59
docker/nova/nova-placement-api/Dockerfile.j2
Normal file
59
docker/nova/nova-placement-api/Dockerfile.j2
Normal file
@ -0,0 +1,59 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
{% block nova_placement_api_header %}{% endblock %}
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set nova_placement_api_packages = [
|
||||
'httpd',
|
||||
'mod_wsgi',
|
||||
'openstack-nova-placement-api'
|
||||
] %}
|
||||
|
||||
{{ macros.install_packages(nova_placement_api_packages | customizable("packages")) }}
|
||||
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
|
||||
|
||||
{% elif base_distro in ['ubuntu'] %}
|
||||
|
||||
{% set nova_placement_api_packages = [
|
||||
'apache2',
|
||||
'libapache2-mod-wsgi',
|
||||
'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_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set nova_placement_api_packages = [
|
||||
'httpd',
|
||||
'mod_wsgi'
|
||||
] %}
|
||||
|
||||
{{ macros.install_packages(nova_placement_api_packages | customizable("packages")) }}
|
||||
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
|
||||
{% elif base_distro in ['ubuntu'] %}
|
||||
|
||||
{% 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 %}
|
11
docker/nova/nova-placement-api/extend_start.sh
Normal file
11
docker/nova/nova-placement-api/extend_start.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# NOTE(pbourke): httpd will not clean up after itself in some cases which
|
||||
# results in the container not being able to restart. (bug #1489676, 1557036)
|
||||
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
|
||||
# Loading Apache2 ENV variables
|
||||
source /etc/apache2/envvars
|
||||
rm -rf /var/run/apache2/*
|
||||
else
|
||||
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user