Blog Post

Availability
6 MIN READ

Containerising Oracle with InfoScale in a Red Hat OpenShift environment

Anthony_Sunny's avatar
3 years ago

Containers are rapidly becoming a mainstream solution for building and running IT services that help businesses reduce management overhead and focus on delivering innovations. Containers provide excellent application portability and standardize resources required by the applications thus improving efficiencies. However, containers and container orchestration engines like Kubernetes and OpenShift do not natively provide all the functionalities that stateful applications running in containers need.  Are you considering a micro-service architecture for your mission-critical applications? If so, you need Veritas InfoScale!

Veritas provides enterprise data services focused on data management and protection. These services have now been extended to support your containerized applications. With Veritas, you can manage your containerized IT services confidently with the added functionalities that Kubernetes and OpenShift environments need to be enterprise-ready. Some of the key InfoScale provides:

  • Storage and availability management for stateful applications ranging from low-impact to mission-critical.
  • A software-defined architecture that can improve application performance, reduce costs, and automate key operational processes.

Persistent storage for containers powered by InfoScale can be one of two types: - shared and flexible non-shared.

Shared Storage: Consider this as a volume/store where multiple Containers perform both read and write operations on the same data. Useful for applications like web servers that need to access the same data from multiple container instances. In this deployment use-case, storage is shared across OpenShift Worker nodes.

Flexible (DAS) storage: InfoScale’s Flexible Storage Sharing feature (FSS) allows pooling and sharing of storage resources among various compute entities regardless of whether they are physical machines or  virtual machines.

InfoScale takes FSS to the next level by providing the ability to isolate and provision the required amount of storage with the desired characteristics to the compute entities where an application is running, thus improving the scalability of the cluster. Some of the key benefits are:

  1. Improved view of the storage in a large cluster
  2. Simplified storage provisioning
  3. Easier device management

This blog provides an overview of a containerized Oracle database running in OpenShift using InfoScale FSS.

InfoScale for Containers

Veritas InfoScale™—A software-defined optimization solution for mission-critical applications that abstracts applications from their underlying hardware and software resources. That abstraction enables enterprise-grade optimizations around business continuity, performance, and infrastructure agility across physical, virtual, cloud and now containerized environments. InfoScale provides advanced software-defined storage and availability management for applications running in containers in Docker environments, standard Kubernetes environments and the Red Hat OpenShift Container Platform (OCP).

To learn more about InfoScale and containers, visit our website: https://www.veritas.com/availability/infoscale

The InfoScale Enterprise extension to the Oracle Disk Manager (ODM) enables Online Transaction Processing performance equal to raw disk partitions. It delivers the same performance benefits as Quick I/O, but also provides tight database integration for easier manageability.

InfoScale for OpenShift

As OpenShift offers consistent security, default automation, and compatibility with all deployment use-cases like bare-metal, VMware, major cloud platforms, it is an excellent containerization platform that also provides an intuitive and friendly user experience. InfoScale helps minimize risks and mitigates single points of failure in OpenShift environments, to keep your applications up and running all the time.

InfoScale provides advanced storage management and availability for applications running in an OpenShift environment:

  • Advanced Storage Management –.  InfoScale’s advanced Cluster File System (CFS) with Flexible Storage Sharing (FSS) can eliminate the need for shared SAN storage and provides improved performance at a reduced cost compared to traditional SAN environments.  InfoScale provides Software-defined persistent storage for containers with features like non-disruptive scaling, migration, and high performance by leveraging preferably Direct Attached Storage and SAN on deployment use-cases. 
  • Application Availability – InfoScale protects against host failures, hardware failures, OS crashes, and application failures using majority-based fencing. In the event of a communication loss between cluster nodes, InfoScale’s fencing driver works with Kubernetes to mark the node as failed, move the pods to another node and bring the pods back online.  Infoscale gurantees that the applications pods running on unreachable nodes cannot access the persistent storage , and the pod can be restarted on the active cluster.  InfoScale’s fencing controller can manage storage/node fencing before Kubernetes can safely move the pods from a fenced out node to another node in the active cluster.

InfoScale is also containerized and runs on each worker node running on virtual machines or bare metal in OpenShift to provide both application-aware and infrastructure level high availability and resiliency.   Take a look at this picture for an example of how InfoScale works in an OpenShift environment:

Figure 1. Using InfoScale Persistent Storage  for VxODM enabled Oracle DatabaseUsing InfoScale in OpenShift Environments

