Skip to content

Commit 4b0189f

Browse files
committed
Merge branch 'AbhiK_minikube_persistence' into 'master'
Readme changes regarding minikube persistence See merge request rac-docker-dev/oracle-database-operator!206
2 parents f7f1aa1 + f3ea2d9 commit 4b0189f

8 files changed

+35
-8
lines changed

config/samples/sidb/oraclerestdataservice.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ spec:
5454
## volumeName is optional. Specify for binding to a specific PV and set storageClass to an empty string to disable automatic volume provisioning
5555
# persistence:
5656
# size: 50Gi
57-
## oci-bv applies to OCI block volumes. Update as appropriate for other cloud service providers
57+
## oci-bv applies to OCI block volumes. Use "standard" storageClass for dynamic provisioning in Minikube. Update as appropriate for other cloud service providers
5858
# storageClass: "oci-bv"
5959
# accessMode: "ReadWriteOnce"
6060
# volumeName: ""

config/samples/sidb/singleinstancedatabase.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ spec:
7171
## volumeName is optional. Specify for binding to a specific PV and set storageClass to an empty string to disable automatic volume provisioning
7272
persistence:
7373
size: 100Gi
74-
## oci-bv applies to OCI block volumes. Update as appropriate for other cloud service providers
74+
## oci-bv applies to OCI block volumes. Use "standard" storageClass for dynamic provisioning in Minikube. Update as appropriate for other cloud service providers
7575
storageClass: "oci-bv"
7676
accessMode: "ReadWriteOnce"
7777
volumeName: ""

config/samples/sidb/singleinstancedatabase_clone.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ spec:
3535
## accessMode can only accept one of ReadWriteOnce, ReadWriteMany
3636
persistence:
3737
size: 100Gi
38-
## oci-bv applies to OCI block volumes. Update as appropriate for other cloud service providers
38+
## oci-bv applies to OCI block volumes. Use "standard" storageClass for dynamic provisioning in Minikube. Update as appropriate for other cloud service providers
3939
storageClass: "oci-bv"
4040
accessMode: "ReadWriteOnce"
4141

config/samples/sidb/singleinstancedatabase_create.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ spec:
5353
## accessMode can only accept one of ReadWriteOnce, ReadWriteMany
5454
persistence:
5555
size: 100Gi
56-
## oci-bv applies to OCI block volumes. Update as appropriate for other cloud service providers
56+
## oci-bv applies to OCI block volumes. Use "standard" storageClass for dynamic provisioning in Minikube. Update as appropriate for other cloud service providers
5757
storageClass: "oci-bv"
5858
accessMode: "ReadWriteOnce"
5959

config/samples/sidb/singleinstancedatabase_express.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ spec:
4242
## accessMode can only accept one of ReadWriteOnce, ReadWriteMany
4343
persistence:
4444
size: 50Gi
45-
## oci-bv applies to OCI block volumes. Update as appropriate for other cloud service providers
45+
## oci-bv applies to OCI block volumes. Use "standard" storageClass for dynamic provisioning in Minikube. Update as appropriate for other cloud service providers
4646
storageClass: "oci-bv"
4747
accessMode: "ReadWriteOnce"
4848

config/samples/sidb/singleinstancedatabase_patch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
## accessMode can only accept one of ReadWriteOnce, ReadWriteMany
4444
persistence:
4545
size: 100Gi
46-
## oci-bv applies to OCI block volumes. Update as appropriate for other cloud service providers
46+
## oci-bv applies to OCI block volumes. Use "standard" storageClass for dynamic provisioning in Minikube. Update as appropriate for other cloud service providers
4747
storageClass: "oci-bv"
4848
accessMode: "ReadWriteOnce"
4949

docs/sidb/PREREQUISITES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@ To deploy Oracle Database Operator for Kubernetes on Oracle Docker images, compl
1717

1818
More info on creating persistent volumes available at [https://kubernetes.io/docs/concepts/storage/persistent-volumes/](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
1919

20+
* ### Minikube Cluster Environment
21+
22+
By default, Minikube creates a node with 2GB RAM, 2 CPUs, and 20GB disk space when a cluster is created using `minikube start` command. However, these resources (particularly disk space and RAM) may not be sufficient for running and managing Oracle Database using the OraOperator. It is recommended to have larger RAM and disk space for better performance. For example, the following command creates a Minikube cluster with 6GB RAM and 50GB disk space for the Minikube VM:
23+
24+
```
25+
minikube start --memory=6g --disk-size=50g
26+
```
27+

docs/sidb/README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,31 @@ The database persistence can be achieved in the following two ways:
255255
#### Dynamic Persistence
256256
In **Dynamic Persistence Provisioning**, a persistent volume is provisioned by mentioning a storage class. For example, **oci-bv** storage class is specified in the **[singleinstancedatabase_create.yaml](../../config/samples/sidb/singleinstancedatabase_create.yaml)** file. This storage class facilitates dynamic provisioning of the OCI block volumes. The supported access mode for this class is `ReadWriteOnce`. For other cloud providers, you can similarly use their dynamic provisioning storage classes.
257257

258-
**Note:** Generally, the `Reclaim Policy` of such dynamically provisioned volumes is `Delete`. These volumes are deleted when their corresponding database deployment is deleted. To retain volumes, use static provisioning, as explained in the Block Volume Static Provisioning section.
258+
**Note:**
259+
- Generally, the `Reclaim Policy` of such dynamically provisioned volumes is `Delete`. These volumes are deleted when their corresponding database deployment is deleted. To retain volumes, use static provisioning, as explained in the Block Volume Static Provisioning section.
260+
- In **Minikube**, the dynamic persistence provisioning class is **standard**.
259261

260262
#### Static Persistence
261263
In **Static Persistence Provisioning**, you have to create a volume manually (either using Block Volume or NFS), and then use the name of this volume with the `<.spec.persistence.volumeName>` field (corresponds to the `volumeName` field of the persistence section in the **[singleinstancedatabase.yaml](../../config/samples/sidb/singleinstancedatabase.yaml)**). The `Reclaim Policy` of such volume can be set to `Retain`. So, this volume does not get deleted with the deletion of its corresponding deployment. The access modes supported with block volume and NFS are `ReadWriteOnce` and `ReadWriteMany` respectively.
264+
**Note:**
265+
In **Minikube**, a persistent volume can be provisioned using the sample yaml file below:
266+
```yaml
267+
apiVersion: v1
268+
kind: PersistentVolume
269+
metadata:
270+
name: db-vol
271+
spec:
272+
capacity:
273+
storage: 10Gi
274+
accessModes:
275+
- ReadWriteMany
276+
persistentVolumeReclaimPolicy: Retain
277+
hostPath:
278+
path: <host-path-for-pv>
279+
```
280+
Further, the volume name (i.e. db-vol) can be mentioned in the `volumeName` field of the **[singleinstancedatabase.yaml](../../config/samples/sidb/singleinstancedatabase.yaml)**. `storageClass` field is not required in this case, and can be left empty.
262281

263-
Static Persistence Provisioning in OCI is explained in the following subsections:
282+
Static Persistence Provisioning in Oracle Cloud Infrastructure (OCI) is explained in the following subsections:
264283

265284
##### Block Volume Static Provisioning
266285
With block volume static provisioning, you must manually create a block volume resource from the OCI console, and fetch its `OCID`. To create the persistent volume, you can use the following YAML file:

0 commit comments

Comments
 (0)