265f643295
Because kolla not have cyborg so should add this. Implements: blueprint add-cyborg Change-Id: I497e67e3a754fccfd2ef5a82f13ccfaf890a6fcd
43 lines
1.3 KiB
Django/Jinja
43 lines
1.3 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}cyborg-base:{{ tag }}
|
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
|
|
|
{% block cyborg_api_header %}{% endblock %}
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{% if install_type == 'binary' %}
|
|
|
|
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
|
&& /bin/false
|
|
|
|
{% elif install_type == 'source' %}
|
|
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
|
{% set cyborg_api_packages = [
|
|
'mod_ssl',
|
|
'mod_wsgi'
|
|
] %}
|
|
{% elif base_distro in ['debian', 'ubuntu'] %}
|
|
{% set cyborg_api_packages = [
|
|
'apache2',
|
|
'libapache2-mod-wsgi'
|
|
] %}
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{{ macros.install_packages(cyborg_api_packages | customizable("packages")) }}
|
|
|
|
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
|
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_distro in ['debian', 'ubuntu'] %}
|
|
RUN echo > /etc/apache2/ports.conf
|
|
|
|
{% endif %}
|
|
|
|
COPY extend_start.sh /usr/local/bin/kolla_cyborg_extend_start
|
|
RUN chmod 755 /usr/local/bin/kolla_cyborg_extend_start
|
|
|
|
{% block cyborg_api_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|