-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinitialDeploy.sh
executable file
·54 lines (38 loc) · 1.77 KB
/
initialDeploy.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
#!/bin/bash
workflow="$1"
hostcount="$2"
solvingMode="$3"
mode="resolve"
# please run this script from the home directory of the unfaasener project
# making sure that by default are functions run on serverless
# python3 scheduler/resetRoutingDecisions.py $workflow $hostcount
docker container stop $(docker container ls -aq)
# clean all privious metadata, logs, and caches for that workflow
python3 scheduler/resetLastDecisions.py $workflow $hostcount $solvingMode
# initialize Julia Solver
mkfifo ./scheduler/juliaStdin
mkfifo ./scheduler/juliaStdout
julia scheduler/rpsMultiHostSolver.jl &
# clean the host execution agent queue
python3 host-agents/execution-agent/cleanup-queue.py vmSubscriber1 vm0
# get the most recent serverless logs for the specified workflow
python3 log-parser/get-workflow-logs/getWorkflowLogs.py $workflow 1
# running the monitoring scripts and the predictor agent in the background
cd host-agents/monitoring-agent
./monitoringAgent &
pidFour=$!
sleep 10
# running the vm execution agent in the background
cd ../execution-agent
python3 vmModule.py vmSubscriber1 vm0 &
pidOne=$!
# periodically (every 10m) collecting the execution logs of the workflow in the background
cd ../..
python3 log-parser/get-workflow-logs/getWorkflowLogs.py $workflow 0 &
pidTwo=$!
# periodically performing garbage collection (every 1h) on the datastore(unused merging points data) and the dataframe
python3 scheduler/garbageCollector.py &
pidThree=$!
# terminating background processes upon termination of this script
trap "kill ${pidOne} ${pidTwo} ${pidThree} ${pidFour}; echo -n \"END\" > scheduler/juliaStdin; rm scheduler/juliaStdin; python3 log-parser/get-workflow-logs/getWorkflowLogs.py ${workflow} 1; python3 setup-tests/combineDataframes.py; exit 1" INT SIGINT SIGTERM EXIT
wait