Note:

Deploy Oracle FLEXCUBE on OKE

Introduction

Oracle FLEXCUBE Universal Banking requires several steps to be performed before having an environment up and running. Being a Java Enterprise Edition (JEE) application, it includes a minimal software base to be installed, such as database and application server. For this example, Oracle WebLogic and Oracle Database are used as part of the technical stack. To enable a full up and running system, a standard deployment would follow these steps:

1. Install Oracle Database
2. Install Oracle Weblogic Fusion Middleware Infrastructure
3. Install Oracle FLEXCUBE database artifacts
4. Install Oracle FLEXCUBE application server artifacts
5. Configure initial setup
6. Tune database
7. Tune application
8. Personalize as per business needs

An application installer does the initial steps. The process is repeatable but it’s also time consuming which means that, depending on the complexity of the environment to be created, it may take several days to deploy the system. One way of improving this process is to automate most of it and that is where containerization strategies can benefit these types of architectures.

The first 7 steps listed before can be completely automated using containers, such as Docker images and a combination of tools to maintain and manage that. The data configured in the database becomes a replicable seed artifact and the application layer is transformed into an image already tuned and stored as a master copy. Oracle Cloud Infrastructure (OCI) then provides elements to replicate at anytime, a full environment based on that master copy of the system.

Note:

Objectives

Prerequisites

Note:

Task 1: Create a WebLogic Admin Server

Let’s begin with a simple WebLogic Admin Server POD in your Kubernetes cluster.

Task 2: Obtain the database password in AES256 format

Check the FLEXCUBE database backup and obtain the database password in AES256 format.

Task 3: Execute a manual deployment with kubectl

You can deploy the FLEXCUBE (fcubs) in your OKE cluster with the kubectl command. It can be done onn your local machine if you have configured access to the OKE cluster for kubectl command tool.

Let’s understand the integrated145.yaml file

The yaml file contains a few important parameters to create the pod: includes the deployment name, recognizes the internal IP/hostname, where to pick the image from WebLogic, the jdbc connection and the encrypted database access.

yaml1.png

In the same yaml file, it is also defined the sizing expected by the pod, considering the number of resources required and up to the limit it can grow in case of increase of consumption.

yaml2.png

The ports to be exposed are also defined in the yaml file, which enables personalized security. The application can be accessed by business user, WebLogic console by administrator, web services by developers, and so on.

yaml3.png

Note: In this scenario, we have created all services in the same POD. To scale, we have to scale it all. A good way to break a monolith would be to instantiate different pods using different ports being exposed in different WebLogic servers. Consequently, the pods can be scaled independently.

As an example, a web services POD heavily used in integrations could require and use 10 cores and scale whenever needed while the application (deployed in the other pod) will require only 2 cores and have a more “constant” behavior.

This is the integrated145.yaml file:

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: flexcubeclaim
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: oci-bv
  resources:
    requests:
      storage: 500Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: integrated145-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: integrated145
  template:
    metadata:
      labels:
        app: integrated145
    spec:
      hostname: integrated145
      hostAliases:
      - ip: "127.0.0.1"
        hostnames:
        - "fcubs.oracle.com"
      containers:
      - name: integrated145
        image: gru.ocir.io/idvkxij5qkne/oraclefmw-infra:12.2.1.4.0_jdk8u281_pt34080315_apr22
        command: [ "/bin/sh", "-c"]
        args:
         [ "sleep 180; su - gsh ; cd /; yum -y install wget; wget https://objectstorage.us-ashburn-1.oraclecloud.com/p/dX80UuetlAvWOEbvQNMBv47H3ZPR-zZHJJmTsu_GQ66icfgFaPSSu_97j8q3Fyrp/n/idcci5ks1puo/b/flexcubeBucketNewVersion/o/initializeConfig.sh; yum -y install unzip; sh initializeConfig.sh jdbc:oracle:thin:@x.x.x.x:1521/prodpdb.sub0xxxxxxxxx0.arspvcn.oraclevcn.com {AES256}AgWyiXhc7aM112gNRUwBIWf5QpTpWMlI537LrIfPWjCcmwNCsynBxxg99; while true; do sleep 30; done;" ]
        ports:
        - name: port7001
          containerPort: 7001
        - name: port7002
          containerPort: 7002
        - name: port7003
          containerPort: 7003
        - name: port7004
          containerPort: 7004
        - name: port7005
          containerPort: 7005
        - name: port7006
          containerPort: 7006
        - name: port7007
          containerPort: 7007
        - name: port7008
          containerPort: 7008
        - name: port7009
          containerPort: 7009
        - name: port7010
          containerPort: 7010
        - name: port7011
          containerPort: 7011
        - name: port7012
          containerPort: 7012
        - name: port7013
          containerPort: 7013
        - name: port7014
          containerPort: 7014
        - name: port7015
          containerPort: 7015
        - name: port7016
          containerPort: 7016
        - name: port7017
          containerPort: 7017
        - name: port7018
          containerPort: 7018
        - name: port7019
          containerPort: 7019
        - name: port7020
          containerPort: 7020
        - name: port5556
          containerPort: 5556
