Skip to content

Commit 5a47b23

Browse files
committed
Merge branch 'cleanup-persistent-storage-and-README' of orahub.oci.oraclecorp.com:weblogic-cloud/weblogic-kubernetes-operator into cleanup-persistent-storage-and-README
2 parents 7365e72 + 32b635f commit 5a47b23

File tree

4 files changed

+35
-36
lines changed

4 files changed

+35
-36
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
+++
2-
title = "Persistent Storage"
2+
title = "Persistent storage"
33
date = 2019-02-23T16:45:09-05:00
44
weight = 7.5
55
pre = "<b> </b>"
66
description = "Use a Kubernetes PersistentVolume (PV) and PersistentVolumeClaim (PVC) to store WebLogic domain homes and log files."
77
+++
88

9-
This section provides general information about setting up Persistent storage, which can be used for the WebLogic domain homes and log files.
9+
This section provides general information about setting up persistent storage, which can be used for WebLogic domain homes and log files.
1010

1111
{{% children style="h4" description="true" %}}

documentation/site/content/managing-domains/persistent-storage/oci-fss-pv.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,27 @@ an update to properly initialize the file ownership on the persistent volume
1111
when the domain is initially created."
1212
---
1313

14-
#### References
15-
16-
- [Provisioning PVCs on the File Storage Service (FSS)](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingpersistentvolumeclaim_Provisioning_PVCs_on_FSS.htm#Provisioning_Persistent_Volume_Claims_on_the_FileStorageService) in the OCI documentation.
17-
- [Setting up storage for kubernetes clusters](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingpersistentvolumeclaim.htm) in the OCI documentation.
18-
1914
Oracle recommends using Oracle Cloud Infrastructure File Storage (FSS) for persistent volumes to store
2015
the WebLogic domain home or log files when running the Kubernetes cluster on Oracle Container Engine
2116
for Kubernetes (OKE). When using the FSS with OKE for domain home or log files, the file system
22-
handling will require an update to properly initialize the file ownership on the persistent volume
17+
handling will require an update to properly initialize the file ownership on the persistent volume
2318
when the domain is initially created.
2419

2520
{{% notice note %}}
2621
File permission handling on persistent volumes can differ between
2722
cloud providers and even with the underlying storage handling on
28-
Linux-based systems.
23+
Linux-based systems.
2924
The operator requires permission to create directories on the persistent volume under the shared mount path.
3025
The following instructions provide an option to update the file ownership and permissions.
3126
{{% /notice %}}
3227

3328

34-
#### Updating the permissions of shared directory on Persistent storage
35-
The operator provides a utility script `pv-pvc-helper.sh` as part of the lifecycle scripts to change the ownership and permissions of the shared directory on the Persistent storage.
29+
#### Updating the permissions of shared directory on persistent storage
30+
The operator provides a utility script, `pv-pvc-helper.sh`, as part of the lifecycle scripts to change the ownership and permissions of the shared directory on the persistent storage.
3631

37-
This script launches a Pod and mounts the specified PVC in the Pod containers at the specified mount path. You can then exec in the Pod and manually change the permissions or ownership.
32+
This script launches a Pod and mounts the specified PVC in the Pod containers at the specified mount path. You can then `exec` in the Pod and manually change the permissions or ownership.
3833

39-
See the `pv-pvc-helper.sh` in `Examine, change permissions or delete PV contents` section in the [README](https://github.com/oracle/weblogic-kubernetes-operator/tree/{{< latestMinorVersion >}}/kubernetes/samples/scripts/domain-lifecycle/README.md) file for the script details.
34+
See the `pv-pvc-helper.sh` in "Examine, change permissions or delete PV contents" section in the [README](https://github.com/oracle/weblogic-kubernetes-operator/tree/{{< latestMinorVersion >}}/kubernetes/samples/scripts/domain-lifecycle/README.md) file for the script details.
4035

4136
For example, run the following command to create the Pod.
4237

@@ -67,13 +62,18 @@ spec:
6762
claimName: wko-domain-on-pv-pvc
6863
```
6964

70-
Run the following command to exec into the Pod.
65+
Run the following command to `exec` into the Pod.
7166
```
7267
$ kubectl -n sample-domain1-ns exec -it pvhelper -- /bin/sh
7368
```
7469

75-
After you get a shell to the running Pod container, change the directory to `/shared`, and you can change the ownership or permissions using appropriate `chown` or `chmod` commands. For example,
70+
After you get a shell to the running Pod container, change the directory to `/shared`, and you can change the ownership or permissions using the appropriate `chown` or `chmod` commands. For example,
7671

7772
```
78-
chown 1000:0 /shared/. && find /shared/. -maxdepth 1 ! -name '.snapshot' ! -name '.' -print0 | xargs -r -0 chown -R 1000:0
73+
$ chown 1000:0 /shared/. && find /shared/. -maxdepth 1 ! -name '.snapshot' ! -name '.' -print0 | xargs -r -0 chown -R 1000:0
7974
```
75+
76+
#### References
77+
78+
- [Provisioning PVCs on the File Storage Service (FSS)](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingpersistentvolumeclaim_Provisioning_PVCs_on_FSS.htm#Provisioning_Persistent_Volume_Claims_on_the_FileStorageService) in the OCI documentation.
79+
- [Setting up storage for Kubernetes clusters](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingpersistentvolumeclaim.htm) in the OCI documentation.

documentation/site/content/managing-domains/persistent-storage/pv-pvc.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
+++
2-
title = "Persistent Volumes and Persistent Volume Claims"
2+
title = "PersistentVolumes and PersistentVolumeClaims"
33
date = 2019-02-23T16:45:09-05:00
44
weight = 1
55
description = "Use a Kubernetes PersistentVolume (PV) and PersistentVolumeClaim (PVC) to store WebLogic domain homes and log files."
@@ -15,15 +15,15 @@ The following prerequisites must be fulfilled before proceeding with the creatio
1515
* Make sure that all the servers in the WebLogic domain are able to reach the storage location.
1616
* Make sure that the host directory that will be used, already exists and has the appropriate file permissions set.
1717

18-
### Persistent Volume Storage locations
18+
### Persistent volume storage locations
1919
PersistentVolumes can point to different storage locations, for example NFS servers or a local directory path. For a list of available options, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/persistent-volumes/).
2020

21-
**Note regarding HostPath**: In a single-node Kubernetes cluster, such as may be used for testing or proof of concept activities, `HOST_PATH` provides the simplest configuration. In a multinode Kubernetes cluster, a `HOST_PATH` that is located on shared storage mounted by all nodes in the Kubernetes cluster is the simplest configuration. If nodes do not have shared storage, then NFS is probably the most widely available option. There are other options listed in the referenced table.
21+
**Note regarding HostPath**: In a single-node Kubernetes cluster, such as may be used for testing or proof of concept activities, `HOST_PATH` provides the simplest configuration. In a multinode Kubernetes cluster, a `HOST_PATH` that is located on shared storage mounted by all nodes in the Kubernetes cluster is the simplest configuration. If nodes do not have shared storage, then NFS is probably the most widely-available option. There are other options listed in the referenced table.
2222

23-
The operator provides a sample script to create the PersistentVolume and PersistentVolumeClaim for the domain. This script must be executed before creating the domain. Beginning with operator version 4.1.0, for the Domain on PV [domain home source type]({{< relref "/managing-domains/choosing-a-model/_index.md" >}}), the operator provides options to create the PV and PVC during the domain initialization. See [Domain on PV documentation]({{< relref "/managing-domains/domain-on-pv/_index.md" >}}) or the `domain.spec.configuration.initializeDomainOnPV` section in the domain resource [schema](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/documentation/domains/Domain.md) for more details.
23+
The operator provides a sample script to create the PersistentVolume and PersistentVolumeClaim for the domain. This script must be executed before creating the domain. Beginning with operator version 4.1.0, for the Domain on PV [domain home source type]({{< relref "/managing-domains/choosing-a-model/_index.md" >}}), the operator provides options to create the PV and PVC during the domain initialization. See the [Domain on PV documentation]({{< relref "/managing-domains/domain-on-pv/_index.md" >}}) or the `domain.spec.configuration.initializeDomainOnPV` section in the domain resource [schema](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/documentation/domains/Domain.md) for more details.
2424

25-
#### Persistent Volumes using HostPath approach
26-
The `HOST_PATH` provider is the simplest case for creating a Persistent Volume. It requires creating a directory on the Kubernetes master and ensuring that it has the correct permissions:
25+
#### Persistent volumes using HostPath approach
26+
The `HOST_PATH` provider is the simplest case for creating a PersistentVolume. It requires creating a directory on the Kubernetes master and ensuring that it has the correct permissions:
2727

2828
```shell
2929
$ mkdir -m 777 -p /path/to/domain1PersistentVolume
@@ -57,4 +57,3 @@ This section provides details of common problems that might occur while running
5757
Possibly the most common problem experienced during testing was the incorrect configuration of the PersistentVolume provider. The PersistentVolume must be accessible to all Kubernetes Nodes, and must be able to be mounted as `Read/Write/Many`. If this is not the case, the PersistentVolume creation will fail.
5858

5959
The simplest case is where the `HOST_PATH` provider is used. This can be either with one Kubernetes Node, or with the `HOST_PATH` residing in shared storage available at the same location on every node (for example, on an NFS mount). In this case, the path used for the PersistentVolume must have its permission bits set to 777.
60-

kubernetes/samples/scripts/domain-lifecycle/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -281,20 +281,20 @@ $ waitForDomain.sh -n my-namespace -d my-domain -p 0
281281

282282
### Examine, change, or delete PV contents
283283

284-
#### `pv-pvc-helper.sh`
284+
#### `pv-pvc-helper.sh`
285285

286286
Use this helper script for examining, changing permissions, or deleting the contents of the persistent volume (such as domain files or logs) for a WebLogic Domain on PV or Model in Image domain.
287287
The script launches a Kubernetes pod named 'pvhelper' using the provided persistent volume claim name and the mount path.
288-
You can run the 'kubectl exec' to get a shell to the running pod container and run commands to examine or clean up the contents of shared directories on the persistent volume.
289-
Use 'kubectl delete pvhelper -n <namespace>' command to delete the Pod after it's no longer needed.
288+
You can run the 'kubectl exec' command to get a shell to the running pod container and run commands to examine or clean up the contents of shared directories on the persistent volume.
289+
Use the 'kubectl delete pvhelper -n <namespace>' command to delete the Pod after it's no longer needed.
290290

291291
Use the following command for script usage:
292292

293293
```
294294
$ domain-on-pv-helper.sh -h
295295
```
296296

297-
Following is an example command to launch the helper pod with PVC name `sample-domain1-weblogic-sample-pvc` and mount path `/shared`.
297+
The following is an example command to launch the helper pod with the PVC name `sample-domain1-weblogic-sample-pvc` and mount path `/shared`.
298298

299299
```
300300
$ domain-on-pv-helper.sh -n sample-domain1-ns -c sample-domain1-weblogic-sample-pvc -m /shared
@@ -306,9 +306,9 @@ After the Pod is created, use the following command to get a shell to the runnin
306306
$ kubectl -n sample-domain1-ns exec -it pvhelper -- /bin/sh
307307
```
308308

309-
After you get a shell to the running pod container, you can recursively delete the contents of the domain home and applications
310-
directories using rm -rf /shared/domains/sample-domain1 and rm -rf /shared/applications/sample-domain1 commands. Since these
311-
commands will delete files on the persistent storage, we recommend you understand and execute these commands carefully.
309+
After you get a shell to the running pod container, you can recursively delete the contents of the domain home and applications
310+
directories using the `rm -rf /shared/domains/sample-domain1` and `rm -rf /shared/applications/sample-domain1` commands. Because these
311+
commands will delete files on the persistent storage, we recommend that you understand and execute these commands carefully.
312312

313313
Use the following command to delete the Pod after it's no longer needed.
314314

@@ -318,11 +318,11 @@ $ kubectl delete pod pvhelper -n <namespace>
318318

319319
### OPSS Wallet utility
320320

321-
#### `opss-wallet.sh`
321+
#### `opss-wallet.sh`
322322

323-
The OPSS wallet utility is a helper script for the JRF-type domains that can save an OPSS key
324-
wallet from a running domain's introspector configmap to a file and
325-
restore an OPSS key wallet file to a Kubernetes secret for use by a
323+
The OPSS wallet utility is a helper script for JRF-type domains that can save an OPSS key
324+
wallet from a running domain's introspector ConfigMap to a file and
325+
restore an OPSS key wallet file to a Kubernetes Secret for use by a
326326
domain that you're about to run.
327327

328328
Use the following command for script usage:
@@ -331,13 +331,13 @@ Use the following command for script usage:
331331
$ opss-wallet.sh -?
332332
```
333333

334-
For example, run the following command to save an OPSS key wallet from a running domain to file './ewallet.p12':
334+
For example, run the following command to save an OPSS key wallet from a running domain to the file './ewallet.p12':
335335

336336
```
337337
$ opss-wallet.sh -s
338338
```
339339

340-
Run the following command to restore the OPSS key wallet from file './ewallet.p12' to secret
340+
Run the following command to restore the OPSS key wallet from the file './ewallet.p12' to the secret
341341
'sample-domain1-opss-walletfile-secret' for use by a domain you're about to run:
342342

343343
```

0 commit comments

Comments
 (0)