Skip to content

Commit 6834e1b

Browse files
authored
Cloudbank v4 updates (#973)
* Updates
1 parent f2d1d71 commit 6834e1b

File tree

13 files changed

+582
-90
lines changed

13 files changed

+582
-90
lines changed

cloudbank-v4/README.md

Lines changed: 65 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,23 @@ To run Cloud Bank you need OBaaS version 1.3.0 [Oracle Backend for Microservices
2727
Output should look similar to this:
2828

2929
```text
30-
[INFO] ------------------------------------------------------------------------
31-
[INFO] Reactor Summary for CloudBank 0.0.1-SNAPSHOT:
32-
[INFO]
33-
[INFO] CloudBank .......................................... SUCCESS [ 0.950 s]
34-
[INFO] account ............................................ SUCCESS [ 2.904 s]
35-
[INFO] checks ............................................. SUCCESS [ 1.168 s]
36-
[INFO] customer ........................................... SUCCESS [ 1.198 s]
37-
[INFO] creditscore ........................................ SUCCESS [ 0.956 s]
38-
[INFO] transfer ........................................... SUCCESS [ 0.463 s]
39-
[INFO] testrunner ......................................... SUCCESS [ 1.009 s]
40-
[INFO] ------------------------------------------------------------------------
41-
[INFO] BUILD SUCCESS
42-
[INFO] ------------------------------------------------------------------------
43-
[INFO] Total time: 9.437 s
44-
[INFO] Finished at: 2024-08-30T10:57:14-05:00]
45-
[INFO] ------------------------------------------------------------------------
30+
[INFO] ------------------------------------------------------------------------
31+
[INFO] Reactor Summary for CloudBank 0.0.1-SNAPSHOT:
32+
[INFO]
33+
[INFO] CloudBank .......................................... SUCCESS [ 0.975 s]
34+
[INFO] account ............................................ SUCCESS [ 3.489 s]
35+
[INFO] chatbot ............................................ SUCCESS [ 0.995 s]
36+
[INFO] checks ............................................. SUCCESS [ 1.518 s]
37+
[INFO] customer ........................................... SUCCESS [ 1.410 s]
38+
[INFO] creditscore ........................................ SUCCESS [ 1.170 s]
39+
[INFO] transfer ........................................... SUCCESS [ 0.623 s]
40+
[INFO] testrunner ......................................... SUCCESS [ 1.220 s]
41+
[INFO] ------------------------------------------------------------------------
42+
[INFO] BUILD SUCCESS
43+
[INFO] ------------------------------------------------------------------------
44+
[INFO] Total time: 11.817 s
45+
[INFO] Finished at: 2024-10-10T13:49:51-05:00
46+
[INFO] ------------------------------------------------------------------------
4647
```
4748

4849
## Establish connection with OBaaS Admin service
@@ -67,22 +68,22 @@ To run Cloud Bank you need OBaaS version 1.3.0 [Oracle Backend for Microservices
6768
\_/ |_) (_| (_| __) \_ |_ _|_
6869
========================================================================================
6970
Application Name: Oracle Backend Platform :: Command Line Interface
70-
Application Version: (1.3.0)
71+
Application Version: (1.3.1)
7172
:: Spring Boot (v3.3.3) ::
7273
7374
Ask for help:
7475
- Slack: https://oracledevs.slack.com/archives/C06L9CDGR6Z
7576
- email: obaas_ww@oracle.com
7677
77-
oractl:>connect
78+
oractl:>init connect
7879
? username obaas-admin
7980
? password *************
8081
obaas-admin -> Welcome!
8182
```
8283
8384
## Deploy CloudBank
8485
85-
CloudBank can be deployed using the `--script` command in `oractl`. CloudBank will be deployed in the namespace `application`. You are going to be asked for passwords when the `bind` command executes.
86+
CloudBank can be deployed using the `--script` command in `oractl`. CloudBank will be deployed in the namespace `application`. You are going to be asked for passwords when the `bind` command executes. **NOTE:** This will *NOT* deploy the chatbot service as it's an optional infrastructure deployment.
8687
8788
```text
8889
oractl:>script --file deploy-cmds/deploy-cb-java21.txt
@@ -152,6 +153,51 @@ deploy --service-name testrunner --artifact-path testrunner/target/testrunner-0.
152153
deploy --service-name transfer --artifact-path transfer/target/transfer-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
153154
```
154155
156+
## Deploy **optional** Chatbot
157+
158+
If you have deployed OBaas with a GPU cluster and installed Ollama on the GPU cluster [Install Ollama](https://oracle.github.io/microservices-datadriven/cloudbank/springai/simple-chat/index.html) you can deploy the `chatbot` service.
159+
160+
> Note if you already have a running session with `oractl` you can skip step 1-3.
161+
162+
1. Start the tunnel
163+
164+
```shell
165+
kubectl port-forward -n obaas-admin svc/obaas-admin 8080
166+
```
167+
168+
1. Get the password for the `obaas-admin` user
169+
170+
```shell
171+
kubectl get secret -n azn-server oractl-passwords -o jsonpath='{.data.admin}' | base64 -d
172+
```
173+
174+
1. Start `oractl` from the `cloudbank-v4` directory and login as the `obaas-admin` user.
175+
176+
1. Run the following command in `oractl`:
177+
178+
```shell
179+
deploy --service-name chatbot --artifact-path chatbot/target/chatbot-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
180+
```
181+
182+
1. Start a tunnel to the `chatbot` application
183+
184+
```shell
185+
kubectl -n application port-forward svc/chatbot 7575:8080
186+
```
187+
188+
1. Test the `chatbot` application.
189+
190+
```shell
191+
curl -X POST -d 'what is spring boot?' http://localhost:7575/chat
192+
```
193+
The command should return something similar to this:
194+
195+
```text
196+
A popular question!
197+
198+
Spring Boot is an open-source Java-based framework that provides a simple and efficient wait to build web applications, RESTful APIs, and microservices. It's built on top of the Spring Framework, but with a more streamlined and opinionated approach.
199+
```
200+
155201
## Create APISIX Routes
156202
157203
1. Get APISIX Gateway Admin Key

0 commit comments

Comments
 (0)