diff options
| author | Doug Szumski <doug@stackhpc.com> | 2018-06-14 12:20:44 +0100 |
|---|---|---|
| committer | Doug Szumski <doug@stackhpc.com> | 2018-07-16 15:07:29 +0100 |
| commit | 49dc670eb41f9b3e872c74250493c729de95ede6 (patch) | |
| tree | 7ef4addeeb66717409031cb1477b5de445adf926 /docker | |
| parent | 3dd801c1454d0e7925a266118a395b6a654a8dde (diff) | |
| download | kolla-49dc670eb41f9b3e872c74250493c729de95ede6.tar.gz kolla-49dc670eb41f9b3e872c74250493c729de95ede6.zip | |
Add support for deploying Monasca Thresh
Monasca Thresh is a Java topology for Storm which generates
alerts from metrics. It depends on Java code in the
monasca-common library. In this change we support building
the Monasca Thresh Storm topology from source. To enable us
to submit the topology to Storm we inherit from the Storm
container (rather than the Monasca base image) so that we can
use the Storm client.
Change-Id: I389af89086cdab6d243c4a4fa65fd157535a5045
Partially-Implements: blueprint monasca-containers
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/monasca/monasca-thresh/Dockerfile.j2 | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/docker/monasca/monasca-thresh/Dockerfile.j2 b/docker/monasca/monasca-thresh/Dockerfile.j2 new file mode 100644 index 000000000..3972f928f --- /dev/null +++ b/docker/monasca/monasca-thresh/Dockerfile.j2 @@ -0,0 +1,68 @@ +FROM {{ namespace }}/{{ image_prefix }}storm:{{ tag }} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" + +USER root + +{% block monasca_thresh_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' %} + +{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% set monasca_thresh_packages = [ + 'maven', + ] %} + +ENV JAVA_HOME /usr/lib/jvm/jre-1.8.0-openjdk/ + +{% elif base_distro in ['debian', 'ubuntu'] %} + {% set monasca_thresh_packages = [ + 'openjdk-8-jdk-headless', + 'maven', + ] %} + +{% if base_arch == 'x86_64' %} +ARG java_arch=amd64 +{% elif base_arch == 'aarch64' %} +ARG java_arch=arm64 +{% else %} +ARG java_arch={{ base_arch }} +{% endif %} + +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-${java_arch}/ + +{% endif %} + +{{ macros.install_packages(monasca_thresh_packages | customizable("packages")) }} + +ADD monasca-thresh-archive /monasca-thresh-source +ADD additions/monasca-common* /monasca-common-source + +{% block monasca_thresh_source_install %} + +{% set build_opts = ['-DskipTests'] %} + +# FIXME(dszumski): Remove this when the following bug is fixed: +# https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1770553 +{% if base_distro == 'ubuntu' %} +{% set build_opts = build_opts + ['-Djavax.net.ssl.trustStorePassword=changeit'] %} +{% endif %} + +RUN cd /monasca-common-source/java \ + && mvn clean install {{ build_opts|join(' ') }} \ + && cd /monasca-thresh-source/monasca-thresh-*/thresh \ + && mvn clean package {{ build_opts|join(' ') }} +{% endblock %} + +{% endif %} + +{% block monasca_thresh_footer %}{% endblock %} +{% block footer %}{% endblock %} + +USER monasca |
