From 5558bd53fb6e8771534664580e814b4b8fa4ef3e Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Mon, 13 Mar 2017 00:05:27 +0800 Subject: [PATCH] Install panko in ceilometer base container When using panko event dispather in ceilometer, panko's code is required. Closes-Bug: #1672241 Change-Id: Ie03f6fcda0ecd09511c09c962b9bd14ae67f1ad3 --- docker/ceilometer/ceilometer-base/Dockerfile.j2 | 12 +++++++++++- kolla/common/config.py | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docker/ceilometer/ceilometer-base/Dockerfile.j2 b/docker/ceilometer/ceilometer-base/Dockerfile.j2 index 552300dce4..7023a752d6 100644 --- a/docker/ceilometer/ceilometer-base/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-base/Dockerfile.j2 @@ -13,6 +13,7 @@ MAINTAINER {{ maintainer }} # https://review.rdoproject.org/r/#/c/5633/ {% set ceilometer_base_packages = [ 'openstack-ceilometer-common', + 'python-panko', 'python-gnocchiclient', 'python-tooz', 'python-oslo-db', @@ -23,6 +24,7 @@ MAINTAINER {{ maintainer }} {% set ceilometer_base_packages = [ 'ceilometer-common', 'python-gnocchiclient', + 'python-panko', 'python-pymongo' ] %} {% endif %} @@ -35,13 +37,21 @@ MAINTAINER {{ maintainer }} '/ceilometer[gnocchi,mongo,mysql]' ] %} +{% set ceilometer_base_plugins_pip_packages = [ + '/plugins/*' +] %} + ADD ceilometer-base-archive /ceilometer-base-source +ADD plugins-archive / RUN ln -s ceilometer-base-source/* ceilometer \ && {{ macros.install_pip(ceilometer_base_pip_packages | customizable("pip_packages")) }} \ && mkdir -p /etc/ceilometer \ && cp -r /ceilometer/etc/ceilometer/* /etc/ceilometer/ \ && chown -R ceilometer: /etc/ceilometer \ - && sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/ceilometer/rootwrap.conf + && sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/ceilometer/rootwrap.conf \ + && if [ "$(ls /plugins)" ]; then \ + {{ macros.install_pip(ceilometer_base_plugins_pip_packages) }}; \ + fi {% endif %} diff --git a/kolla/common/config.py b/kolla/common/config.py index c47c3c660f..7733d2e411 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -254,6 +254,10 @@ SOURCES = { 'type': 'url', 'location': ('$tarballs_base/ceilometer/' 'ceilometer-master.tar.gz')}, + 'ceilometer-base-plugin-panko': { + 'type': 'url', + 'location': ('$tarballs_base/panko/' + 'panko-master.tar.gz')}, 'cinder-base': { 'type': 'url', 'location': ('$tarballs_base/cinder/'