-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from ericvaandering/probes
Add a container in which probes can be run.
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |