Skip to content

Commit d903c99

Browse files
authored
Update to readme (#778)
* Update to readme * Update * Updates * more updates * Updates * update * update
1 parent 26ac153 commit d903c99

File tree

1 file changed

+130
-67
lines changed

1 file changed

+130
-67
lines changed

cloudbank-v3/spring-apps-spring3/README.md

Lines changed: 130 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -61,27 +61,21 @@ Please visit the Live Lab for more information.
6161
oractl:>
6262
```
6363

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-
7164
1. Deploy account service
7265

7366
1. bind
7467

7568
```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
7771
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.
7973
```
8074

8175
1. deploy
8276

8377
```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
8579
uploading: account/target/account-0.0.1-SNAPSHOT.jar
8680
building and pushing image...
8781
@@ -92,7 +86,7 @@ Please visit the Live Lab for more information.
9286
1. Verify deployment success
9387

9488
```shell
95-
kubectl logs -n cbv3 svc/account
89+
kubectl logs -n application svc/account
9690
```
9791

9892
Successful deployment should be look similar to this:
@@ -110,15 +104,15 @@ Please visit the Live Lab for more information.
110104
1. bind
111105

112106
```shell
113-
oractl:>bind --app-name cbv3 --service-name customer
107+
oractl:>bind --app-name application --service-name customer
114108
database password/servicePassword (defaults to Welcome12345): *************
115109
Kubernetes secret for Datasource was created successfully.
116110
```
117111

118112
1. deploy
119113

120114
```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
122116
uploading: customer/target/customer-0.0.1-SNAPSHOT.jar
123117
building and pushing image...
124118
@@ -128,9 +122,9 @@ Please visit the Live Lab for more information.
128122

129123
1. Verify deployment success
130124

131-
```shell
132-
kubectl logs -n cbv3 svc/customer
133-
```
125+
```shell
126+
kubectl logs -n application svc/customer
127+
```
134128

135129
Successful deployment should be look similar to this:
136130

@@ -147,7 +141,7 @@ Please visit the Live Lab for more information.
147141
1. deploy
148142

149143
```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
151145
uploading: creditscore/target/creditscore-0.0.1-SNAPSHOT.jar
152146
building and pushing image...
153147
@@ -157,9 +151,9 @@ Please visit the Live Lab for more information.
157151

158152
1. Verify deployment success
159153

160-
```shell
161-
kubectl logs -n cbv3 svc/creditscore
162-
```
154+
```shell
155+
kubectl logs -n application svc/creditscore
156+
```
163157

164158
Successful deployment should be look similar to this:
165159

@@ -177,28 +171,28 @@ Please visit the Live Lab for more information.
177171

178172
1. bind
179173

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+
```
185179

186180
1. deploy
187181

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...
192186
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+
```
196190

197191
1. Verify deployment success
198192

199-
```shell
200-
kubectl logs -n cbv3 svc/testrunner
201-
```
193+
```shell
194+
kubectl logs -n application svc/testrunner
195+
```
202196

203197
Successful deployment should be look similar to this:
204198

@@ -217,7 +211,7 @@ Please visit the Live Lab for more information.
217211
1. deploy
218212

219213
```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
221215
uploading: transfer/target/transfer-0.0.1-SNAPSHOT.jar
222216
building and pushing image...
223217
@@ -227,9 +221,9 @@ Please visit the Live Lab for more information.
227221

228222
1. Verify deployment success
229223

230-
```shell
231-
kubectl logs -n cbv3 svc/transfer
232-
```
224+
```shell
225+
kubectl logs -n application svc/transfer
226+
```
233227

234228
Successful deployment should be look similar to this:
235229

@@ -248,15 +242,15 @@ Please visit the Live Lab for more information.
248242
1. bind
249243

250244
```shell
251-
oractl:>bind --app-name cbv3 --service-name checks --username account
245+
oractl:>bind --app-name application --service-name checks --username account
252246
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.
254248
```
255249

256250
1. deploy
257251

258252
```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
260254
uploading: checks/target/checks-0.0.1-SNAPSHOT.jar
261255
building and pushing image...
262256
@@ -266,9 +260,9 @@ Please visit the Live Lab for more information.
266260

267261
1. Verify deployment success
268262

269-
```shell
270-
kubectl logs -n cbv3 svc/checks
271-
```
263+
```shell
264+
kubectl logs -n application svc/checks
265+
```
272266

273267
Successful deployment should be look similar to this:
274268

@@ -283,7 +277,11 @@ Please visit the Live Lab for more information.
283277

284278
1. Verify pods are running
285279

286-
`kubectl get pods -n cbv3`
280+
```shell
281+
kubectl get pods -n application
282+
```
283+
284+
Output should look similar to this:
287285

288286
```text
289287
NAME READY STATUS RESTARTS AGE
@@ -301,11 +299,15 @@ Please visit the Live Lab for more information.
301299

302300
1. Port forward
303301

304-
`kubectl port-forward -n cbv3 svc/account 8081:8080`
302+
```shell
303+
kubectl port-forward -n application svc/account 8081:8080
304+
```
305305

306306
1. Rest endpoint
307307

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+
```
309311

310312
Should return:
311313

@@ -326,11 +328,15 @@ Please visit the Live Lab for more information.
326328
327329
1. Port forward
328330
329-
`kubectl port-forward -n cbv3 svc/customer 8082:8080`
331+
```shell
332+
kubectl port-forward -n application svc/customer 8082:8080
333+
```
330334
331335
1. Rest endpoint
332336
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+
```
334340
335341
Should return:
336342
@@ -350,11 +356,15 @@ Please visit the Live Lab for more information.
350356
351357
1. Port forward
352358
353-
`kubectl port-forward -n cbv3 svc/creditscore 8083:8080`
359+
```shell
360+
kubectl port-forward -n application svc/creditscore 8083:8080
361+
``````
354362
355363
1. Rest endpoint
356364
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+
```
358368
359369
Should return:
360370
@@ -368,12 +378,17 @@ Please visit the Live Lab for more information.
368378
1. Test check service
369379
370380
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+
```
373385
374386
1. Rest endpoint - deposit check
375387
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+
377392
Should return:
378393
379394
```text
@@ -387,7 +402,9 @@ Please visit the Live Lab for more information.
387402
388403
1. Check logs
389404
390-
`kubectl -n cbv3 logs svc/checks`
405+
```shell
406+
kubectl -n application logs svc/checks
407+
```
391408
392409
Should contain:
393410
@@ -431,7 +448,9 @@ Please visit the Live Lab for more information.
431448
432449
1. Check logs
433450
434-
`kubectl -n cbv3 logs svc/checks`
451+
```shell
452+
kubectl -n application logs svc/checks
453+
```
435454
436455
Output should be similar to:
437456
@@ -443,7 +462,9 @@ Please visit the Live Lab for more information.
443462
444463
1. Check journal -- DEPOSIT
445464
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+
```
447468
448469
Output should look like this -- DEPOSIT
449470
@@ -460,9 +481,11 @@ Please visit the Live Lab for more information.
460481
461482
1. Port forward
462483
463-
`kubectl -n cbv3 port-forward svc/transfer 8085:8080`
484+
```shell
485+
kubectl -n application port-forward svc/transfer 8085:8080
486+
```
464487
465-
1. Check account balances
488+
1. Check account balances. Note that the account numbers 1 and 2 can be different in your environment
466489
467490
```shell
468491
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.
497520
curl -X POST "http://localhost:8085/transfer?fromAccount=2&toAccount=1&amount=100"
498521
```
499522
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:
501536
502537
```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+
}
504556
```
505557
506-
Wrong namespace that's why. Feign for transfer service?
558+
1. Check the log file to confirm
507559
508-
```yaml
509-
account:
510-
deposit:
511-
url: http://account.application:8080/deposit
560+
```shell
561+
kubectl -n application logs svc/transfer
512562
```
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

Comments
 (0)