-
Notifications
You must be signed in to change notification settings - Fork 0
/
reset.sh
executable file
·67 lines (46 loc) · 1.65 KB
/
reset.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
58
59
60
61
62
63
64
65
#!/bin/bash
echo -e "\E[1;33mSTOP/REMOVING LOCAL CONTAINERS"
tput sgr0
source /home/ubuntu/VerteiltesSetup/stop_cont.sh
echo -e "\E[1;33mSTOP/REMOVE REMOTE CONTAINERS 150"
tput sgr0
ssh ubuntu@10.43.116.150 'bash -s' < /home/ubuntu/VerteiltesSetup/stop_cont.sh
echo -e "\E[1;33mSTOP/REMOVE REMOTE CONTAINERS 150"
tput sgr0
ssh ubuntu@10.43.116.153 'bash -s' < /home/ubuntu/VerteiltesSetup/stop_cont.sh
echo -e "\E[1;33mREMOVE OVERLAY NETWORK"
tput sgr0
sudo docker network rm reservierung
echo -e "\E[1;33mSTOP ETCD+LOGS+FILES"
tput sgr0
sudo service etcd stop
sudo rm /var/log/etcd.log
sudo rm -r /var/etcd/*
sudo rm -r /var/etcd
echo -e "\E[1;33mSTOP LOCAL DOCKER+LOGS"
tput sgr0
source /home/ubuntu/VerteiltesSetup/stop_docker.sh
echo -e "\E[1;33mSTOP REMOTE DOCKER+LOGS 150"
tput sgr0
ssh ubuntu@10.43.116.150 'bash -s' < /home/ubuntu/VerteiltesSetup/stop_docker.sh
echo -e "\E[1;33mSTOP REMOTE DOCKER+LOGS 150"
tput sgr0
ssh ubuntu@10.43.116.153 'bash -s' < /home/ubuntu/VerteiltesSetup/stop_docker.sh
echo -e "\E[1;33mINIT/START ETCD"
tput sgr0
source /home/ubuntu/VerteiltesSetup/etcd.sh
echo -e "\E[1;33mRESTART LOCAL DOCKER"
tput sgr0
source /home/ubuntu/VerteiltesSetup/init.sh 10.43.116.154
echo -e "\E[1;33mSTART CONSUL"
tput sgr0
source /home/ubuntu/VerteiltesSetup/consul_setup.sh
echo -e "\E[1;33mSTART SWARM MANAGER"
tput sgr0
source /home/ubuntu/VerteiltesSetup/swarm_manager.sh 10.43.116.154
echo -e "\E[1;33mRESTART NODE ON 150"
tput sgr0
ssh ubuntu@10.43.116.150 'bash -s' < /home/ubuntu/VerteiltesSetup/node_reset.sh
echo -e "\E[1;33mRESTART NODE ON 153"
tput sgr0
ssh ubuntu@10.43.116.153 'bash -s' < /home/ubuntu/VerteiltesSetup/node_reset.sh