summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-07-13 19:38:08 +0000
committerGerrit Code Review <review@openstack.org>2018-07-13 19:38:08 +0000
commit42d7cecbcac8bf4c6e9d4e8cd1e2cd6ba81e6eef (patch)
tree07efc218b47b6903f4573a6f5dbc7d6ce1a27211
parent132117ad5c3020731247e01f4a0ba3e49e93f615 (diff)
parent91d23981b2a711413e1ac7945aaf86e0866259b1 (diff)
Merge "Add support for deploying Apache Storm"
-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.