Skip to content

3.3 instrumenting #21

Merged
merged 5 commits into from
Feb 11, 2017
Merged
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
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ARG maintainer=tier
ARG imagename=shibboleth_idp
ARG version=3.3.0
ENV VERSION=$version
ENV IMAGENAME=$imagename
ENV MAINTAINER=$maintainer

MAINTAINER $maintainer
LABEL Vendor="Internet2"
Expand Down Expand Up @@ -72,7 +74,7 @@ RUN mkdir -p "$CATALINA_HOME"
# done

ENV TOMCAT_MAJOR 8
ENV TOMCAT_VERSION 8.0.39
ENV TOMCAT_VERSION 8.0.41
ENV TOMCAT_TGZ_URL https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz

WORKDIR $CATALINA_HOME
Expand All @@ -90,6 +92,15 @@ RUN set -x \
ADD files/idp.xml conf/Catalina/idp.xml
ADD files/server.xml conf/server.xml

ADD files/tier-crontab /opt/tier/tier-crontab
RUN crontab /opt/tier/tier-crontab
ADD files/bin/startcron.sh /usr/bin/startcron.sh
RUN chmod +x /usr/bin/startcron.sh
ADD files/bin/sendtierbeacon.sh /usr/bin/sendtierbeacon.sh
RUN touch /var/log/cron.log

ENV PATH $CATALINA_HOME/bin:$JAVA_HOME/bin:$PATH

ONBUILD COPY ./root/ /opt/shibboleth/$SHIB_PREFIX/

CMD /usr/bin/startcron.sh
7 changes: 7 additions & 0 deletions files/bin/sendtierbeacon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
LOGHOST="cerif.org"
LOGPORT="5000"
LOGTEXT="TIERBEACON/TIER/1.0#IM=$IMAGENAME#IV=$VERSION#MT=$MAINTAINER#"
if [ -z "$TIER_BEACON_OPT_OUT" ]; then
`logger -n $LOGHOST -P $LOGPORT -t TIERBEACON $LOGTEXT`
fi
3 changes: 3 additions & 0 deletions files/bin/startcron.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
cron
touch /var/log/cron.log
2 changes: 2 additions & 0 deletions files/tier-crontab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#send daily ping to TIER Central
0 0 * * * /usr/bin/sendtierbeacon.sh >> /var/log/cron.log 2>&1