#        livenessProbe:
#          httpGet:
#            path: /console
#            port: 7001
#          initialDelaySeconds: 3000
#          timeoutSeconds: 30
#          periodSeconds: 300
#          failureThreshold: 3
        volumeMounts:
          - name: data
            mountPath: /scratch/gsh/kernel145
            readOnly: false
        resources:
          requests:
            cpu: "5"
            memory: "36Gi"
            #ephemeral-storage: "500Gi"
          limits:
            cpu: "8"
            memory: "64Gi"
            #ephemeral-storage: "500Gi"
#      restartPolicy: Always
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: flexcubeclaim
      imagePullSecrets:
      - name: ocirsecret
---
apiVersion: v1
kind: Service
metadata:
  name: integrated145-service
  labels:
    app: integrated145
#  annotations:
#    service.beta.kubernetes.io/oci-load-balancer-internal: "true"
#    service.beta.kubernetes.io/oci-load-balancer-shape: "100Mbps"
#    service.beta.kubernetes.io/oci-load-balancer-subnet1: "ocid1.subnet.oc1.sa-saopaulo-1.aaaaaaa.........................zjyrza"
spec:
  selector:
    app: integrated145
  ports:
    - port: 7004
      targetPort: 7004
  type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
  name: integrated145-service-weblogic
  labels:
    app: integrated145
#  annotations:
#    service.beta.kubernetes.io/oci-load-balancer-internal: "true"
#    service.beta.kubernetes.io/oci-load-balancer-shape: "100Mbps"
#    service.beta.kubernetes.io/oci-load-balancer-subnet1: "ocid1.subnet.oc1.sa-saopaulo-1.aaaaaaa.........................zjyrza"
spec:
  selector:
    app: integrated145
  ports:
    - port: 7001
      targetPort: 7001
  type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
  name:  or Jenkins
  labels:
    app: integrated145
#  annotations:
#    service.beta.kubernetes.io/oci-load-balancer-internal: "true"
#    service.beta.kubernetes.io/oci-load-balancer-shape: "100Mbps"
#    service.beta.kubernetes.io/oci-load-balancer-subnet1: "ocid1.subnet.oc1.sa-saopaulo-1.aaaaaaa.........................zjyrza"
spec:
  selector:
    app: integrated145
  ports:
    - port: 7005
      targetPort: 7005
  type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
  name: integrated145-webservices2
  labels:
    app: integrated145
#  annotations:
#    service.beta.kubernetes.io/oci-load-balancer-internal: "true"
#    service.beta.kubernetes.io/oci-load-balancer-shape: "100Mbps"
#    service.beta.kubernetes.io/oci-load-balancer-subnet1: "ocid1.subnet.oc1.sa-saopaulo-1.aaaaaaa.........................zjyrza"
spec:
  selector:
    app: integrated145
  ports:
    - port: 7009
      targetPort: 7009
  type: LoadBalancer

Note: Resilience - The FLEXCUBE deployment is resilient, so if the WebLogic or FLEXCUBE falls down, the Kubernetes cluster will load and execute again. The responsible for this is the livenessprobe inside the integrated145.yaml file. Uncomment the following lines if you want to activate a check in your container.

#        livenessProbe:
#          httpGet:
#            path: /console
#            port: 7001
#          initialDelaySeconds: 3000
#          timeoutSeconds: 30
#          periodSeconds: 300
#          failureThreshold: 3
.
.
.
#      restartPolicy: Always

Let’s understand some script files

Some files are required for:

FLEXCUBE-Package.zip

This package is a zip file. It contains all the scripts necessary to configure and run the FLEXCUBE instance. The content of this package is in the scripts.zip folder. This package contains:

Note: The extra-scripts.zip folder contains some more scripts that will be useful for additional tasks. It’s not a part of the core for this tutorial.

Prepare the YAML file

