2015-09-17 09:35:33 -07:00
|
|
|
FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
|
2015-11-23 12:38:58 +05:30
|
|
|
MAINTAINER {{ maintainer }}
|
2015-08-12 07:28:38 +00:00
|
|
|
|
2016-07-25 12:53:12 -07:00
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
|
2015-08-12 07:28:38 +00:00
|
|
|
{% if install_type == 'binary' %}
|
2015-09-04 02:15:03 -07:00
|
|
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
2016-07-25 12:53:12 -07:00
|
|
|
{% set ceilometer_compute_packages = [
|
|
|
|
'openstack-ceilometer-compute',
|
|
|
|
'python-ceilometerclient'
|
|
|
|
] %}
|
2016-04-01 16:46:16 -04:00
|
|
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
2016-07-25 12:53:12 -07:00
|
|
|
{% set ceilometer_compute_packages = [
|
|
|
|
'ceilometer-agent-compute',
|
|
|
|
'python-ceilometerclient'
|
|
|
|
] %}
|
|
|
|
{% endif %}
|
2016-02-08 11:06:11 +05:30
|
|
|
|
2016-08-12 08:24:11 +10:00
|
|
|
{{ macros.install_packages(ceilometer_compute_packages | customizable("packages")) }}
|
2016-02-08 11:06:11 +05:30
|
|
|
|
2016-04-01 16:46:16 -04:00
|
|
|
{% elif install_type == 'source' %}
|
|
|
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
|
|
|
|
2016-04-21 17:15:47 +05:30
|
|
|
RUN yum -y install \
|
2016-04-01 16:46:16 -04:00
|
|
|
libvirt-devel \
|
|
|
|
&& yum clean all
|
|
|
|
|
|
|
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
|
|
|
|
2016-05-17 10:04:59 +05:30
|
|
|
RUN apt-get -y install --no-install-recommends \
|
2016-04-01 16:46:16 -04:00
|
|
|
libvirt-dev \
|
|
|
|
&& apt-get clean
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt libvirt-python
|
|
|
|
|
2015-08-12 07:28:38 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2016-07-25 12:53:12 -07:00
|
|
|
{% block ceilometer_compute_footer %}{% endblock %}
|
|
|
|
{% block footer %}{% endblock %}
|
2015-08-28 13:17:41 +03:00
|
|
|
{{ include_footer }}
|
2015-11-23 08:51:39 +05:30
|
|
|
|
2016-03-29 13:25:43 -04:00
|
|
|
# NOTE(huikang): non-root user does not work with libvirt.sock.
|
|
|
|
# Need configuration in nova-libvirt container to allow
|
|
|
|
# USER ceilometer to access libvirt.sock
|