forked from Kinetic/kinetic-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
235 lines (186 loc) · 12.3 KB
/
readme.txt
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
Kinetic Simulator/Admin Command Line Interface (CLI).
0. Assume you have at least Java SE 1.6 or 1.7 or 1.8 installed on your machine.
1. Define JAVA_HOME environment variable (example: google 'how to set JAVA_HOME on Mac).
2. Run "mvn clean package" in <Kinetic-Folder>, verify
<Kinetic-Folder>/kinetic-simulator/target/kinetic-simulator-0.6.0.2-SNAPSHOT-jar-with-dependencies.jar
<Kinetic-Folder>/kinetic-client/target/kinetic-client-0.6.0.2-SNAPSHOT-jar-with-dependencies.jar
exist.
3. To start Kinetic simulator:
Windows:
cd <Kinetic-Folder>\bin
startSimulator.bat
Linux & Mac:
cd <Kinetic-Folder>/bin
sh startSimulator.sh
4. To run Kinetic admin CLI:
Windows:
cd <Kinetic-Folder>\bin
kineticAdmin.bat -help
Linux & Mac:
cd <Kinetic-Folder>/bin
sh kineticAdmin.sh -help
5. Security file template:
security.template
6. To start Kinetic simulator (configuration port, tls_port and kinetic_home)
Windows:
cd <Kinetic-Folder>\bin
startSimulator.bat -help
Linux & Mac:
cd <Kinetic-Folder>/bin
sh startSimulator.sh -help
Run smoke test against simulator or kinetic drive
==================================
Make sure one instance of simulator or kinetic drive is running.
1. Run "mvn clean package" in <Kinetic-Folder> or <Kinetic-Folder>/kinetic-test, verify
<Kinetic-Folder>/kinetic-test/target/kinetic-test-0.6.0.2-SNAPSHOT-jar-with-dependencies.jar
<Kinetic-Folder>/kinetic-test/target/smoke-tests.jar
exist.
2. cd <Kinetic-Folder>/bin
3. sh runSmokeTests.sh [-host host_ip] [-port port] [-tlsport tlsport] [-home kinetic_home]
or
python runSmokeTests.py [-host host_ip] [-port port] [-tlsport tlsport] [-home kinetic_home]
Usage of Kinetic Admin API script
==================================
1. kineticAdmin.sh, you can use "-help" to see usage.
Usage: kineticAdmin <-setup|-security|-getlog|-firmware>
kineticAdmin -h|-help
kineticAdmin -setup [-host <ip|hostname>] [-tlsport <tlsport>] [-clversion <clusterversion>] [-pin <pin>] [-newclversion <newclusterversion>] [-setpin <setpin>] [-erase <true|false>]
kineticAdmin -security <file> [-host <ip|hostname>] [-tlsport <tlsport>] [-clversion <clusterversion>]
kineticAdmin -getlog [-host <ip|hostname>] [-tlsport <tlsport>] [-clversion <clusterversion>] [-type <utilization|temperature|capacity|configuration|message|statistic|all>]
kineticAdmin -firmware <file> [-host <ip|hostname>] [-tlsport <tlsport>] [-clversion <clusterversion>] [-pin <pin>]
2. setup:
sh kineticAdmin.sh -setup [-host <ip|hostname>] [-tlsport <tlsport>] [-clversion <clusterversion>] [-pin <pin>] [-newclversion <newclusterversion>] [-setpin <setpin>] [-erase <true|false>]
Parameters are optional, the default values are set as below:
host=127.0.0.1 simulator/drive's ipaddress
tlsport=8443 admin client connect to simulator/drive via this port
clversion=0 admin client connect to simulator/drive within this cluster version
For example,
2.1 set new cluster version.
Simulator/drive locally:
First time: sh kineticAdmin.sh -setup -newclversion 1
Second time: sh kineticAdmin.sh -setup -clversion 1 -newclversion 2
Third time: after set pin (sh kineticAdmin.sh -setup -setpin 123):
sh kineticAdmin.sh -setup -pin 123 -clversion 2 -newclversion 3
Simulator/drive remotely(IP:10.24.70.123):
First time: sh kineticAdmin.sh -setup -host 10.24.70.123 -newclversion 1
Second time: sh kineticAdmin.sh -setup -host 10.24.70.123 -clversion 1 -newclversion 2
Third time: after set pin (sh kineticAdmin.sh -setup -setpin 123):
sh kineticAdmin.sh -setup -pin 123 -clversion 2 -newclversion 3
2.2 set pin.
Simulator/drive locally:
First time: sh kineticAdmin.sh -setup -setpin 123
Second time: sh kineticAdmin.sh -setup -pin 123 -setpin 456
Third time: after set new cluster version (sh kineticAdmin.sh -setup -newclversion 1)
sh kineticAdmin.sh -setup -clversion 1 -pin 456 -setpin 789
Simulator/drive remotely(IP:10.24.70.123):
First time: sh kineticAdmin.sh -setup -host 10.24.70.123 -setpin 123
Second time: sh kineticAdmin.sh -setup -host 10.24.70.123 -pin 123 -setpin 456
Third time: after set new cluster version (sh kineticAdmin.sh -setup -newclversion 1)
sh kineticAdmin.sh -setup -host 10.24.70.123 -clversion 1 -pin 456 -setpin 789
2.3 erase data
Simulator/drive locally:
First time: sh kineticAdmin.sh -setup -erase true
Second time,
after set new cluster version (sh kineticAdmin.sh -setup -newclversion 1) for the simulator/drive
sh kineticAdmin.sh -setup -clversion 1 -erase true
after set pin (sh kineticAdmin.sh -setup -setpin 123) for the simulator/drive,
sh kineticAdmin.sh -setup -pin 123 -erase true
after set new cluster version and pin (sh kineticAdmin.sh -setup -newclversion 1 -setpin 123) for the simulator/drive
sh kineticAdmin.sh -setup -clversion 1 -pin 123 -erase true
Simulator/drive remotely(IP:10.24.70.123):
First time: sh kineticAdmin.sh -setup -host 10.24.70.123 -erase true
Second time,
after set new cluster version (sh kineticAdmin.sh -setup -host 10.24.70.123 -newclversion 1) for the simulator/drive
sh kineticAdmin.sh -setup -host 10.24.70.123 -clversion 1 -erase true
after set pin (sh kineticAdmin.sh -setup -host 10.24.70.123 -setpin 123) for the simulator/drive,
sh kineticAdmin.sh -setup -host 10.24.70.123 -pin 123 -erase true
after set new cluster version and pin (sh kineticAdmin.sh -setup -host 10.24.70.123 -newclversion 1 -setpin 123) for the simulator/drive
sh kineticAdmin.sh -setup -host 10.24.70.123 -clversion 1 -pin 123 -erase true
3. set security
sh kineticAdmin.sh -security <file> [-host <ip|hostname>] [-tlsport <tlsport>] [-clversion <clusterversion>]
Parameters are optional, the default values are set as below:
host=127.0.0.1
tlsport=8443
clversion=0
For example,
Simulator/drive locally:
Before setup new cluster version:sh kineticAdmin.sh -security security.template
After setup new cluster version (sh kineticAdmin.sh -setup -newclversion 1) for the simulator/drive
sh kineticAdmin.sh -clversion 1 -security security.template
Simulator/drive remotely(IP:10.24.70.123):
Before setup new cluster version:sh kineticAdmin.sh -security security.template -host 10.24.70.123
After setup new cluster version (sh kineticAdmin.sh -setup -host 10.24.70.123 -newclversion 1) for the simulator/drive
sh kineticAdmin.sh -security security.template -host 10.24.70.123 -clversion 1
4. get log
kineticAdmin -getlog [-host <ip|hostname>] [-tlsport <tlsport>] [-clversion <clusterversion>] [-type <utilization|temperature|capacity|configuration|message|statistic|all>]
Parameters are optional, the default values are set as below:
host=127.0.0.1
tlsport=8443
clversion=0
For example,
Simulator/drive locally:
Before setup new cluster version:
Get all type log information: sh kineticAdmin.sh -getlog
or
sh kineticAdmin.sh -getlog -type all
Get utilization log info: sh kineticAdmin.sh -getlog -type utilization
Get temperature log info: sh kineticAdmin.sh -getlog -type temperature
Get capacity log info: sh kineticAdmin.sh -getlog -type capacity
Get configuration log info: sh kineticAdmin.sh -getlog -type configuration
Get message log info: sh kineticAdmin.sh -getlog -type message
Get statistic log info: sh kineticAdmin.sh -getlog -type statistic
After setup new cluster version (sh kineticAdmin.sh -setup -newclversion 1) for the simulator/drive
Get all type log information: sh kineticAdmin.sh -getlog -clversion 1
or
sh kineticAdmin.sh -getlog -clversion 1 -type all
Get utilization log info: sh kineticAdmin.sh -getlog -clversion 1 -type utilization
Get temperature log info: sh kineticAdmin.sh -getlog -clversion 1 -type temperature
Get capacity log info: sh kineticAdmin.sh -getlog -clversion 1 -type capacity
Get configuration log info: sh kineticAdmin.sh -getlog -clversion 1 -type configuration
Get message log info: sh kineticAdmin.sh -getlog -clversion 1 -type message
Get statistic log info: sh kineticAdmin.sh -getlog -clversion 1 -type statistic
Simulator/drive remotely(IP:10.24.70.123):
Before setup new cluster version:
Get all type log information: sh kineticAdmin.sh -getlog -host 10.24.70.123
or
sh kineticAdmin.sh -getlog -host 10.24.70.123 -type all
Get utilization log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -type utilization
Get temperature log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -type temperature
Get capacity log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -type capacity
Get configuration log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -type configuration
Get message log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -type message
Get statistic log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -type statistic
After setup new cluster version (sh kineticAdmin.sh -setup -newclversion 1) for the simulator/drive
Get all type log information: sh kineticAdmin.sh -getlog -clversion 1
or
sh kineticAdmin.sh -getlog -clversion 1 -type all
Get utilization log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -clversion 1 -type utilization
Get temperature log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -clversion 1 -type temperature
Get capacity log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -clversion 1 -type capacity
Get configuration log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -clversion 1 -type configuration
Get message log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -clversion 1 -type message
Get statistic log info: sh kineticAdmin.sh -getlog -host 10.24.70.123 -clversion 1 -type statistic
5. firmware download
kineticAdmin -firmware <file> [-host <ip|hostname>] [-tlsport <tlsport>] [-clversion <clusterversion>] [-pin <pin>]
Parameters are optional, the default values are set as below:
host=127.0.0.1
tlsport=8443
clversion=0
For example,
Simulator/drive locally:
Before setup new cluster version:sh kineticAdmin.sh -firmware /Users/Emma/123.run
After setup new cluster version (sh kineticAdmin.sh -setup -newclversion 1) for the simulator/drive
sh kineticAdmin.sh -firmware /Users/Emma/123.run -clversion 1
Simulator/drive remotely(IP:10.24.70.123):
Before setup new cluster version:sh kineticAdmin.sh -firmware /Users/Emma/123.run -host 10.24.70.123
After setup new cluster version (sh kineticAdmin.sh -setup -newclversion 1) for the simulator/drive
sh kineticAdmin.sh -firmware /Users/Emma/123.run -host 10.24.70.123 -clversion 1
Usage of proto scripts
===========================
1. Sync protocol file from Kinetic-Protocol github repo [https://github.com/Seagate/Kinetic-Protocol.git] to local.
$sh syncProtoFromRepo.sh to get the latest version.
$sh syncProtoFromRepo.sh $commitHash to get the commit hash version.
For example,
$sh syncProtoFromRepo.sh c4c95530b099c4882f3229560038e427e85fe219
2. Build protocol file locally, including compile kinetic.proto, kineticDb.proto, kineticIo.proto.
$sh buildProto.sh