forked from WeBankBlockchain/WeBASE
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.py
More file actions
78 lines (72 loc) · 2.07 KB
/
deploy.py
File metadata and controls
78 lines (72 loc) · 2.07 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
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/python3
# encoding: utf-8
import sys
import comm.check as commCheck
import comm.build as commBuild
def do():
if len(sys.argv)==1:
help()
return
param = sys.argv[1]
if "installAll" == param:
commCheck.do()
commBuild.do()
elif "startAll" == param:
commCheck.checkPort()
commBuild.start()
elif "stopAll" == param:
commBuild.end()
elif "startNode" == param:
commBuild.startNode()
elif "stopNode" == param:
commBuild.stopNode()
elif "startWeb" == param:
commBuild.startWeb()
elif "stopWeb" == param:
commBuild.stopWeb()
elif "startManager" == param:
commBuild.startManager()
elif "stopManager" == param:
commBuild.stopManager()
elif "startFront" == param:
commBuild.startFront()
elif "stopFront" == param:
commBuild.stopFront()
elif "check"== param:
commCheck.do()
elif "help"== param:
help()
else:
paramError()
return
def help():
helpMsg = '''
Usage: python deploy [Parameter]
Parameter:
check: check the environment
installAll: check the environment, deploy all server
startAll: check server port, start all server
stopAll: stop all server
startNode: start FISCO-BCOS nodes
stopNode: stop FISCO-BCOS nodes
startWeb: start WeBASE-Web server
stopWeb: stop WeBASE-Web server
startManager: start WeBASE-Node-Manager server
stopManager: stop WeBASE-Node-Manager server
startFront: start WeBASE-Front server
stopFront: stop WeBASE-Front server
Attention:
1. Need to install python, jdk, mysql, MySQL-python or PyMySQL first
2. Need to ensure a smooth network
3. You need to install git, wget, nginx; if it is not installed, the installation script will automatically install these components, but this may fail.
'''
print (helpMsg)
return
def paramError():
print ("")
print ("Param error! Please check.")
help()
return
if __name__ == '__main__':
do()
pass