Skip to content

Commit e10b009

Browse files
committed
Add a section for updating a domain
Signed-off-by: doxiao <[email protected]>
1 parent 7728c58 commit e10b009

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,47 @@ The script will remove only domain-related resources which are labeled with the
167167
kubectl -n <Namespace> label <ResourceType> <ResourceName> domainUID=<domainUID>
168168
```
169169

170-
To manually remove the persistent volume claim and the persistent volume, use these commands:
170+
By default, the domain's persistent volume claim and the persistent volume are created by the create-weblogic-domain.sh script, and are removed by delete-weblogic-domain-resources.sh script. To manually remove the persistent volume claim and the persistent volume, use these commands:
171171

172172
```
173173
kubectl delete pvc PVC-NAME -n NAMESPACE
174174
kubectl delete pv PV-NAME
175175
```
176176

177-
Find the names of the persistent volume claim (represented above as `PVC-NAME`) and the persistent volume (represented as `PV-NAME`) in the domain custom resource YAML file, or if it is not available, check for the `domainUID` in the metadata on the persistent volumes. Replace `NAMESPACE` with the namespace that the operator is running in.
177+
Find the names of the persistent volume claim (represented above as `PVC-NAME`) and the persistent volume (represented as `PV-NAME`) in the domain custom resource YAML file, or if it is not available, check for the `domainUID` in the metadata on the persistent volumes. Replace `NAMESPACE` with the namespace that the domain is running in.
178178

179179
To permanently delete the actual WebLogic domain configuration and domain home, delete the physical volume using the appropriate tools. For example, if the persistent volume used the `HostPath` provider, then delete the corresponding directory on the Kubernetes master.
180180

181+
## Updating a domain
182+
There are times when a running domain needs to be updated with modified properties.
183+
This can be achieved by following the steps below. For convenience of discussion, we assume that the domain is originally created by the following example command, where `/path/to/weblogic-operator-output-directory` is a directory that is created in advance to store the files that are generated by the operator.
184+
185+
```
186+
./create-weblogic-domain.sh \
187+
-i create-domain-job-inputs.yaml \
188+
-o /path/to/weblogic-operator-output-directory
189+
190+
```
191+
192+
* Delete the domain using the [Delete WebLogic domain resources](kubernetes/delete-weblogic-domain-resources.sh) script.
193+
194+
```
195+
./delete-weblogic-domain-resources.sh -d <domainUID>
196+
197+
````
198+
* Delete the contents of the physical volume using the appropriate tools.
199+
* Delete the contents in the `weblogic-domains/<domainUID>` directory under `/path/to/weblogic-operator-output-directory`, which is used in the previous run of the [Create WebLogic domain](kubectles/create-weblogic-domain.sh) script.
200+
* Modify the create WebLogic domain inputs file `create-domain-job-inputs.yaml`.
201+
* Recreate all resources that are labeled with the `domainUID`, but are NOT created by the [Create WebLogic domain](kubernetes/create-weblogic-domain.sh) script. One example of such resources is the `secret` for the domain credentials, which often is created manually and may be labeled with `domainUID`. Any resources that are not labeled with the `domainUID` is not deleted by the [Delete WebLogic domain resources](kubernetes/delete-weblogic-domain-resources.sh) script, and therefore, do not need to be recreated.
202+
* Recreate the domain using the [Create WebLogic domain](kubectles/create-weblogic-domain.sh) script with the modified create WebLogic domain inputs file.
203+
204+
If for some reason the last step failed, repeat the steps above after deleting the failed create WebLogic domain job using the following command. The `<output-dir>` is the directory that is passed to the create WebLogic domain script via `-o`. It is `/path/to/weblogic-operator-output-directory` in our example.
205+
206+
```
207+
kubectl delete -f <output-dir>/weblogic-domains/<domainUID>/create-weblogic-domain-job.yaml
208+
209+
```
210+
181211
## Removing the operator
182212
183213
To remove the operator from a Kubernetes cluster, issue the following commands:

0 commit comments

Comments
 (0)