This repository has been archived by the owner on Jan 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathredeploy_all.sh
executable file
·59 lines (43 loc) · 4.06 KB
/
redeploy_all.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
52
53
54
55
56
57
#!/bin/bash
#stop all slaves
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave stop'
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave stop'
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave stop'
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave stop'
# ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave stop'
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave stop'
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave stop'
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave stop'
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave stop'
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave stop'
# stop the master
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-master stop'
# copy jar to master server
scp -i id_rsa ./harvester.jar [email protected]:/home/crfharvester/harvester/harvester.jar
# start the master
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-master start'
#give it some time to load jobs and stabilze
sleep 5m
# copy jar to all slaves and start them in sequence
scp -i ./id_rsa ./harvester.jar [email protected]:/home/crfharvester/harvester/harvester.jar
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave start'
scp -i ./id_rsa ./harvester.jar [email protected]:/home/crfharvester/harvester/harvester.jar
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave start'
scp -i ./id_rsa ./harvester.jar [email protected]:/home/crfharvester/harvester/harvester.jar
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave start'
scp -i ./id_rsa ./harvester.jar [email protected]:/home/crfharvester/harvester/harvester.jar
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave start'
# for now do nothing with prod2 as it runs the Mongo instance
#scp -i ./id_rsa ./harvester.jar [email protected]:/home/crfharvester/harvester/harvester.jar
#ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave start'
scp -i ./id_rsa ./harvester.jar [email protected]:/home/crfharvester/harvester/harvester.jar
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave start'
scp -i ./id_rsa ./harvester.jar [email protected]:/home/crfharvester/harvester/harvester.jar
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave start'
scp -i ./id_rsa ./harvester.jar [email protected]:/home/crfharvester/harvester/harvester.jar
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave start'
scp -i ./id_rsa ./harvester.jar [email protected]:/home/crfharvester/harvester/harvester.jar
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave start'
scp -i ./id_rsa ./harvester.jar [email protected]:/home/crfharvester/harvester/harvester.jar
ssh -i ./id_rsa -o StrictHostKeyChecking=no [email protected] 'sudo /etc/init.d/harvester-slave start'
echo "Done!"