Skip to main content
Version: 7.2405.x.x LTS

Prepare Oracle Volume

Due to legal reasons, the Oracle driver and slqplus client cannot be shipped with the components themselves. To make use of the automatic migration provided by the Managed Database pattern, a Kubernetes persistent volume has to be prepared in the namespace of the used component that contains these dependencies. This is currently only supported for nevisIDM.

This is done by applying the following yaml, which creates a persistent volume, and a job that downloads the needed dependencies from Oracle.

oracle-volume.yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: oracle-volume
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
storageClassName: azurefile
volumeMode: Filesystem
---
apiVersion: batch/v1
kind: Job
metadata:
name: prepare-oracle
spec:
backoffLimit: 1
completions: 1
parallelism: 1
template:
spec:
securityContext:
fsGroup: 1001
volumes:
- name: oracle-volume
persistentVolumeClaim:
claimName: oracle-volume
containers:
- command: ["/bin/sh", "-c"]
args:
- mkdir -p /tmp/oracle;
curl --fail https://download.oracle.com/otn_software/linux/instantclient/1915000/instantclient-basiclite-linux.x64-19.15.0.0.0dbru-2.zip -o /tmp/oracle/basic.zip;
curl --fail https://download.oracle.com/otn_software/linux/instantclient/1915000/instantclient-sqlplus-linux.x64-19.15.0.0.0dbru-2.zip -o /tmp/oracle/sqlplus.zip;
unzip -o -d `dirname /tmp/oracle/basic.zip` /tmp/oracle/basic.zip;
unzip -o -d `dirname /tmp/oracle/sqlplus.zip` /tmp/oracle/sqlplus.zip;
cp -dR /tmp/oracle/instantclient_19_15/* /var/opt/oracle/;
volumeMounts:
- mountPath: "/var/opt/oracle"
name: oracle-volume
image: <registry>/nevis/nevis-ubi-tools:1.3.0
imagePullPolicy: Always
name: schema-init
resources:
limits:
cpu: "1"
memory: 1000Mi
requests:
cpu: 20m
memory: 200Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
kubeclt apply -f oracle-volume.yaml -n <component-namespace>

Replace <registry> with the used registry and azurefile with a different StorageClass that supports the ReadWriteMany access mode such as longhorn or nfs in case azurefile is not available on the cluster.