diff options
| author | zhubingbing <1392607554@qq.com> | 2016-10-17 15:54:00 +0800 |
|---|---|---|
| committer | zhubingbing <1392607554@qq.com> | 2016-11-09 05:15:27 -0500 |
| commit | fabb22d50533b8c8ef09bbf22e9fe34637082aa0 (patch) | |
| tree | 0133b29b55629310001ef7d16e0be897b8365a01 /docker/panko/panko-api | |
| parent | 2e01ce50f54a03b9036d54b08f20074cea69bec0 (diff) | |
| download | kolla-fabb22d50533b8c8ef09bbf22e9fe34637082aa0.tar.gz kolla-fabb22d50533b8c8ef09bbf22e9fe34637082aa0.zip | |
add panko dockerfile
Change-Id: Ibf74db39348dfb6f56f4fca0aff142a75ef53d38
Partially-Implements: blueprint add-panko
Diffstat (limited to 'docker/panko/panko-api')
| -rw-r--r-- | docker/panko/panko-api/Dockerfile.j2 | 25 | ||||
| -rw-r--r-- | docker/panko/panko-api/extend_start.sh | 18 |
2 files changed, 43 insertions, 0 deletions
diff --git a/docker/panko/panko-api/Dockerfile.j2 b/docker/panko/panko-api/Dockerfile.j2 new file mode 100644 index 000000000..0ef0de233 --- /dev/null +++ b/docker/panko/panko-api/Dockerfile.j2 @@ -0,0 +1,25 @@ +FROM {{ namespace }}/{{ image_prefix }}panko-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block panko_api_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% set panko_api_packages = ['openstack-panko-api'] %} + {% elif base_distro in ['ubuntu'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{{ macros.install_packages(panko_api_packages | customizable("packages")) }} +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_panko_extend_start +RUN chmod 755 /usr/local/bin/kolla_panko_extend_start + +{% block panko_api_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} diff --git a/docker/panko/panko-api/extend_start.sh b/docker/panko/panko-api/extend_start.sh new file mode 100644 index 000000000..cf3cc3bd4 --- /dev/null +++ b/docker/panko/panko-api/extend_start.sh @@ -0,0 +1,18 @@ +#!/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 + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + panko-dbsync + exit 0 +fi |
