diff options
| author | Zuul <zuul@review.openstack.org> | 2018-07-18 08:28:47 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2018-07-18 08:28:47 +0000 |
| commit | ab012d30439946d73defb8530828a9a7822c504b (patch) | |
| tree | c429d7966424eeae9f1c41b6620b338eb561604d | |
| parent | 86b6a3c558e514dcdaf122aab5ecbe170fa0bda9 (diff) | |
| parent | 49dc670eb41f9b3e872c74250493c729de95ede6 (diff) | |
| download | kolla-ab012d30439946d73defb8530828a9a7822c504b.tar.gz kolla-ab012d30439946d73defb8530828a9a7822c504b.zip | |
Merge "Add support for deploying Monasca Thresh"
| -rw-r--r-- | docker/monasca/monasca-thresh/Dockerfile.j2 | 68 | ||||
| -rwxr-xr-x | kolla/common/config.py | 9 | ||||
| -rwxr-xr-x | kolla/image/build.py | 4 | ||||
| -rw-r--r-- | releasenotes/notes/add-monasca-thresh-f3df34dee9eee562.yaml | 4 |
4 files changed, 85 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 diff --git a/kolla/common/config.py b/kolla/common/config.py index 4f0dd345f..97fa1eddd 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -526,6 +526,15 @@ SOURCES = { 'type': 'url', 'location': ('$tarballs_base/monasca-statsd/' 'monasca-statsd-master.tar.gz')}, + # FIXME(dszumski): Use openstack tar when infra is fixed + 'monasca-thresh': { + 'type': 'url', + 'location': ('https://github.com/openstack/monasca-thresh/archive/' + 'master.tar.gz')}, + 'monasca-thresh-additions-monasca-common': { + 'type': 'url', + 'location': ('$tarballs_base/monasca-common/' + 'monasca-common-master.tar.gz')}, 'murano-base': { 'type': 'url', 'location': ('$tarballs_base/murano/' diff --git a/kolla/image/build.py b/kolla/image/build.py index b19807291..782837799 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -86,6 +86,7 @@ SKIPPED_IMAGES = { "karbor-base", "kuryr-base", "monasca-base", + "monasca-thresh", "neutron-bgp-dragent", "nova-mksproxy", "ovsdpdk", @@ -118,6 +119,7 @@ SKIPPED_IMAGES = { "kuryr-base", "mistral-event-engine", "monasca-base", + "monasca-thresh", "nova-mksproxy", "novajoin-base", "octavia-base", @@ -157,6 +159,7 @@ SKIPPED_IMAGES = { "kuryr-base", "mistral-event-engine", "monasca-base", + "monasca-thresh", "nova-mksproxy", "novajoin-base", "octavia-base", @@ -183,6 +186,7 @@ SKIPPED_IMAGES = { "karbor-base", "kuryr-base", "monasca-base", + "monasca-thresh", "nova-mksproxy", "neutron-bgp-dragent", "ovsdpdk", diff --git a/releasenotes/notes/add-monasca-thresh-f3df34dee9eee562.yaml b/releasenotes/notes/add-monasca-thresh-f3df34dee9eee562.yaml new file mode 100644 index 000000000..db70ac48c --- /dev/null +++ b/releasenotes/notes/add-monasca-thresh-f3df34dee9eee562.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Add Monasca Thresh, an Apache Storm topology for alerting in Monasca. |
