-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sysperf.sh
executable file
·52 lines (45 loc) · 1.51 KB
/
run.sysperf.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This script creates the private container network and then
# starts all the various containers.
# Setting global/configuration variables
WORKING_DIR="/data01/sysperf"
NODE_NAME=`hostname`
# Checking to see if need to run in debug mode
if [ "$1" = "debug" ]
then
DEBUG=""
else
DEBUG="-d"
fi
# Creating the private network
echo "Adding sysperf-net private container network"
podman network create sysperf-net
# Starting the sysperf container
VERSION=`cat VERSION.sysperf`
echo "Stopping sysperf container"
podman container stop sysperf
echo "Starting sysperf container"
podman run --rm $DEBUG \
--net sysperf-net \
--name sysperf \
-v $WORKING_DIR/sysperf-data:/sysperf/data \
sysperf:$VERSION
# Starting the sysperf-web container
echo "Starting sysperf-web container"
VERSION=`cat VERSION.sysperf-web`
echo "Stopping sysperf-web container"
podman container stop sysperf-web
echo "Starting sysperf-web container"
podman run --rm $DEBUG \
-p 8080:5001/tcp \
--net sysperf-net \
--name sysperf-web \
-v $WORKING_DIR/fcp-logs:/sysperf/fcp-logs \
-v $WORKING_DIR/fcp-uploads:/sysperf/fcp-uploads \
-v $WORKING_DIR/spw-logs:/sysperf/spw-logs \
-v $WORKING_DIR/spw-uploads:/sysperf/spw-uploads \
-h=$NODE_NAME \
sysperf-web:$VERSION
# Due to permission issues, need to set directory wide open
echo "Changing perms on uploads directory"
podman exec sysperf-web /bin/chmod 777 /sysperf/fcp-uploads
podman exec sysperf-web /bin/chmod 777 /sysperf/spw-uploads