Skip to content

Commit

Permalink
full set to run on nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
womullan committed Oct 16, 2023
1 parent 20d9673 commit 599c2d0
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 5 deletions.
4 changes: 3 additions & 1 deletion summittests/envvars-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ export S3_ENDPOINT_URL="https://s3dfrgw.slac.stanford.edu"
export AWS_ACCESS_KEY_ID=""
export AWS_SECRET_ACCESS_KEY=""
export bucket="rubin-summit-users"
export prefix="testx-lhn"
export prefix="test-lhn"
export nodes="lsstcam-dc03 lsstcam-dc04 lsstcam-dc05 lsstcam-dc06 lsstcam-dc07 lsstcam-dc08 lsstcam-dc09 lsstcam-dc10"

11 changes: 11 additions & 0 deletions summittests/gatherLogs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# put the scripts on all the nodes

# Note to jump between lsstcam nodes use 'kinit' since ipa controls it all


source envvars.sh


for n in $nodes; do
scp ${n}:/home/womullan/s3daemon/summittests/*log logs
done
11 changes: 11 additions & 0 deletions summittests/pushToNodes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# put the scripts on all the nodes

# Note to jump between lsstcam nodes use 'kinit' since ipa controls it all


source envvars.sh


for n in $nodes; do
rsync -a --exclude '/home/womullan/s3daemon/logs' /home/womullan/s3daemon ${n}:
done
14 changes: 14 additions & 0 deletions summittests/runOnNodes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# use ssh to run given scrip on all the nodes in $nodes

# Note to jump between lsstcam nodes use 'kinit' since ipa controls it all


source envvars.sh

cmd="./$1"

for n in $nodes; do
exec="cd s3daemon/summittests; ${cmd}"
echo $exec
ssh $n "${exec}" &
done
7 changes: 6 additions & 1 deletion summittests/runs3daemon.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Simple config for s3daemon
# eventually this shoudl be installed and excuted by puppe on every node
# assumes s3daemon has been installed or pip install -r of its requirements.txt
# see https://github.com/lsst-dm/s3daemon/blob/main/README.md

# Note to jump between lsstcam nodes use 'kinit' since ipa controls it all


source envvars.sh
source venv/bin/activate

host=`echo $HOSTNAME | cut -d'.' -f1`
logfile="${host}-s3daemon.log"

echo "S3_ENDPOINT_URL is $S3_ENDPOINT_URL"

python ../python/s3daemon/s3daemon.py &
python ../python/s3daemon/s3daemon.py > $logfile 2>&1 &
14 changes: 11 additions & 3 deletions summittests/sendTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@


source envvars.sh
source venv/bin/activate

echo "S3_ENDPOINT_URL is $S3_ENDPOINT_URL"
count=20

files=`ls ~tonyj/Data/MC_C_20200822_000054/MC_C_20200822* | head -${count}`
echo $files
files=`ls ~tonyj/Test/MC*/* | head -${count}`

fcount=0
for f in $files; do
key=`echo $f | cut -d'/' -f6 | sed 's/.fits//g'`
echo Sending $f $key
python ../python/s3daemon/send.py $f “/${bucket}/${prefix}/${key}&
done
fcount=$((fcount + 1))
if [ $((fcount % 20)) == 0 ]
then
sleep 20s
echo "Sleeping"
fi
done
5 changes: 5 additions & 0 deletions summittests/stops3daemon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# find the process and kill

proc=`ps -ealf | grep s3daem | grep -v grep | cut -d' ' -f5`

kill -9 $proc

0 comments on commit 599c2d0

Please sign in to comment.