Skip to content

Commit

Permalink
Merge pull request #41 from ericvaandering/probes
Browse files Browse the repository at this point in the history
Add a container in which probes can be run.
  • Loading branch information
tbeerman authored Nov 8, 2019
2 parents 40c4e47 + ca237d2 commit a5f0e31
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
20 changes: 20 additions & 0 deletions probes/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright European Organization for Nuclear Research (CERN) 2017
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Authors:
# - Eric Vaandering, <ewv@fnal.gov>, 2019

FROM rucio/rucio-daemons:latest

RUN yum install -y git \
&& yum clean all && rm -rf /var/cache/yum

ADD run-probes.sh /

WORKDIR /
RUN git clone https://github.com/rucio/probes.git

ENTRYPOINT ["/run-probes.sh"]
31 changes: 31 additions & 0 deletions probes/run-probes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#! /bin/bash

if [ -f /opt/rucio/etc/rucio.cfg ]; then
echo "rucio.cfg already mounted."
else
echo "rucio.cfg not found. will generate one."
j2 /tmp/rucio.cfg.j2 | sed '/^\s*$/d' > /opt/rucio/etc/rucio.cfg
fi

if [ ! -z "$RUCIO_PRINT_CFG" ]; then
echo "=================== /opt/rucio/etc/rucio.cfg ============================"
cat /opt/rucio/etc/rucio.cfg
echo ""
fi

cd /probes/common

echo "Will run probes:"
echo $PROBES

# Accept probe names space separated and run each in turn
IFS=' ' read -r -a probes <<< $PROBES

for probe in "${probes[@]}"
do
echo
echo $probe
./${probe}
done

sleep 60

0 comments on commit a5f0e31

Please sign in to comment.