-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComandosExtras.sh
48 lines (46 loc) · 1.6 KB
/
ComandosExtras.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
######################################################
#############SECUENCIA DE APAGADO SEGURO##############
######################################################
###Apagar los nodos siempre en el siguiente orden###
###Apagar NODOWeb3
ssh nodoweb3 'shutdown -h now'
###Apagar NODOWeb2
ssh nodoweb2 'shutdown -h now'
###Apagar NODOWeb1
ssh nodoweb1 'shutdown -h now'
###Apagar NODODB3
ssh nododb3 'shutdown -h now'
###Apagar NODODB2
ssh nododb2 'shutdown -h now'
###Apagar NODODB1
ssh nododb1 'shutdown -h now'
######################################################
############SECUENCIA DE ENCENDIDO SEGURO#############
######################################################
###Encender los 3 nodos DB siempre en el siguiente orden###
###Encender NODODB1
###Luego que encienda, ejecutar:
ssh nododb1 'systemctl stop mysql'
ssh nododb1 'systemctl start [email protected]'
###Encender NODODB2
###Luego que encienda, ejecutar:
ssh nododb2 'systemctl restart mysql'
###Encender NODODB3
###Luego que encienda, ejecutar:
ssh nododb3 'systemctl restart mysql'
######################################################
######################################################
#Ejecutar cuando los 3 nodos WEB esten encendidos, desde SLAVE
######################################################
ssh nodoweb1 'service glusterfsd restart'
ssh nodoweb2 'service glusterfsd restart'
ssh nodoweb3 'service glusterfsd restart'
ssh nodoweb1 'mount -a'
ssh nodoweb2 'mount -a'
ssh nodoweb3 'mount -a'
ssh nodoweb1 'systemctl restart httpd'
ssh nodoweb2 'systemctl restart httpd'
ssh nodoweb3 'systemctl restart httpd'
##########
###FIN####
##########