From 335d18857efa6b32c5ae0ed757fce96d537e4772 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Wed, 1 Feb 2017 19:19:32 -0600 Subject: [PATCH 1/5] add env vars from args --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index c5767f7..8568244 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" From ccd60a35da3204b4a7475331025574a4ad439729 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Thu, 2 Feb 2017 12:14:49 -0600 Subject: [PATCH 2/5] instrumentation: initial add of cron stuff --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8568244..eab7e44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,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 From de46ac558d3672d8799a3aaaa5a2f74af73a5bc7 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Thu, 2 Feb 2017 12:19:21 -0600 Subject: [PATCH 3/5] add needed cron files --- files/bin/sendtierbeacon.sh | 4 ++++ files/bin/startcron.sh | 3 +++ files/tier-crontab | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 files/bin/sendtierbeacon.sh create mode 100644 files/bin/startcron.sh create mode 100644 files/tier-crontab diff --git a/files/bin/sendtierbeacon.sh b/files/bin/sendtierbeacon.sh new file mode 100644 index 0000000..dc13f84 --- /dev/null +++ b/files/bin/sendtierbeacon.sh @@ -0,0 +1,4 @@ +#!/bin/sh +if [ -z "$TIER_BEACON_OPT_OUT" ]; then +# logger -p $IMAGENAME &MAINTAINER &VERSION +fi \ No newline at end of file diff --git a/files/bin/startcron.sh b/files/bin/startcron.sh new file mode 100644 index 0000000..571fe0e --- /dev/null +++ b/files/bin/startcron.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cron +touch /var/log/cron.log diff --git a/files/tier-crontab b/files/tier-crontab new file mode 100644 index 0000000..590dd74 --- /dev/null +++ b/files/tier-crontab @@ -0,0 +1,2 @@ +#send daily ping to TIER Central +0 0 * * * /usr/bin/sendtierbeacon.sh >> /var/log/cron.log 2>&1 From 59f382c16c2c6271cdda4020732ffc3b639d7d7f Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Sat, 11 Feb 2017 12:34:17 -0600 Subject: [PATCH 4/5] chg to sendtierbeacon.sh --- files/bin/sendtierbeacon.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files/bin/sendtierbeacon.sh b/files/bin/sendtierbeacon.sh index dc13f84..583ea30 100644 --- a/files/bin/sendtierbeacon.sh +++ b/files/bin/sendtierbeacon.sh @@ -1,4 +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 -p $IMAGENAME &MAINTAINER &VERSION + `logger -n $LOGHOST -P $LOGPORT -t TIERBEACON $LOGTEXT` fi \ No newline at end of file From 8a26bd4e8dd154415062ad00da939ef94e77a2b4 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Sat, 11 Feb 2017 12:40:33 -0600 Subject: [PATCH 5/5] chg tomcat version (8.0.39 has been removed from download site - changed to 41) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index eab7e44..12b856f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -74,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