@@ -36,6 +36,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
36
36
export GIT_REPOSITORY=serve-grpc
37
37
export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
38
38
export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
39
+
39
40
```
40
41
41
42
1. Using the environment variables values just set, follow
@@ -49,6 +50,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
49
50
```console
50
51
cd ${GIT_REPOSITORY_DIR}
51
52
make dependencies-for-development
53
+
52
54
```
53
55
54
56
1. Install dependencies needed for [Go] code.
@@ -57,6 +59,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
57
59
```console
58
60
cd ${GIT_REPOSITORY_DIR}
59
61
make dependencies
62
+
60
63
```
61
64
62
65
## Lint
@@ -67,6 +70,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
67
70
```console
68
71
cd ${GIT_REPOSITORY_DIR}
69
72
make lint
73
+
70
74
```
71
75
72
76
## Build
@@ -77,13 +81,15 @@ Since the Senzing library is a prerequisite, it must be installed first.
77
81
```console
78
82
cd ${GIT_REPOSITORY_DIR}
79
83
make clean build
84
+
80
85
```
81
86
82
87
1. The binaries will be found in the `${GIT_REPOSITORY_DIR}/target` directory.
83
88
Example:
84
89
85
90
```console
86
91
tree ${GIT_REPOSITORY_DIR}/target
92
+
87
93
```
88
94
89
95
## Run
@@ -98,6 +104,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
98
104
99
105
```console
100
106
export SENZING_TOOLS_DATABASE_FILE=/tmp/sqlite/G2C.db
107
+
101
108
```
102
109
103
110
1. Copy template database and run command.
@@ -108,18 +115,21 @@ Since the Senzing library is a prerequisite, it must be installed first.
108
115
cp ${GIT_REPOSITORY_DIR}/testdata/sqlite/G2C.db ${SENZING_TOOLS_DATABASE_FILE}
109
116
export SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@nowhere${SENZING_TOOLS_DATABASE_FILE}
110
117
${GIT_REPOSITORY_DIR}/target/linux-amd64/serve-grpc
118
+
111
119
```
112
120
113
121
1. macOS
114
122
115
123
```console
116
124
${GIT_REPOSITORY_DIR}/target/darwin-amd64/serve-grpc
125
+
117
126
```
118
127
119
128
1. Windows
120
129
121
130
```console
122
131
${GIT_REPOSITORY_DIR}/target/windows-amd64/serve-grpc
132
+
123
133
```
124
134
125
135
1. Clean up.
@@ -128,6 +138,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
128
138
```console
129
139
cd ${GIT_REPOSITORY_DIR}
130
140
make clean
141
+
131
142
```
132
143
133
144
## Test
@@ -138,6 +149,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
138
149
```console
139
150
cd ${GIT_REPOSITORY_DIR}
140
151
make clean setup test
152
+
141
153
```
142
154
143
155
1. **Optional:** View the SQLite database.
@@ -152,6 +164,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
152
164
--tty \
153
165
--volume /tmp/sqlite:/data \
154
166
coleifer/sqlite-web
167
+
155
168
```
156
169
157
170
Visit [localhost:9174].
@@ -166,6 +179,7 @@ Create a code coverage map.
166
179
```console
167
180
cd ${GIT_REPOSITORY_DIR}
168
181
make clean setup coverage
182
+
169
183
```
170
184
171
185
A web-browser will show the results of the coverage.
@@ -180,6 +194,7 @@ Create a code coverage map.
180
194
```console
181
195
cd ${GIT_REPOSITORY_DIR}
182
196
make clean documentation
197
+
183
198
```
184
199
185
200
1. If a web page doesn't appear, visit [localhost:6060].
@@ -197,6 +212,7 @@ Example:
197
212
```console
198
213
cd ${GIT_REPOSITORY_DIR}
199
214
make clean
215
+
200
216
```
201
217
202
218
## Docker
@@ -207,6 +223,7 @@ Example:
207
223
```console
208
224
cd ${GIT_REPOSITORY_DIR}
209
225
make docker-build
226
+
210
227
```
211
228
212
229
1. Run docker container.
@@ -219,6 +236,7 @@ Example:
219
236
--rm \
220
237
--tty \
221
238
senzing/serve-grpc
239
+
222
240
```
223
241
224
242
1. **Optional:** Test using `docker-compose`.
@@ -227,13 +245,15 @@ Example:
227
245
```console
228
246
cd ${GIT_REPOSITORY_DIR}
229
247
make clean docker-test
248
+
230
249
```
231
250
232
251
To bring the `docker-compose` formation, run
233
252
234
253
```console
235
254
cd ${GIT_REPOSITORY_DIR}
236
255
make clean
256
+
237
257
```
238
258
239
259
## Package
@@ -250,13 +270,15 @@ The actual packaging is done in the [senzing-tools] repository.
250
270
```console
251
271
cd ${GIT_REPOSITORY_DIR}
252
272
make package
273
+
253
274
```
254
275
255
276
1. The results will be in the `${GIT_REPOSITORY_DIR}/target` directory.
256
277
Example:
257
278
258
279
```console
259
280
tree ${GIT_REPOSITORY_DIR}/target
281
+
260
282
```
261
283
262
284
### Test DEB package on Ubuntu
@@ -266,6 +288,7 @@ The actual packaging is done in the [senzing-tools] repository.
266
288
267
289
```console
268
290
apt list --installed | grep serve-grpc
291
+
269
292
```
270
293
271
294
1. :pencil2: Install `serve-grpc`.
@@ -275,13 +298,15 @@ The actual packaging is done in the [senzing-tools] repository.
275
298
```console
276
299
cd ${GIT_REPOSITORY_DIR}/target
277
300
sudo apt install ./serve-grpc-0.0.0.deb
301
+
278
302
```
279
303
280
304
1. :pencil2: Identify a location for database.
281
305
Example:
282
306
283
307
```console
284
308
export SENZING_TOOLS_DATABASE_FILE=/tmp/sqlite/G2C.db
309
+
285
310
```
286
311
287
312
1. Copy template database and run command.
@@ -291,6 +316,7 @@ The actual packaging is done in the [senzing-tools] repository.
291
316
mkdir --parents ${SENZING_TOOLS_DATABASE_FILE%/*}
292
317
cp ${GIT_REPOSITORY_DIR}/testdata/sqlite/G2C.db ${SENZING_TOOLS_DATABASE_FILE}
293
318
export SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@nowhere${SENZING_TOOLS_DATABASE_FILE}
319
+
294
320
```
295
321
296
322
1. :pencil2: Run command.
@@ -299,13 +325,15 @@ The actual packaging is done in the [senzing-tools] repository.
299
325
```console
300
326
export LD_LIBRARY_PATH=/opt/senzing/er/lib/
301
327
serve-grpc
328
+
302
329
```
303
330
304
331
1. Remove `serve-grpc` from system.
305
332
Example:
306
333
307
334
```console
308
335
sudo apt-get remove serve-grpc
336
+
309
337
```
310
338
311
339
### Test RPM package on Centos
@@ -315,6 +343,7 @@ The actual packaging is done in the [senzing-tools] repository.
315
343
316
344
```console
317
345
yum list installed | grep serve-grpc
346
+
318
347
```
319
348
320
349
1. :pencil2: Install `serve-grpc`.
@@ -324,6 +353,7 @@ The actual packaging is done in the [senzing-tools] repository.
324
353
```console
325
354
cd ${GIT_REPOSITORY_DIR}/target
326
355
sudo yum install ./serve-grpc-0.0.0.rpm
356
+
327
357
```
328
358
329
359
1. :pencil2: Identify database.
@@ -332,6 +362,7 @@ The actual packaging is done in the [senzing-tools] repository.
332
362
333
363
```console
334
364
export SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@nowhere/tmp/sqlite/G2C.db
365
+
335
366
```
336
367
337
368
1. Run command.
@@ -340,13 +371,15 @@ The actual packaging is done in the [senzing-tools] repository.
340
371
```console
341
372
export LD_LIBRARY_PATH=/opt/senzing/er/lib/
342
373
serve-grpc
374
+
343
375
```
344
376
345
377
1. Remove `serve-grpc` from system.
346
378
Example:
347
379
348
380
```console
349
381
sudo yum remove serve-grpc
382
+
350
383
```
351
384
352
385
## Specialty
@@ -362,6 +395,7 @@ in testing the `sz-sdk-go-core` packages.
362
395
363
396
```console
364
397
export SENZING_DEMO_DIR=~/my-senzing-demo
398
+
365
399
```
366
400
367
401
1. Bring up the docker-compose stack.
@@ -390,6 +424,7 @@ in testing the `sz-sdk-go-core` packages.
390
424
391
425
cd ${SENZING_DEMO_DIR}
392
426
sudo --preserve-env docker-compose up
427
+
393
428
```
394
429
395
430
1. In a separate terminal window, set environment variables.
@@ -399,13 +434,15 @@ in testing the `sz-sdk-go-core` packages.
399
434
```console
400
435
export LOCAL_IP_ADDRESS=$(curl --silent https://raw.githubusercontent.com/senzing-garage/knowledge-base/main/gists/find-local-ip-address/find-local-ip-address.py | python3 -)
401
436
export SENZING_TOOLS_DATABASE_URL=postgresql://postgres:postgres@${LOCAL_IP_ADDRESS}:5432/er/?sslmode=disable
437
+
402
438
```
403
439
404
440
1. Run tests.
405
441
406
442
```console
407
443
cd ${GIT_REPOSITORY_DIR}
408
444
make clean test
445
+
409
446
```
410
447
411
448
1. **Optional:** View the PostgreSQL database.
@@ -423,6 +460,7 @@ in testing the `sz-sdk-go-core` packages.
423
460
424
461
cd ${GIT_REPOSITORY_DIR}
425
462
make clean
463
+
426
464
```
427
465
428
466
### Test using bloomrpc
@@ -441,6 +479,7 @@ For other gRPC tools, visit [Awesome gRPC].
441
479
```console
442
480
wget https://github.com/bloomrpc/bloomrpc/releases/download/1.5.3/bloomrpc_1.5.3_amd64.deb
443
481
sudo apt install ./bloomrpc_1.5.3_amd64.deb
482
+
444
483
```
445
484
446
485
1. Start the test server.
@@ -449,13 +488,15 @@ For other gRPC tools, visit [Awesome gRPC].
449
488
```console
450
489
cd ${GIT_REPOSITORY_DIR}
451
490
make clean run-serve-grpc
491
+
452
492
```
453
493
454
494
1. In a separate terminal, start the gRPC test client.
455
495
Example:
456
496
457
497
```console
458
498
bloomrpc
499
+
459
500
```
460
501
461
502
1. In `bloomrpc`:
@@ -474,6 +515,7 @@ For other gRPC tools, visit [Awesome gRPC].
474
515
"iniParams": "{\"PIPELINE\":{\"CONFIGPATH\":\"/etc/opt/senzing\",\"RESOURCEPATH\":\"/opt/senzing/er/resources\",\"SUPPORTPATH\":\"/opt/senzing/data\"},\"SQL\":{\"CONNECTION\":\"sqlite3://na:na@nowhere/tmp/sqlite/G2C.db\"}}",
475
516
"verboseLogging": 0
476
517
}
518
+
477
519
```
478
520
479
521
1. Near the center, click the green "play" button.
0 commit comments