kolla/docker/ceilometer/ceilometer-api/Dockerfile.j2
Jeffrey Zhang 7555054e72 Fix the failure of ceilometer-api container
* ceilometer-api script is removed and run ceilometer-api by using apache
* fix connection url in ceilometer.conf

Closes-Bug: #1624905
Change-Id: Iffb00ca418bab6521d61b16de4f5760aa1ae1ac7
2016-09-25 14:01:43 +00:00

67 lines
1.9 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block ceilometer_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
{% set ceilometer_api_packages = [
'openstack-ceilometer-api',
'httpd',
'mod_wsgi'
] %}
{{ macros.install_packages(ceilometer_api_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
{% elif base_distro in ['ubuntu'] %}
{% set ceilometer_api_packages = [
'ceilometer-api',
'apache2',
'libapache2-mod-wsgi'
] %}
{{ macros.install_packages(ceilometer_api_packages | customizable("packages")) }}
RUN echo > /etc/apache2/ports.conf
{% endif %}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
{% set ceilometer_api_packages = [
'httpd',
'mod_wsgi',
'gettext'
] %}
{{ macros.install_packages(ceilometer_api_packages | customizable("packages")) }}
{% block ceilometer_api_redhat_source_setup %}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
{% endblock %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set ceilometer_api_packages = [
'apache2',
'libapache2-mod-wsgi',
'gettext'
] %}
{{ macros.install_packages(ceilometer_api_packages | customizable("packages")) }}
{% block ceilometer_api_ubuntu_source_setup %}
RUN echo > /etc/apache2/ports.conf
{% endblock %}
{% endif %}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_ceilometer_extend_start
RUN chmod 755 /usr/local/bin/kolla_ceilometer_extend_start
{% block ceilometer_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}