Skip to content

Commit

Permalink
Cloudbank v1.0.1 (#27)
Browse files Browse the repository at this point in the history
* added fix for SIDB template

* Updated XE to FREE
  • Loading branch information
aberinnj authored Sep 6, 2023
1 parent 72a17bd commit 4b4747c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cloudbank/backend-springboot/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export localbankqueuename="BANKAQUEUE"
export localbankqueueschema="aquser"
export banksubscribername="banka_service"
export bankdbuser="bankauser"
export bankdburl="jdbc:oracle:thin:@//$(kubectl get singleinstancedatabase cbtransfer01 -o jsonpath='{.status.pdbConnectString}')"
export bankdburl="jdbc:oracle:thin:@//$(kubectl -n cloudbank get singleinstancedatabase cbtransfer01 -o jsonpath='{.status.pdbConnectString}')"
export bankdbpw="$(state_get .lab.fixed_demo_user_credential)"
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class TransferController {
final String bankdbuser = System.getenv("bankdbuser");
final String bankdbpw = System.getenv("bankdbpw");
final String bankdburl = System.getenv("bankdburl");
// bankdburl example: "jdbc:oracle:thin:@//<ip_address>:1521/XEPDB1";
// bankdburl example: "jdbc:oracle:thin:@//<ip_address>:1521/FREEPDB1";

//transfer id is currently just the currentTimeMillis and not persisted
private Map<String, TransferInformation> transferLedger = new HashMap<>();
Expand Down
16 changes: 9 additions & 7 deletions cloudbank/kubernetes/sidb-create-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,25 @@ metadata:
spec:

## DB edition
edition: express
edition: free
## Use only alphanumeric characters for sid
sid: FREE

## Secret containing SIDB password mapped to secretKey
adminPassword:
secretName: %SIDB_ADMIN_PWD_SECRET%

## Database Image
image:
pullFrom: container-registry.oracle.com/database/express:latest
prebuiltDB: true
pullFrom: container-registry.oracle.com/database/free:latest
prebuiltDB: false

## Persistence is optional for prebuilt DB image
## if specified, the prebuilt DB datafiles are copied over to the persistant volume before DB startup
#persistence:
# size: 50Gi
# storageClass: "oci-bv"
# accessMode: "ReadWriteOnce"
persistence:
size: 50Gi
storageClass: "oci-bv"
accessMode: "ReadWriteOnce"

## Count of Database Pods.
replicas: 1
4 changes: 2 additions & 2 deletions cloudbank/sql/configure-sidb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

database=$1
password=$2
connection='XEPDB1'
connection='FREEPDB1'

{
echo "alter session set container=XEPDB1;"
echo "alter session set container=FREEPDB1;"
echo "connect sys/$password@$connection as sysdba"
cat AdminCreateUsers-SIDBXE.sql
echo "conn aquser/$password@$connection"
Expand Down

0 comments on commit 4b4747c

Please sign in to comment.