From e4e8ca3e1d0656e2a07f6f718a92c03a54f6a9ee Mon Sep 17 00:00:00 2001 From: Doug Szumski Date: Thu, 26 Jul 2018 12:05:40 +0100 Subject: [PATCH] Add Monasca Agent container The Monasca Agent consists of 3 processes. The collector, which collects system level metrics from a host, a statsd server, which is used to receive application specific statsd metrics and a forwarder service which batches metrics and sends them to the Monasca API at pre-defined time intervals. Partially-Implements: blueprint monasca-containers Change-Id: Ia446ca0a6b932c2429d727b63e363b4e27307304 --- docker/monasca/monasca-agent/Dockerfile.j2 | 31 ++++++++++++++++++++++ kolla/common/config.py | 4 +++ 2 files changed, 35 insertions(+) create mode 100644 docker/monasca/monasca-agent/Dockerfile.j2 diff --git a/docker/monasca/monasca-agent/Dockerfile.j2 b/docker/monasca/monasca-agent/Dockerfile.j2 new file mode 100644 index 0000000000..096e22c022 --- /dev/null +++ b/docker/monasca/monasca-agent/Dockerfile.j2 @@ -0,0 +1,31 @@ +FROM {{ namespace }}/{{ image_prefix }}monasca-base:{{ tag }} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" + +{% block monasca_agent_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' %} + +ADD monasca-agent-archive /monasca-agent-source + +{% set monasca_agent_pip_packages = [ + '/monasca-agent' +] %} + +RUN ln -s monasca-agent-source/* monasca-agent \ + && {{ macros.install_pip(monasca_agent_pip_packages | customizable("pip_packages")) }} + +{% endif %} + +{% block monasca_agent_footer %}{% endblock %} + +{% block footer %}{% endblock %} + +USER monasca + diff --git a/kolla/common/config.py b/kolla/common/config.py index 5ac5df8959..7b7ae9daee 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -506,6 +506,10 @@ SOURCES = { 'type': 'url', 'location': ('$tarballs_base/tacker/' 'tacker-master.tar.gz')}, + 'monasca-agent': { + 'type': 'url', + 'location': ('$tarballs_base/monasca-agent/' + 'monasca-agent-master.tar.gz')}, 'monasca-api': { 'type': 'url', 'location': ('$tarballs_base/monasca-api/'