This repository has been archived by the owner on Feb 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
493081b
commit 67edba5
Showing
3 changed files
with
15 additions
and
142 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,27 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# Wrapper script for launching the Mirror on a kubernetes pod. | ||
# Accepts one argument, the type of service to run. Can be "server", "dummy". | ||
# Launches two python grabbers in the background, and then runs the flash app with | ||
# gunicorn. | ||
|
||
service=$1 | ||
|
||
#sudo mkdir -p /cephfs/testbed/dqmsquare_mirror/db/ | ||
#sudo mkdir -p /cephfs/testbed/dqmsquare_mirror/tmp/ | ||
#sudo mkdir -p /cephfs/testbed/dqmsquare_mirror/log/ | ||
#sudo find /cephfs/testbed/dqmsquare_mirror -type d -exec chmod 777 {} \; | ||
LOGS_DIR=/cinder/dqmsquare/log/ | ||
PVC_DIR=/cinder/dqmsquare | ||
|
||
echo Creating logs dir $LOGS_DIR ... | ||
sudo mkdir -p $LOGS_DIR | ||
|
||
echo Changing permissions for PVC claim $PVC_DIR ... | ||
sudo find -type d -exec chmod 777 {} \; | ||
|
||
sudo mkdir -p /cinder/dqmsquare/log/ | ||
sudo find /cinder/dqmsquare -type d -exec chmod 777 {} \; | ||
|
||
python3 dqmsquare_cfg.py k8 | ||
|
||
if [[ $service ]] && [[ $service = "server" ]] ; then | ||
python3 grabber.py production & | ||
python3 grabber.py playback & | ||
|
||
# Launch gunicorn with 4 workers. | ||
gunicorn -w 4 -b 0.0.0.0:8084 'wsgi:flask_app' | ||
fi | ||
|
||
if [[ $service ]] && [[ $service = "dummy" ]] ; then | ||
while true; do | ||
echo "Sleep ..." | ||
echo "Sleeping ..." | ||
sleep 60 | ||
done | ||
fi |
This file was deleted.
Oops, something went wrong.