In this step, you need to configure the integrated145.yaml file. This YAML file is responsible to deploy the application, the access to the application through a load-balancer and create a storage to persistence. The configuration is basically to put the database information into the YAML file.

  1. Find this line in integrated145.yaml file:

    integrated-yaml-line1

  2. Scroll and find the following line: sh initializeConfig.sh jdbc:oracle:thin:@x.x.x.x:1521/prodpdb.sub0xxxxxxxxx0.arspvcn.oraclevcn.com

  3. Change x.x.x.x:1521/prodpdb.sub0xxxxxxxxx0.arspvcn.oraclevcn.com with your DBaaS endpoint.

  4. Scroll and find the following line: {AES256}AgWyiXhc7aM112gNRUwBIWf5QpTpWMlI537LrIfPWjCcmwNCsynBxxg99

  5. Change the {AES256} value with your password generated in the previous step.

Execute the integrated145.yaml file

FLEXCUBE Application on Port 7004

flexcube-interface

SOAP Service on Port 7005

soap-service

Task 4: Automate the FLEXCUBE deployment

Let’s do this task with Visual Builder Studio. This tool is part of OCI and is similar to Jenkins. So, if you use Jenkins, you can configure CI/CD with minor adjustments.

  1. Create your Appointment for the FLEXCUBE Git project. You must configure the FLEXCUBE Git project in your Visual Builder Studio (or Jenkins) configuration.

    vbst-git-config.png

  2. Create two variables in the pipeline.

    • JDBCString: Contains the JDBC String. Example: jdbc:oracle:thin:@x.x.x.x:1521/prodpdb.sub0xxxxxxxxx0.arspvcn.oraclevcn.com

    • JDBCPassword: Contains an AES256 password format. Example: {AES256}AgWyiXhc7aM112gNRUwBIWf5QpTpWMlI537LrIfPWjCcmwNCsynBxxg99

    In Visual Builder, you can create the variables like this:

    vbst-config-parameters.png

  3. Create the following two steps in the pipeline: OCI CLI Step: Needed to create the connection with the tenant of your OKE cluster and UNIX Shell Step: Needed to execute the process of deployment.

    1. On the Job Configuration in Visual Builder Studio, click Add New and select OCICli. You need to put the OCI parameters to authorize the Visual Builder Studio to operate with your tenancy and OKE cluster.

      • User OCID
      • Finger Print: Configure access to OCI CLI and upload a public key
      • Tenancy OCID
      • Private Key: The private key pair of your uploaded public key in Fingerprint
      • Region: The region of your OKE cluster
      • Passphrase: If you have a password in your private key
    2. Click Add New and select UNIX Shell. Add this script in the box:

      #  Prepare for kubectl from OCI CLI
      mkdir -p $HOME/.kube
      oci ce cluster create-kubeconfig --cluster-id <OCID of your OKE Cluster> --file $HOME/.kube/config --region us-ashburn-1 --token-version 2.0.0
      export KUBECONFIG=$HOME/.kube/config
      # Set Variables
      export JDBCString=$JDBCString
      export JDBCPassword=$JDBCPassword
      # setup the JDBC variables in integrated145-devops.yaml
      sed -i "s~--JDBCString--~$JDBCString~g" ./files/scripts/integrated145-devops.yaml
      sed -i "s~--JDBCPassword--~$JDBCPassword~g" ./files/scripts/integrated145-devops.yaml
      # Deploy integrated145
      kubectl config view
      kubectl replace -f ./files/scripts/integrated145-devops.yaml --force
      
      

      Note: Obtain the OKE OCID in your tenant and add the line “oci ce cluster…”. The integrated145-devops.yaml file is similar to the integrated145.yaml file, but prepared for the CI/CD.

      In Visual Builder Studio, the following details are displayed:

      vbst-steps-config.png

  4. Start your pipeline and wait for the deployment. You can list the services available with the following command:

    kubectl get svc

    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
    integrated145-service LoadBalancer 10.x.x.x 210.x.x.x 7004:30868/TCP 200d
    integrated145-service-weblogic LoadBalancer 10.x.x.x 210.x.x.x 7001:32071/TCP 200d
    integrated145-webservices LoadBalancer 10.x.x.x 210.x.x.x 7005:30415/TCP 200d
    integrated145-webservices2 LoadBalancer 10.x.x.x 210.x.x.x 7009:30759/TCP 200d

Task 5: Update database tables to configure your FLEXCUBE instance

Task 6: Delete the FLEXCUBE deployment

Acknowledgments

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.