Skip to content
This repository has been archived by the owner on Apr 13, 2020. It is now read-only.

Applying changes required to run within OpenShift. #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ FROM opennms/openjdk:latest

LABEL maintainer "Ronny Trommer <[email protected]>"

ARG MINION_VERSION=develop
ARG MINION_VERSION=branches/release-24.0.0
ARG MIRROR_HOST=yum.opennms.org

ENV MINION_HOME /opt/minion
ENV MINION_CONFIG /opt/minion/etc/org.opennms.minion.controller.cfg
Expand All @@ -19,8 +20,12 @@ ENV OPENNMS_BROKER_USER minion
ENV OPENNMS_BROKER_PASS minion

RUN yum -y --setopt=tsflags=nodocs update && \
rpm -Uvh http://yum.opennms.org/repofiles/opennms-repo-${MINION_VERSION}-rhel7.noarch.rpm && \
rpm --import http://yum.opennms.org/OPENNMS-GPG-KEY && \
rpm -Uvh https://${MIRROR_HOST}/repofiles/opennms-repo-${MINION_VERSION/\//-}-rhel7.noarch.rpm && \
rpm --import https://${MIRROR_HOST}/OPENNMS-GPG-KEY && \
curl https://yum.opennms.org/stable/rhel7/jicmp/jicmp-2.0.3-1.el7.centos.x86_64.rpm -o /tmp/jicmp.rpm && \
curl https://yum.opennms.org/stable/rhel7/jicmp6/jicmp6-2.0.2-1.el7.centos.x86_64.rpm -o /tmp/jicmp6.rpm && \
yum -y install /tmp/jicmp.rpm && \
yum -y install /tmp/jicmp6.rpm && \
yum -y install opennms-minion && \
yum clean all && \
rm -rf /var/cache/yum && \
Expand Down
4 changes: 4 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
# Cause false/positives
# shellcheck disable=SC2086

# To avoid issues with OpenShift
umask 002

MINION_HOME="/opt/minion"
MINION_CONFIG="/opt/minion/etc/org.opennms.minion.controller.cfg"
MINION_OVERLAY_ETC="/opt/minion-etc-overlay"
Expand Down Expand Up @@ -154,6 +157,7 @@ applyOverlayConfig() {
}

start() {
export KARAF_EXEC="exec"
cd ${MINION_HOME}/bin
exec ./karaf server
}
Expand Down