InfoScale for containers is designed using open standards (CSI) and utilizes native constructs to run seamlessly with OpenShift or K8s. System overhead is avoided, and application downtime and the risk of data corruption is reduced. 

As an enterprise storage software-defined solution, InfoScale provides excellent flexibility to support many different highly available application deployment architectures. Several configuration options are supported using InfoScale in Kubernetes and OpenShift.

The Oracle Image does not work directly with ODM due to a known defect. Oracle has released a patch to fix this defect. However, the fix is not included in the container image. Therefore, a new container image which includes this fix is needed.

The instructions to build a new image with the fix incorporated are provided by oracle here.

To configure Oracle as deployment.apps with Veritas Oracle Disk Manager (VxODM), the following procedure can be used.  These details can be used in the spec section of Oracle Database deployment yamls.

Data Volume

The Oracle Container image requires the data volume to be mounted at the path /opt/oracle/oradata. This volume also needs to be writable by the "oracle" (uid: 54321) user inside the container. 

The Veritas VxFS data volume must be mounted at this path. To handle the permissions issue, the following initContainer can be used.

initContainers:

 

- name: fix-volume-permission
  image: ubuntu
  command:
  - sh
  - -c
  - mkdir -p /opt/oracle/oradata && chown -R 54321:54321 /opt/oracle/oradata && chmod 0700 /opt/oracle/oradata
  volumeMounts:
  - name: <vxfs volume>
  mountPath: /opt/oracle/oradata
  readOnly: false

 

Disable DNFS

DNFS needs to be disabled for ODM, and this is done by adding the following arg to the oracle container.

 

args:
- sh
- -c
- cd /opt/oracle/product/19c/dbhome_1/rdbms/lib/ && make -f ins_rdbms.mk dnfs_off && cd $WORKDIR && $ORACLE_BASE/$RUN_FILE

 

/dev/odm

ODM requires the /dev/odm mountpoint to be available inside the Oracle container. This is facilitated by bind mounting the mountpoint from the host. This is done by creating a hostpath volume devodm in the yaml, and mounting it at the path /dev/odm.

On selinux enabled systems (this includes OpenShift setups), bind mounting /dev/odm requires the Oracle container to run as privileged.

libodm.so

The Veritas provided libodm.so file needs to be loaded by the Oracle application inside the container for ODM to work correctly. This can be done using the following steps.

 

# Copy the libodm.so file
$ oc cp  <infoscale pod name>:/opt/VRTSodm/lib64/libodm.so . -n infoscale-vtas

# Create a configmap from this file

$ oc create configmap libodm --from-file libodm.so

# Now in the pod's yaml use this configmap as a volume.

- name: libodm-cmapvol
  mountPath: /opt/oracle/product/19c/dbhome_1/rdbms/lib/odm/libodm.so
  subPath: libodm.so

volumes:
- name: libodm-cmapvol
  configMap:
    name: libodm
    items:
    - key: libodm.so
      path: libodm.so

 

Once the Oracle database-specific yaml is ready for the creation of the application, run the following command to create deployment.apps.

 

[root@ocp-svc deployment_yamls]# oc create -f  <deployment.apps>.yaml

deployment.apps/oracle-odm created

service/ora-listener created

[root@ocp-svc deployment_yamls]# oc get pods

NAME                          READY   STATUS     RESTARTS   AGE

oracle-odm-687c48d459-n76ng   0/1     Init:0/1   0          5s

 

Log messages of the Oracle pod will show the progress and details of the database creation.

When the Oracle database is linked to Veritas ODM, alert logs show the messages below which can be a reconfirmation of the procedure.

As InfoScale is running as containers in pods hosted on the worker nodes, and the worker nodes are VMs running in a vSphere environment, no additional installation and configuration beyond what is indicated in the  Veritas InfoScale™ 8.0 Support for Containers - Linux guide is required to deploy Veritas InfoScale in an OpenShift environment.

See  Veritas InfoScale™ 8.0 Support for Containers - Linux for full documentation on how to deploy Veritas InfoScale in an OpenShift environment

Summary

InfoScale is a proven solution for enterprise storage management provider managing infrastructure availability.  InfoScale has evolved to become a premier solution for software-defined storage and high availability for Kubernetes., InfoScale can provide several benefits not available natively with K8s and OpenShift that provide the functionality and confidence needed to use OpenShift as a target environment for applications with the most demanding performance and uptime requirements.

You can also find additional InfoScale information and resources in the InfoScale technical library

Updated 3 years ago
Version 1.0
No CommentsBe the first to comment