You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normal Database Pending 35m (x2 over 35m) SingleInstanceDatabase Waitingfor database pod to be ready
109
-
Normal Database Creating 27m (x24 over 34m) SingleInstanceDatabase Waitingfor database to be ready
108
+
Normal Database Pending 35m (x2 over 35m) SingleInstanceDatabase waitingfor database pod to be ready
109
+
Normal Database Creating 27m (x24 over 34m) SingleInstanceDatabase waitingfor database to be ready
110
110
Normal Database Ready 22m SingleInstanceDatabase database open on pod sidb-sample-clone-133ol scheduled on node 10.0.10.6
111
111
Normal Datapatch Pending 21m SingleInstanceDatabase datapatch execution pending
112
112
Normal Datapatch Executing 20m SingleInstanceDatabase datapatch begin execution
113
-
Normal Datapatch Done 8s SingleInstanceDatabase Datapatch from 19.3.0.0.0 to 19.11.0.0.0 : SUCCESS
113
+
Normal Datapatch Done 8s SingleInstanceDatabase datafiles patched from 19.3.0.0.0 to 19.11.0.0.0 : SUCCESS
114
114
115
115
```
116
116
117
117
## Provision New Database
118
118
119
-
You can easily provision a new database instance on the Kubernetes cluster by using**[config/samples/sidb/singleinstancedatabase_create.yaml](../../config/samples/sidb/singleinstancedatabase_create.yaml)**.
119
+
To provision a new database instance on the Kubernetes cluster, use the sample**[config/samples/sidb/singleinstancedatabase_create.yaml](../../config/samples/sidb/singleinstancedatabase_create.yaml)**.
120
120
121
121
1. Log into [Oracle Container Registry](https://container-registry.oracle.com/) and accept the license agreement for the Database image, ignore if you have accepted already.
122
122
@@ -152,7 +152,7 @@ The database persistence can be achieved in the following two ways:
152
152
- Dynamic Persistence Provisioning
153
153
- Static Persistence Provisioning
154
154
155
-
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.
155
+
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.
156
156
**Note:** Generally, the `Reclaim Policy` of such dynamically provisioned volumes is `Delete`, hence, these volumes get deleted when their corresponding database deployment is deleted. To retain volumes, please use static provisioning as explained in the section below.
157
157
158
158
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.
@@ -176,6 +176,15 @@ spec:
176
176
driver: blockvolume.csi.oraclecloud.com
177
177
volumeHandle: <OCID of the block volume>
178
178
```
179
+
180
+
**Note:** OCI block volumes are AD (Availability Domain) specific. Please make sure that the database is deployed in the same AD as that of its statically provisioned block volume. This is handled automatically in dynamic provisioning.
181
+
To provision the database in a specific AD, please uncomment the following line from the **[singleinstancedatabase.yaml](../../config/samples/sidb/singleinstancedatabase.yaml)** file:
182
+
183
+
```yaml
184
+
nodeSelector:
185
+
topology.kubernetes.io/zone: PHX-AD-1
186
+
```
187
+
179
188
#### NFS Volume Static Provisioning
180
189
Similar to the block volume static provisioning, you have to manually create a file system resource from the OCI console, and fetch its `OCID, Mount Target and Export Path`. Mention these values in the following YAML file to create the persistent volume:
181
190
@@ -195,6 +204,9 @@ spec:
195
204
driver: fss.csi.oraclecloud.com
196
205
volumeHandle: "<OCID of the file system>:<Mount Target>/<Export Path>"
197
206
```
207
+
208
+
**Note:** Whenever a mount target is provisioned in OCI, its `Reported Size (GiB)` values are very large. This is visible on the mount target page when logged in to the OCI console. Some applications will fail to install if the results of a space requirements check show too much available disk space. So please specify, in gibibytes (GiB), the maximum capacity reported by file systems exported through this mount target. This setting does not limit the actual amount of data you can store.
209
+
198
210
### Provision a Pre-built Database
199
211
200
212
To provision a new pre-built database instance, use the sample **[config/samples/sidb/singleinstancedatabase_prebuiltdb.yaml](../../config/samples/sidb/singleinstancedatabase_prebuiltdb.yaml)** file. For example:
@@ -280,7 +292,7 @@ The following database parameters can be updated after the database is created:
280
292
- `forceLog`
281
293
282
294
To change these parameters, change their attribute values, and apply the change by using the
283
-
`kubectl``apply` or `edit`/`patch` commands.
295
+
`kubectlapply` or `kubectl edit/patch` commands.
284
296
285
297
**Caution**: Enable `archiveLog` mode before setting `flashback` to `ON`, and set`flashback` to `OFF` before disabling `archiveLog` mode.
286
298
@@ -311,14 +323,16 @@ The following database initialization parameters can be updated after the databa
311
323
- cpuCount
312
324
- processes.
313
325
314
-
Change their attribute values and apply using kubectl **apply** or **edit/patch** commands.
326
+
Change their attribute values and apply using `kubectl apply` or `kubectl edit/patch` commands.
315
327
316
328
**NOTE:**
317
329
The value forthe initialization parameter `sgaTarget` that you provide should be within the range set by [sga_min_size, sga_max_size]. If the value you provide is notin that range, then`sga_target` is not updated to the value you specify for`sgaTarget`.
318
330
319
331
### Multiple Replicas
320
332
321
-
In multiple replicas mode, more than one pod is created forthe database. The database is open and mounted by one of the replica pods. Other replica pods have instances started but not mounted, and serve to provide a quick cold fail-overincase the active pod goes down. To enable multiple replicas, Update the replica attribute in the `.yaml`, and apply by using the `kubectl apply` or `edit/patch` commands.
333
+
In multiple replicas mode, more than one pod is created forthe database. The database is open and mounted by one of the replica pods. Other replica pods have instances started but not mounted, and serve to provide a quick cold fail-overincase the active pod goes down. Multiple replicas are also helpful in [patching](#patch-existing-database) operation. Please ensure that you have multiple replicas of the database pods running before you start the patching operation for minimum downtime.
334
+
335
+
To enable multiple replicas, update the replica attribute in the `.yaml`, and apply by using the `kubectl apply` or `kubectl scale` commands.
322
336
323
337
**Note:**
324
338
- This functionality requires the [k8s extension](https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance/extensions/k8s) extended images. The database image from the container registry `container-registry.oracle.com` includes the K8s extension.
0 commit comments