Customizations for ceilometer

This patchset contains customization of Dockerfile of ceilometer containers

Change-Id: Iee8db7e105fbd8c3d5c947dd3b7c5e0ca7c49b78
Partially-implements: blueprint third-party-plugin-support
This commit is contained in:
Martin Falatic 2016-07-25 12:53:12 -07:00
parent 73ac202563
commit cfa5b36e53
6 changed files with 64 additions and 65 deletions

View File

@ -1,25 +1,24 @@
FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-ceilometer-api \
&& yum clean all
{% set ceilometer_api_packages = ['openstack-ceilometer-api'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
ceilometer-api \
&& apt-get clean
{% set ceilometer_api_packages = ['ceilometer-api'] %}
{% endif %}
RUN {{ macros.install_packages(ceilometer_api_packages | customizable("packages")) }}
{% 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 }}
USER ceilometer

View File

@ -1,24 +1,24 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-ceilometer-common \
python-tooz \
python-oslo-db \
&& yum clean all
{% set ceilometer_base_packages = [
'openstack-ceilometer-common',
'python-tooz',
'python-oslo-db'
] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
ceilometer-common \
python-pymongo \
&& apt-get clean
{% set ceilometer_base_packages = [
'ceilometer-common',
'python-pymongo'
] %}
{% endif %}
RUN {{ macros.install_packages(ceilometer_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
ADD ceilometer-base-archive /ceilometer-base-source

View File

@ -1,22 +1,21 @@
FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-ceilometer-central \
&& yum clean all
{% set ceilometer_central_packages = ['openstack-ceilometer-central'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
ceilometer-agent-central \
&& apt-get clean
{% endif %}
{% set ceilometer_central_packages = ['ceilometer-agent-central'] %}
{% endif %}
RUN {{ macros.install_packages(ceilometer_central_packages | customizable("packages")) }}
{% endif %}
{% block ceilometer_central_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER ceilometer

View File

@ -1,22 +1,21 @@
FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-ceilometer-collector \
&& yum clean all
{% set ceilometer_collector_packages = ['openstack-ceilometer-collector'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
ceilometer-collector \
&& apt-get clean
{% endif %}
{% set ceilometer_collector_packages = ['ceilometer-collector'] %}
{% endif %}
RUN {{ macros.install_packages(ceilometer_collector_packages | customizable("packages")) }}
{% endif %}
{% block ceilometer_collector_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER ceilometer

View File

@ -1,22 +1,23 @@
FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-ceilometer-compute \
python-ceilometerclient \
&& yum clean all
{% set ceilometer_compute_packages = [
'openstack-ceilometer-compute',
'python-ceilometerclient'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get -y install --no-install-recommends \
ceilometer-agent-compute \
python-ceilometerclient \
&& apt-get clean
{% set ceilometer_compute_packages = [
'ceilometer-agent-compute',
'python-ceilometerclient'
] %}
{% endif %}
RUN {{ macros.install_packages(ceilometer_compute_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
@ -36,6 +37,8 @@ RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements
{% endif %}
{% block ceilometer_compute_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
# NOTE(huikang): non-root user does not work with libvirt.sock.

View File

@ -1,22 +1,21 @@
FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-ceilometer-notification \
&& yum clean all
{% set ceilometer_notification_packages = ['openstack-ceilometer-notification'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
ceilometer-agent-notification \
&& apt-get clean
{% endif %}
{% set ceilometer_notification_packages = ['ceilometer-agent-notification'] %}
{% endif %}
RUN {{ macros.install_packages(ceilometer_notification_packages | customizable("packages")) }}
{% endif %}
{% block ceilometer_notification_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER ceilometer