summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Szumski <doug@stackhpc.com>2018-06-11 11:26:13 +0100
committerDoug Szumski <doug@stackhpc.com>2018-07-13 16:09:09 +0100
commit91d23981b2a711413e1ac7945aaf86e0866259b1 (patch)
treeefdfe4a67e1f996008ae1615b0f50eb3ba5bcc39
parent692970bc5503ae28cbc89088ba155c8026eb6c2e (diff)
Add support for deploying Apache Storm
The motiviation behind this is to provide Apache Storm for the Monasca Thresh component which is used for generating alerts as part of the Monasca Framework. SHA512 sum is from http://www.us.apache.org/dist/storm/ apache-storm-1.1.2/apache-storm-1.1.2.tar.gz.sha Change-Id: I6eb6be91470385c824baaeb37f90b582fc88aed4 Partially-Implements: blueprint monasca-containers
Notes
Notes (review): Code-Review+1: wu.chunyang <wu.chunyang@99cloud.net> Code-Review+2: Mark Goddard <mark@stackhpc.com> Code-Review+1: ziyu <chen.qiaomin@99cloud.net> Code-Review+2: Eduardo Gonzalez <dabarren@gmail.com> Code-Review+2: Surya Prakash (spsurya) <singh.surya64mnnit@gmail.com> Workflow+1: Mark Goddard <mark@stackhpc.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 13 Jul 2018 19:38:08 +0000 Reviewed-on: https://review.openstack.org/580095 Project: openstack/kolla Branch: refs/heads/master
-rw-r--r--docker/storm/Dockerfile.j242
-rw-r--r--docker/storm/extend_start.sh9
-rwxr-xr-xkolla/common/config.py5
-rw-r--r--releasenotes/notes/add-apache-storm-927c5318d91b5db3.yaml3
4 files changed, 59 insertions, 0 deletions
diff --git a/docker/storm/Dockerfile.j2 b/docker/storm/Dockerfile.j2
new file mode 100644
index 0000000..791c9ca
--- /dev/null
+++ b/docker/storm/Dockerfile.j2
@@ -0,0 +1,42 @@
1FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
2LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3
4{% block storm %}{% endblock %}
5
6{% import "macros.j2" as macros with context %}
7
8{{ macros.configure_user(name='storm', homedir='/opt/storm') }}
9
10{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
11 {% set storm_packages = [
12 'java-1.8.0-openjdk-headless',
13 ] %}
14{% elif base_distro in ['debian', 'ubuntu'] %}
15 {% set storm_packages = [
16 'default-jre-headless',
17 ] %}
18{% endif %}
19
20{{ macros.install_packages(storm_packages | customizable("packages")) }}
21
22{% block storm_version %}
23ENV storm_version=1.1.2
24ENV storm_url=http://www.mirrorservice.org/sites/ftp.apache.org/storm/apache-storm-${storm_version}/apache-storm-${storm_version}.tar.gz
25ENV storm_pkg_sha512sum=4ec7554d4e242c5cfa3b010f63b2ed65866d0768bfa04c7ae87004d21994041ef25b198a236a87f14ac3b36b698f117338080d9b7d9c0f561b7de256bf2e10d2
26{% endblock %}
27
28{% block storm_install %}
29RUN curl -sSL -o /tmp/storm.tgz ${storm_url} \
30 && echo "${storm_pkg_sha512sum} /tmp/storm.tgz" | sha512sum -c \
31 && tar --strip 1 -xvf /tmp/storm.tgz -C /opt/storm \
32 && rm -f /tmp/storm.tgz
33
34{% endblock %}
35
36COPY extend_start.sh /usr/local/bin/kolla_extend_start
37RUN chmod 755 /usr/local/bin/kolla_extend_start
38
39{% block storm_footer %}{% endblock %}
40{% block footer %}{% endblock %}
41
42USER storm
diff --git a/docker/storm/extend_start.sh b/docker/storm/extend_start.sh
new file mode 100644
index 0000000..6c9bb0b
--- /dev/null
+++ b/docker/storm/extend_start.sh
@@ -0,0 +1,9 @@
1#!/bin/bash
2
3# Create log directory, with appropriate permissions
4if [[ ! -d "/var/log/kolla/storm" ]]; then
5 mkdir -p /var/log/kolla/storm
6fi
7if [[ $(stat -c %a /var/log/kolla/storm) != "755" ]]; then
8 chmod 755 /var/log/kolla/storm
9fi
diff --git a/kolla/common/config.py b/kolla/common/config.py
index da67d0b..4f0dd34 100755
--- a/kolla/common/config.py
+++ b/kolla/common/config.py
@@ -70,6 +70,7 @@ _PROFILE_OPTS = [
70 'redis', 70 'redis',
71 'rsyslog', 71 'rsyslog',
72 'skydive', 72 'skydive',
73 'storm',
73 'tgtd', 74 'tgtd',
74 ], 75 ],
75 help='Infra images'), 76 help='Infra images'),
@@ -1098,6 +1099,10 @@ USERS = {
1098 'logstash-user': { 1099 'logstash-user': {
1099 'uid': 42478, 1100 'uid': 42478,
1100 'gid': 42478, 1101 'gid': 42478,
1102 },
1103 'storm-user': {
1104 'uid': 42479,
1105 'gid': 42479,
1101 } 1106 }
1102} 1107}
1103 1108
diff --git a/releasenotes/notes/add-apache-storm-927c5318d91b5db3.yaml b/releasenotes/notes/add-apache-storm-927c5318d91b5db3.yaml
new file mode 100644
index 0000000..7325a04
--- /dev/null
+++ b/releasenotes/notes/add-apache-storm-927c5318d91b5db3.yaml
@@ -0,0 +1,3 @@
1---
2features:
3 - Add support for building an Apache Storm image.