Skip to content

Commit cd20399

Browse files
Cloudbank v3 fixes (#766)
* Native compile, test disabled * Updates * Graal pom changes and gitignore for nib files * native compile addition to pom.xml's * account pom.xml update * updates for new lra library Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com> * updates to make account deploy and start cleanly Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com> * Update README.md --------- Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com> Co-authored-by: Mark Nelson <mark.x.nelson@oracle.com>
1 parent 69e9b84 commit cd20399

File tree

5 files changed

+58
-27
lines changed

5 files changed

+58
-27
lines changed

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

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,66 @@ Please visit the Live Lab for more information.
66

77
## Build cloudbank
88

9-
`mvn clean package -Dmaven.test.skip=true`
9+
`mvn clean package`
1010

1111
```text
1212
[INFO] ------------------------------------------------------------------------
1313
[INFO] Reactor Summary for cloudbank 0.0.1-SNAPSHOT:
1414
[INFO]
15-
[INFO] cloudbank .......................................... SUCCESS [ 0.456 s]
16-
[INFO] account ............................................ SUCCESS [ 0.507 s]
17-
[INFO] customer ........................................... SUCCESS [ 0.079 s]
18-
[INFO] creditscore ........................................ SUCCESS [ 0.049 s]
19-
[INFO] transfer ........................................... SUCCESS [ 0.053 s]
20-
[INFO] testrunner ......................................... SUCCESS [ 0.050 s]
21-
[INFO] checks ............................................. SUCCESS [ 0.245 s]
15+
[INFO] cloudbank .......................................... SUCCESS [ 0.413 s]
16+
[INFO] account ............................................ SUCCESS [ 2.173 s]
17+
[INFO] customer ........................................... SUCCESS [ 1.005 s]
18+
[INFO] creditscore ........................................ SUCCESS [ 0.833 s]
19+
[INFO] transfer ........................................... SUCCESS [ 0.608 s]
20+
[INFO] testrunner ......................................... SUCCESS [ 0.936 s]
21+
[INFO] checks ............................................. SUCCESS [ 0.956 s]
2222
[INFO] ------------------------------------------------------------------------
2323
[INFO] BUILD SUCCESS
2424
[INFO] ------------------------------------------------------------------------
25-
[INFO] Total time: 1.633 s
26-
[INFO] Finished at: 2023-10-09T09:34:43-05:00
25+
[INFO] Total time: 7.185 s
26+
[INFO] Finished at: 2023-10-17T12:21:17-05:00
2727
[INFO] ------------------------------------------------------------------------
2828
```
2929

3030
## Deploying Cloudbank
3131

3232
1. Start the tunnel
3333

34-
`kpf -n obaas-admin svc/obaas-admin 8080`
34+
```shell
35+
kubectl port-forward -n obaas-admin svc/obaas-admin 8080
36+
```
3537

36-
1. Login
38+
1. Get the password for the `obaas-admin` user
3739

3840
```shell
41+
kubectl get secret -n azn-server oractl-passwords -o jsonpath='{.data.admin}' | base64 -d
42+
```
43+
44+
1. Start `oractl` and Login
45+
46+
```text
47+
oractl
48+
_ _ __ _ ___
49+
/ \ |_) _. _. (_ / | |
50+
\_/ |_) (_| (_| __) \_ |_ _|_
51+
=============================================================================================================================
52+
Application Name: Oracle Backend Platform :: Command Line Interface
53+
Application Version: (1.0.0)
54+
:: Spring Boot (v3.1.3) ::
55+
56+
3957
oractl:>connect
40-
password (defaults to oractl):
41-
using default value...
42-
connect successful server version:0.3.0
58+
username: obaas-admin
59+
password: **************
60+
obaas-cli: Successful connected.
61+
oractl:>
4362
```
4463

4564
1. Create namespace
4665

4766
```shell
4867
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
4969
```
5070

5171
1. Deploy account service
@@ -54,18 +74,27 @@ Please visit the Live Lab for more information.
5474

5575
```shell
5676
oractl:>bind --app-name cbv3 --service-name account
57-
database password/servicePassword (defaults to Welcome12345): *************
58-
Kubernetes secret for Datasource was created successfully.
77+
Database/Service Password: *************
78+
Schema {account} was successfully created and Kubernetes Secret {cbv3/account} was successfully created.
5979
```
6080

6181
1. deploy
6282

6383
```shell
64-
oractl:>deploy --app-name cbv3 --service-name account --artifact-path account/target/account-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --redeploy true
65-
uploading: account/target/account-0.0.1-SNAPSHOT.jarbuilding and pushing image...
66-
creating deployment and service... successfully deployed
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 obaasdevdb
85+
uploading: account/target/account-0.0.1-SNAPSHOT.jar
86+
building and pushing image...
87+
88+
creating deployment and service...
89+
obaas-cli [deploy]: Application was successfully deployed.
6790
```
6891

92+
1. Verify deployment success
93+
94+
```shell
95+
kubectl get log -n cbv3 svc/account
96+
```
97+
6998
1. Deploy customer service
7099

71100
1. bind

cloudbank-v3/spring-apps-spring3/account/src/main/resources/application.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ spring:
2525
liquibase:
2626
change-log: classpath:db/changelog/controller.yaml
2727
url: ${spring.datasource.url}
28-
user: ${spring.datasource.username}
29-
password: ${spring.datasource.password}
28+
user: ${liquibase.datasource.username}
29+
password: ${liquibase.datasource.password}
3030
enabled: ${LIQUIBASE_ENABLED:true}
31-
31+
3232
datasource:
3333
url: ${spring.datasource.url}
3434
username: ${spring.datasource.username}

cloudbank-v3/spring-apps-spring3/account/src/main/resources/db/changelog/table.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
--changeset gotsysdba:1
44
--preconditions onFail:MARK_RAN onerror:MARK_RAN
55
--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM ACCOUNT.ACCOUNTS WHERE 1=2
6-
DROP TABLE ACCOUNT.ACCOUNTS;
6+
DROP TABLE ACCOUNT.ACCOUNTS CASCADE CONSTRAINTS;
77

88
--changeset gotsysdba:2
99
--preconditions onFail:MARK_RAN onerror:MARK_RAN

cloudbank-v3/spring-apps-spring3/account/src/main/resources/db/changelog/txeventq.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ begin
1717
-- deposits
1818
dbms_aqadm.create_queue_table(
1919
queue_table => 'ACCOUNT.deposits_qt',
20-
queue_payload_type => SYS.AQ$_JMS_TEXT_MESSAGE);
20+
queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE',
21+
multiple_consumers => false);
2122
dbms_aqadm.create_queue(
2223
queue_name => 'ACCOUNT.deposits',
2324
queue_table => 'ACCOUNT.deposits_qt');
@@ -26,7 +27,8 @@ begin
2627
-- clearances
2728
dbms_aqadm.create_queue_table(
2829
queue_table => 'ACCOUNT.clearances_qt',
29-
queue_payload_type => SYS.AQ$_JMS_TEXT_MESSAGE);
30+
queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE',
31+
multiple_consumers => false);
3032
dbms_aqadm.create_queue(
3133
queue_name => 'ACCOUNT.clearances',
3234
queue_table => 'ACCOUNT.clearances_qt');

cloudbank-v3/spring-apps-spring3/transfer/src/main/java/com/example/transfer/WebConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
12
// Copyright (c) 2023, Oracle and/or its affiliates.
23
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3-
44
package com.example.transfer;
55

66
import org.springframework.context.annotation.Configuration;

0 commit comments

Comments
 (0)