-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
46 lines (33 loc) · 866 Bytes
/
run.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
SECONDS=0
# check the label
label_node
# clean the record from the last time
sh clean_record.sh
# create request plan
(cd ALGO && bash run_testbed.sh)
# start the mqtt to record the data
mosquitto_sub -h 192.168.0.99 -t lab/# > output 2>&1 &
mqtt_record_pid=$!
# deploy the app
python parse_request.py request/our.plan
cp container_list.txt ~/Record/
# waiting for pending
for i in {1..60}
do
if kubectl get pods | grep -m 1 -E "Pending|ContainerCreating"; then sleep 10 ; fi
done
echo "End waiting..."
bash end_waiting.sh
duration=$SECONDS
echo "=========="
echo "$(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed."
echo "=========="
# record the resource usage
(cd ~/Record/ && sh record.sh)
sleep $1
# delete helm release
#delete_helm
# end mqtt
kill $mqtt_record_pid
# end record resource
(cd ~/Record/ && sh stop_record.sh)