@@ -61,27 +61,21 @@ Please visit the Live Lab for more information.
61
61
oractl:>
62
62
```
63
63
64
- 1 . Create namespace
65
-
66
- ``` shell
67
- oractl:> create --app-name cbv3
68
- application/namespace created successfully and image pull secret (registry-auth) created successfully and database TNSAdmin/wallet secret created successfully
69
- ```
70
-
71
64
1 . Deploy account service
72
65
73
66
1 . bind
74
67
75
68
``` shell
76
- oractl:> bind --app-name cbv3 --service-name account
69
+ bind --app-name application --service-name account
70
+ oractl:> bind --app-name application --service-name account
77
71
Database/Service Password: *************
78
- Schema {account} was successfully created and Kubernetes Secret {cbv3 /account} was successfully created.
72
+ Schema {account} was successfully created and Kubernetes Secret {application /account} was successfully created.
79
73
```
80
74
81
75
1. deploy
82
76
83
77
` ` ` shell
84
- deploy --app-name cbv3 --service-name account --artifact-path account/target/account-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --liquibase-db admin
78
+ oractl: > deploy --app-name application --service-name account --artifact-path account/target/account-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --liquibase-db admin
85
79
uploading: account/target/account-0.0.1-SNAPSHOT.jar
86
80
building and pushing image...
87
81
@@ -92,7 +86,7 @@ Please visit the Live Lab for more information.
92
86
1. Verify deployment success
93
87
94
88
` ` ` shell
95
- kubectl logs -n cbv3 svc/account
89
+ kubectl logs -n application svc/account
96
90
` ` `
97
91
98
92
Successful deployment should be look similar to this:
@@ -110,15 +104,15 @@ Please visit the Live Lab for more information.
110
104
1. bind
111
105
112
106
` ` ` shell
113
- oractl:> bind --app-name cbv3 --service-name customer
107
+ oractl:> bind --app-name application --service-name customer
114
108
database password/servicePassword (defaults to Welcome12345): *************
115
109
Kubernetes secret for Datasource was created successfully.
116
110
` ` `
117
111
118
112
1. deploy
119
113
120
114
` ` ` shell
121
- oractl:> deploy --app-name cbv3 --service-name customer --artifact-path customer/target/customer-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --liquibase-db admin
115
+ oractl:> deploy --app-name application --service-name customer --artifact-path customer/target/customer-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --liquibase-db admin
122
116
uploading: customer/target/customer-0.0.1-SNAPSHOT.jar
123
117
building and pushing image...
124
118
@@ -128,9 +122,9 @@ Please visit the Live Lab for more information.
128
122
129
123
1. Verify deployment success
130
124
131
- ` ` ` shell
132
- kubectl logs -n cbv3 svc/customer
133
- ` ` `
125
+ ` ` ` shell
126
+ kubectl logs -n application svc/customer
127
+ ` ` `
134
128
135
129
Successful deployment should be look similar to this:
136
130
@@ -147,7 +141,7 @@ Please visit the Live Lab for more information.
147
141
1. deploy
148
142
149
143
` ` ` shell
150
- oractl:> deploy --app-name cbv3 --service-name creditscore --artifact-path creditscore/target/creditscore-0.0.1-SNAPSHOT.jar --image-version 0.0.1
144
+ oractl:> deploy --app-name application --service-name creditscore --artifact-path creditscore/target/creditscore-0.0.1-SNAPSHOT.jar --image-version 0.0.1
151
145
uploading: creditscore/target/creditscore-0.0.1-SNAPSHOT.jar
152
146
building and pushing image...
153
147
@@ -157,9 +151,9 @@ Please visit the Live Lab for more information.
157
151
158
152
1. Verify deployment success
159
153
160
- ` ` ` shell
161
- kubectl logs -n cbv3 svc/creditscore
162
- ` ` `
154
+ ` ` ` shell
155
+ kubectl logs -n application svc/creditscore
156
+ ` ` `
163
157
164
158
Successful deployment should be look similar to this:
165
159
@@ -177,28 +171,28 @@ Please visit the Live Lab for more information.
177
171
178
172
1. bind
179
173
180
- ` ` ` shell
181
- oractl:> bind --app-name cbv3 --service-name testrunner --username account
182
- Database/Service Password: *************
183
- Schema {account} was successfully Not_Modified and Kubernetes Secret {cbv3 /testrunner} was successfully Created.
184
- ` ` `
174
+ ` ` ` shell
175
+ oractl:> bind --app-name application --service-name testrunner --username account
176
+ Database/Service Password: *************
177
+ Schema {account} was successfully Not_Modified and Kubernetes Secret {application /testrunner} was successfully Created.
178
+ ` ` `
185
179
186
180
1. deploy
187
181
188
- ` ` ` shell
189
- oractl:> deploy --app-name cbv3 --service-name testrunner --artifact-path testrunner/target/testrunner-0.0.1-SNAPSHOT.jar --image-version 0.0.1
190
- uploading: testrunner/target/testrunner-0.0.1-SNAPSHOT.jar
191
- building and pushing image...
182
+ ` ` ` shell
183
+ oractl:> deploy --app-name application --service-name testrunner --artifact-path testrunner/target/testrunner-0.0.1-SNAPSHOT.jar --image-version 0.0.1
184
+ uploading: testrunner/target/testrunner-0.0.1-SNAPSHOT.jar
185
+ building and pushing image...
192
186
193
- creating deployment and service...
194
- obaas-cli [deploy]: Application was successfully deployed.
195
- ` ` `
187
+ creating deployment and service...
188
+ obaas-cli [deploy]: Application was successfully deployed.
189
+ ` ` `
196
190
197
191
1. Verify deployment success
198
192
199
- ` ` ` shell
200
- kubectl logs -n cbv3 svc/testrunner
201
- ` ` `
193
+ ` ` ` shell
194
+ kubectl logs -n application svc/testrunner
195
+ ` ` `
202
196
203
197
Successful deployment should be look similar to this:
204
198
@@ -217,7 +211,7 @@ Please visit the Live Lab for more information.
217
211
1. deploy
218
212
219
213
` ` ` shell
220
- oractl:> deploy --app-name cbv3 --service-name transfer --artifact-path transfer/target/transfer-0.0.1-SNAPSHOT.jar --image-version 0.0.1
214
+ oractl:> deploy --app-name application --service-name transfer --artifact-path transfer/target/transfer-0.0.1-SNAPSHOT.jar --image-version 0.0.1
221
215
uploading: transfer/target/transfer-0.0.1-SNAPSHOT.jar
222
216
building and pushing image...
223
217
@@ -227,9 +221,9 @@ Please visit the Live Lab for more information.
227
221
228
222
1. Verify deployment success
229
223
230
- ` ` ` shell
231
- kubectl logs -n cbv3 svc/transfer
232
- ` ` `
224
+ ` ` ` shell
225
+ kubectl logs -n application svc/transfer
226
+ ` ` `
233
227
234
228
Successful deployment should be look similar to this:
235
229
@@ -248,15 +242,15 @@ Please visit the Live Lab for more information.
248
242
1. bind
249
243
250
244
` ` ` shell
251
- oractl:> bind --app-name cbv3 --service-name checks --username account
245
+ oractl:> bind --app-name application --service-name checks --username account
252
246
Database/Service Password: *************
253
- Schema {account} was successfully Not_Modified and Kubernetes Secret {cbv3 /checks} was successfully Created.
247
+ Schema {account} was successfully Not_Modified and Kubernetes Secret {application /checks} was successfully Created.
254
248
` ` `
255
249
256
250
1. deploy
257
251
258
252
` ` ` shell
259
- oractl:> deploy --app-name cbv3 --service-name checks --artifact-path checks/target/checks-0.0.1-SNAPSHOT.jar --image-version 0.0.1
253
+ oractl:> deploy --app-name application --service-name checks --artifact-path checks/target/checks-0.0.1-SNAPSHOT.jar --image-version 0.0.1
260
254
uploading: checks/target/checks-0.0.1-SNAPSHOT.jar
261
255
building and pushing image...
262
256
@@ -266,9 +260,9 @@ Please visit the Live Lab for more information.
266
260
267
261
1. Verify deployment success
268
262
269
- ` ` ` shell
270
- kubectl logs -n cbv3 svc/checks
271
- ` ` `
263
+ ` ` ` shell
264
+ kubectl logs -n application svc/checks
265
+ ` ` `
272
266
273
267
Successful deployment should be look similar to this:
274
268
@@ -283,7 +277,11 @@ Please visit the Live Lab for more information.
283
277
284
278
1. Verify pods are running
285
279
286
- ` kubectl get pods -n cbv3`
280
+ ` ` ` shell
281
+ kubectl get pods -n application
282
+ ` ` `
283
+
284
+ Output should look similar to this:
287
285
288
286
` ` ` text
289
287
NAME READY STATUS RESTARTS AGE
@@ -301,11 +299,15 @@ Please visit the Live Lab for more information.
301
299
302
300
1. Port forward
303
301
304
- ` kubectl port-forward -n cbv3 svc/account 8081:8080`
302
+ ` ` ` shell
303
+ kubectl port-forward -n application svc/account 8081:8080
304
+ ` ` `
305
305
306
306
1. Rest endpoint
307
307
308
- ` curl -s http://localhost:8081/api/v1/accounts | jq` or ` http --body :8081/api/v1/accounts`
308
+ ` ` ` shell
309
+ curl -s http://localhost:8081/api/v1/accounts | jq
310
+ ` ` `
309
311
310
312
Should return:
311
313
@@ -326,11 +328,15 @@ Please visit the Live Lab for more information.
326
328
327
329
1. Port forward
328
330
329
- ` kubectl port-forward -n cbv3 svc/customer 8082:8080`
331
+ ` ` ` shell
332
+ kubectl port-forward -n application svc/customer 8082:8080
333
+ ` ` `
330
334
331
335
1. Rest endpoint
332
336
333
- ` curl -s http://localhost:8082/api/v1/customer | jq` or ` http --body :8081/api/v1/customer`
337
+ ` ` ` shell
338
+ curl -s http://localhost:8082/api/v1/customer | jq
339
+ ` ` `
334
340
335
341
Should return:
336
342
@@ -350,11 +356,15 @@ Please visit the Live Lab for more information.
350
356
351
357
1. Port forward
352
358
353
- ` kubectl port-forward -n cbv3 svc/creditscore 8083:8080`
359
+ ` ` ` shell
360
+ kubectl port-forward -n application svc/creditscore 8083:8080
361
+ ` ` ` ` ` `
354
362
355
363
1. Rest endpoint
356
364
357
- ` curl -s http://localhost:8083/api/v1/creditscore | jq` or ` http --body :8081/api/v1/creditscore`
365
+ ` ` ` shell
366
+ curl -s http://localhost:8083/api/v1/creditscore | jq
367
+ ` ` `
358
368
359
369
Should return:
360
370
@@ -368,12 +378,17 @@ Please visit the Live Lab for more information.
368
378
1. Test check service
369
379
370
380
1. Port forward
371
-
372
- ` kubectl -n cbv3 port-forward svc/testrunner 8084:8080`
381
+
382
+ ` ` ` shell
383
+ kubectl -n application port-forward svc/testrunner 8084:8080
384
+ ` ` `
373
385
374
386
1. Rest endpoint - deposit check
375
387
376
- ` curl -i -X POST -H ' Content-Type: application/json' -d ' {"accountId": 2, "amount": 256}' http://localhost:8084/api/v1/testrunner/deposit`
388
+ ` ` ` shell
389
+ curl -i -X POST -H ' Content-Type: application/json' -d ' {"accountId": 2, "amount": 256}' http://localhost:8084/api/v1/testrunner/deposit
390
+ ` ` `
391
+
377
392
Should return:
378
393
379
394
` ` ` text
@@ -387,7 +402,9 @@ Please visit the Live Lab for more information.
387
402
388
403
1. Check logs
389
404
390
- ` kubectl -n cbv3 logs svc/checks`
405
+ ` ` ` shell
406
+ kubectl -n application logs svc/checks
407
+ ` ` `
391
408
392
409
Should contain:
393
410
@@ -431,7 +448,9 @@ Please visit the Live Lab for more information.
431
448
432
449
1. Check logs
433
450
434
- ` kubectl -n cbv3 logs svc/checks`
451
+ ` ` ` shell
452
+ kubectl -n application logs svc/checks
453
+ ` ` `
435
454
436
455
Output should be similar to:
437
456
@@ -443,7 +462,9 @@ Please visit the Live Lab for more information.
443
462
444
463
1. Check journal -- DEPOSIT
445
464
446
- ` curl -i http://localhost:8081/api/v1/account/2/journal`
465
+ ` ` ` shell
466
+ curl -i http://localhost:8081/api/v1/account/2/journal
467
+ ` ` `
447
468
448
469
Output should look like this -- DEPOSIT
449
470
@@ -460,9 +481,11 @@ Please visit the Live Lab for more information.
460
481
461
482
1. Port forward
462
483
463
- ` kubectl -n cbv3 port-forward svc/transfer 8085:8080`
484
+ ` ` ` shell
485
+ kubectl -n application port-forward svc/transfer 8085:8080
486
+ ` ` `
464
487
465
- 1. Check account balances
488
+ 1. Check account balances. Note that the account numbers 1 and 2 can be different in your environment
466
489
467
490
` ` ` shell
468
491
curl -s http://localhost:8081/api/v1/account/1 | jq ; curl -s http://localhost:8081/api/v1/account/2 | jq
@@ -497,16 +520,56 @@ Please visit the Live Lab for more information.
497
520
curl -X POST " http://localhost:8085/transfer?fromAccount=2&toAccount=1&amount=100"
498
521
` ` `
499
522
500
- Output due to namespace:
523
+ Output should look like this:
524
+
525
+ ` ` ` text
526
+ transfer status:withdraw succeeded deposit succeeded
527
+ ` ` `
528
+
529
+ 1. Check accounts to see that the transfer have occurred:
530
+
531
+ ` ` ` shell
532
+ curl -s http://localhost:8081/api/v1/account/1 | jq ; curl -s http://localhost:8081/api/v1/account/2 | jq
533
+ ` ` `
534
+
535
+ Output should be similar to this:
501
536
502
537
` ` ` json
503
- {" timestamp" :" 2023-11-02T18:17:19.300+00:00" ," status" :500," error" :" Internal Server Error" ," path" :" /transfer" }
538
+ {
539
+ " accountId" : 1,
540
+ " accountName" : " Andy's checking" ,
541
+ " accountType" : " CH" ,
542
+ " accountCustomerId" : " qwertysdwr" ,
543
+ " accountOpenedDate" : " 2023-11-02T17:23:53.000+00:00" ,
544
+ " accountOtherDetails" : " Account Info" ,
545
+ " accountBalance" : 80
546
+ }
547
+ {
548
+ " accountId" : 2,
549
+ " accountName" : " Mark's CCard" ,
550
+ " accountType" : " CC" ,
551
+ " accountCustomerId" : " bkzLp8cozi" ,
552
+ " accountOpenedDate" : " 2023-11-02T17:23:53.000+00:00" ,
553
+ " accountOtherDetails" : " Mastercard account" ,
554
+ " accountBalance" : 900
555
+ }
504
556
` ` `
505
557
506
- Wrong namespace that ' s why. Feign for transfer service?
558
+ 1. Check the log file to confirm
507
559
508
- ```yaml
509
- account:
510
- deposit:
511
- url: http://account.application:8080/deposit
560
+ ` ` ` shell
561
+ kubectl -n application logs svc/transfer
512
562
` ` `
563
+
564
+ Output should look similar to this:
565
+
566
+ ` ` ` log
567
+ 2023-11-03T18:09:06.468Z INFO 1 --- [nio-8080-exec-1] com.example.transfer.TransferService : Started new LRA/transfer Id: http://otmm-tcs.otmm.svc.cluster.local:9000/api/v1/lra-coordinator/85ce2133-e891-4df4-b891-8456d2ed5558
568
+ 2023-11-03T18:09:06.471Z INFO 1 --- [nio-8080-exec-1] com.example.transfer.TransferService : withdraw accountId = 2, amount = 100
569
+ 2023-11-03T18:09:06.472Z INFO 1 --- [nio-8080-exec-1] com.example.transfer.TransferService : withdraw lraId = http://otmm-tcs.otmm.svc.cluster.local:9000/api/v1/lra-coordinator/85ce2133-e891-4df4-b891-8456d2ed5558
570
+ 2023-11-03T18:09:07.507Z INFO 1 --- [nio-8080-exec-1] com.example.transfer.TransferService : withdraw succeeded
571
+ 2023-11-03T18:09:07.507Z INFO 1 --- [nio-8080-exec-1] com.example.transfer.TransferService : deposit accountId = 1, amount = 100
572
+ 2023-11-03T18:09:07.507Z INFO 1 --- [nio-8080-exec-1] com.example.transfer.TransferService : deposit lraId = http://otmm-tcs.otmm.svc.cluster.local:9000/api/v1/lra-coordinator/85ce2133-e891-4df4-b891-8456d2ed5558
573
+ 2023-11-03T18:09:07.600Z INFO 1 --- [nio-8080-exec-1] com.example.transfer.TransferService : withdraw succeeded deposit succeeded
574
+ 2023-11-03T18:09:07.601Z INFO 1 --- [nio-8080-exec-1] com.example.transfer.TransferService : LRA/transfer action will be confirm
575
+ ` ` `
0 commit comments