Skip to content

Commit

Permalink
initial add for instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaskey committed Feb 2, 2017
1 parent 3509c70 commit ceb4a75
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ ADD container_files/bin/onbuild.sh /opt/autoexec/bin/onbuild.sh
ADD container_files/bin/stub.sh /opt/autoexec/firstrun/stub.sh
ADD container_files/bin/stub.sh /opt/autoexec/onbuild/stub.sh

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


# Set default environment variables.
ENV HOME /opt/tier

Expand All @@ -52,3 +60,6 @@ RUN touch /tmp/firsttimerunning

# Define working directory.
WORKDIR /opt/tier


CMD /usr/bin/startcron.sh
7 changes: 7 additions & 0 deletions container_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 container_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 container_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

0 comments on commit ceb4a75

Please sign in to comment.