-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresizeDroplets.sh
More file actions
executable file
·67 lines (49 loc) · 2.91 KB
/
resizeDroplets.sh
File metadata and controls
executable file
·67 lines (49 loc) · 2.91 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env bash
# This script has been used as a scratch.
# Last version of Resize droplet scripts has been migrated to remoteInvocation.sh
CONTENT_TYPE="'Content-Type: application/json'"
AUTH="'Authorization: Bearer 808fe5b62bc168f757a40463ee3dfdefc58f2d5b865b88ff1a0a1bad71a5154e'"
C1="c-1vcpu-2gb"
C16="'{"type":"resize","size":"c-16"}'"
C4="c-4"
C2="c-2"
function startPowerOff {
echo "power off"
}
function stopPowerOn {
echo "power on"
}
case $1 in
off)
runCommandMasterStreamServers "${STOP_SPARK_DSTREAM_PROC_CMD}" "nohup"
;;
on)
runCommandMasterStreamServers "${STOP_SPARK_DATASET_PROC_CMD}" "nohup"
;;
*)
echo "Which spark processing would you like to stop"
;;
esac
#Stream Servers
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99932869/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99932868/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99932867/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99932866/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99932865/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99932864/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99932863/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99932862/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99932861/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99932860/actions"
#Kafka Servers
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99933241/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99933240/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99933239/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99933238/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C16} "https://api.digitalocean.com/v2/droplets/99933237/actions"
#ZooKeeper Servers
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C4} "https://api.digitalocean.com/v2/droplets/99933379/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C4} "https://api.digitalocean.com/v2/droplets/99933378/actions"
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C4} "https://api.digitalocean.com/v2/droplets/99933377/actions"
#Redis Server
curl -X POST -H ${CONTENT_TYPE} -H ${AUTH} -d ${C4} "https://api.digitalocean.com/v2/droplets/108622384/actions"