switch to storm version 1.2.3

Story: 2008674
Task: 41966
Change-Id: I71db8da82e3bbb6328e71cba6017182542d75fc9
This commit is contained in:
bandorf 2021-03-02 16:39:14 +01:00
parent bcb469e8dc
commit d8420f5ec0
3 changed files with 24 additions and 12 deletions

View File

@ -5,10 +5,11 @@ ARG APP_REPO=https://review.opendev.org/openstack/monasca-thresh
ARG REPO_VERSION=master ARG REPO_VERSION=master
ARG CONSTRAINTS_BRANCH=master ARG CONSTRAINTS_BRANCH=master
FROM storm:1.1.1 FROM storm:1.2.3
ENV \ ENV \
MAVEN_HOME="/usr/share/maven" \ MAVEN_HOME="/usr/share/maven" \
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" \
ZOOKEEPER_SERVERS="zookeeper" \ ZOOKEEPER_SERVERS="zookeeper" \
ZOOKEEPER_PORT="2181" \ ZOOKEEPER_PORT="2181" \
ZOOKEEPER_WAIT="true" \ ZOOKEEPER_WAIT="true" \
@ -59,14 +60,21 @@ ARG COMMON_REPO
ARG COMMON_VERSION ARG COMMON_VERSION
ARG COMMON_GIT_COMMIT ARG COMMON_GIT_COMMIT
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
RUN \ RUN \
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.8/main' > /etc/apk/repositories && \ mkdir -p /usr/share/man/man1 && \
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.8/community' | tee -a /etc/apk/repositories && \ apt-get clean && \
apk upgrade --purge && \ apt-get update && \
apk add --no-cache --virtual build-dep maven git py3-pip python3-dev git openjdk8 make g++ && \ apt-get install -y --no-install-recommends iproute2 net-tools netcat unzip software-properties-common && \
apk add --no-cache python3 mysql-client && \ apt-add-repository -y 'deb http://ftp.de.debian.org/debian sid main' && \
apt-add-repository -y 'deb http://security.debian.org/debian-security stretch/updates main' && \
apt-get update && \
apt-get install -y --no-install-recommends openjdk-8-jdk -o APT::Immediate-Configure=0 && \
apt-get install -y --no-install-recommends maven git python3-pip && \
apt-get install -y --no-install-recommends python3 default-mysql-client && \
mkdir /root/.m2 && \ mkdir /root/.m2 && \
pip3 install --no-cache-dir --upgrade setuptools && \
pip3 install --no-cache-dir \ pip3 install --no-cache-dir \
jinja2 \ jinja2 \
pykafka \ pykafka \
@ -103,14 +111,16 @@ RUN \
"$COMMON_GIT_COMMIT" >> /VERSIONS && \ "$COMMON_GIT_COMMIT" >> /VERSIONS && \
printf "Constraints file: %s\\n" \ printf "Constraints file: %s\\n" \
"$CONSTRAINTS_FILE"?h="$CONSTRAINTS_BRANCH" >> /VERSIONS && \ "$CONSTRAINTS_FILE"?h="$CONSTRAINTS_BRANCH" >> /VERSIONS && \
apk del build-dep && \ apt-get remove -y apt-utils && \
apt-get remove -y maven git python3-pip software-properties-common && \
apt-get -y autoremove && \
rm -rf \ rm -rf \
/app \ /app \
/monasca-common \ /monasca-common \
/root/.cache/ \ /root/.cache/ \
/root/.m2/repository \ /root/.m2/repository \
/tmp/* \ /tmp/* \
/var/cache/apk/* \ /var/cache/apt/* \
/var/log/* /var/log/*
ENTRYPOINT ["/start.sh"] ENTRYPOINT ["/start.sh"]

View File

@ -55,7 +55,9 @@ if sys.version_info.major != 3:
sys.stdout.write("Sorry, requires Python 3.x\n") sys.stdout.write("Sorry, requires Python 3.x\n")
sys.exit(1) sys.exit(1)
LOG_LEVEL = logging.getLevelName(os.environ.get('LOG_LEVEL', 'INFO')) logLevelEnv = os.environ.get('LOG_LEVEL', 'INFO')
LOG_LEVEL = logging.getLevelName(logLevelEnv.upper())
logging.basicConfig(level=LOG_LEVEL) logging.basicConfig(level=LOG_LEVEL)
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@ -1,4 +1,4 @@
#!/bin/ash #!/bin/sh
# shellcheck shell=dash # shellcheck shell=dash
if [ -n "$DEBUG" ]; then if [ -n "$DEBUG" ]; then
@ -9,7 +9,7 @@ CONFIG_TEMPLATES="/templates"
CONFIG_DEST="/etc/monasca" CONFIG_DEST="/etc/monasca"
LOG_TEMPLATES="/logging" LOG_TEMPLATES="/logging"
LOG_DEST="/storm/log4j2" LOG_DEST="/storm/log4j2"
APACHE_STORM_DIR="/apache-storm-1.1.1" APACHE_STORM_DIR="/apache-storm-1.2.3"
ZOOKEEPER_WAIT=${ZOOKEEPER_WAIT:-"true"} ZOOKEEPER_WAIT=${ZOOKEEPER_WAIT:-"true"}
ZOOKEEPER_WAIT_TIMEOUT=${ZOOKEEPER_WAIT_TIMEOUT:-"3"} ZOOKEEPER_WAIT_TIMEOUT=${ZOOKEEPER_WAIT_TIMEOUT:-"3"}