Skip to content

Commit 3c27048

Browse files
edit READMEs
1 parent 4ab2019 commit 3c27048

File tree

4 files changed

+101
-92
lines changed

4 files changed

+101
-92
lines changed

integration-tests/README.md

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,87 @@
11
# Integration Tests for Oracle WebLogic Server Kubernetes Operator
22

3-
This documentation describes the functional use cases that are covered in integration testing for the Oracle WebLogic Server Kubernetes Operator. The tests are written in Java (JUnit tests) and driven by Maven profile.
3+
This documentation describes the functional use cases that are covered in integration testing for the Oracle WebLogic Server Kubernetes Operator. The tests are written in Java (JUnit tests) and driven by Maven profile.
44

55
# Environments
66

7-
The tests currently run in three modes: "Wercker", "Jenkins", and "standalone" Oracle Linux, where the mode is controlled by the WERCKER and JENKINS environment variables described below. The default is "standalone".
7+
The tests currently run in three modes: "Wercker", "Jenkins", and "standalone" Oracle Linux, where the mode is controlled by the `WERCKER` and `JENKINS` environment variables described below. The default is "standalone".
88

9-
* "Standalone" Oracle Linux, i.e, run the tests manually with mvn command.
10-
* Wercker - https://app.wercker.com/Oracle/weblogic-kubernetes-operator/runs - integration-test-java is the pipeline name
11-
* Jenkins - http://wls-jenkins.us.oracle.com/view/weblogic-operator/job/weblogic-kubernetes-operator-javatest/ - Jenkins Run is restricted to Oracle Internal development Process
9+
* "Standalone" Oracle Linux, i.e, run the tests manually with the `mvn` command.
10+
* Wercker - https://app.wercker.com/Oracle/weblogic-kubernetes-operator/runs - `integration-test-java` is the pipeline name.
11+
* Jenkins - http://wls-jenkins.us.oracle.com/view/weblogic-operator/job/weblogic-kubernetes-operator-javatest/ - Jenkins Run is restricted to Oracle Internal development process.
1212

13-
Wercker runs only Quick test use cases, Jenkins run both Quick and Full test use cases.
13+
Wercker runs only Quick test use cases, Jenkins runs both Quick and Full test use cases.
1414

1515
# Use Cases
1616

1717
Java integration tests cover the below use cases:
1818

19-
Quick test use cases -
19+
Quick test use cases
2020

2121
| | |
2222
| --- | --- |
23-
| Operator Configuration | operator1 deployed in weblogic-operator1 namespace and manages domains in default and test1 namespaces |
24-
| Domain Configuration | Domain on PV using WLST, traefik load balancer |
23+
| Operator Configuration | operator1 deployed in `weblogic-operator1` namespace and manages domains in `default` and `test1` namespaces |
24+
| Domain Configuration | Domain on PV using WLST, Traefik load balancer |
2525

2626
Basic Use Cases
2727

28-
1. create operator operator1 which manages default and test1 namespaces, verify its deployed successfully, pod created, operator Ready and verify external REST service if configured
29-
2. create domain domain1 in default namespace and verify the pods, services are created and servers are in Ready
30-
3. verify admin external service by accessing admin REST endpoint with nodeport in URL
31-
4. verify admin t3 channel port by exec into the admin pod and deploying webapp using the channel port for WLST
32-
5. verify web app load balancing by accessing the webapp using loadBalancerWebPort
28+
1. Create operator `operator1` which manages `default` and `test1` namespaces, verify it's deployed successfully, pods created, operator ready and verify external REST service, if configured.
29+
2. Create domain `domain1` in `default` namespace and verify the pods, services are created and servers are in ready state.
30+
3. Verify the admin external service by accessing the admin REST endpoint with `nodeport` in URL.
31+
4. Verify admin t3 channel port by exec into the admin pod and deploying webapp using the channel port for WLST.
32+
5. Verify web app load balancing by accessing the webapp using `loadBalancerWebPort`.
3333

3434
Advanced Use Cases
3535

36-
6. verify domain life cycle(destroy and create) should not any impact on Operator managing the domain and web app load balancing and admin external service
37-
7. cluster scale up/down using Operator REST endpoint, webapp load balancing should adjust accordingly.
38-
8. Operator life cycle(destroy and create) should not impact the running domain
36+
6. Verify domain life cycle (destroy and create) should not have any impact on operator managing the domain and web app load balancing and admin external service.
37+
7. Cluster scale up/down using operator REST endpoint, webapp load balancing should adjust accordingly.
38+
8. Operator life cycle (destroy and create) should not impact the running domain.
3939

40-
Also the below use cases are covered for Quick test
40+
Also the below use cases are covered for Quick test:
4141

42-
9. verify liveness probe by killing managed server 1 process 3 times to kick pod auto-restart
43-
10. shutdown the domain by changing domain serverStartPolicy to NEVER
42+
9. Verify the liveness probe by killing managed server 1 process 3 times to kick pod auto-restart.
43+
10. Shutdown the domain by changing domain `serverStartPolicy` to `NEVER`.
4444

45-
Full test use cases -
45+
Full test use cases
4646

4747
| | |
4848
| --- | --- |
49-
| Operator Configuration | operator2 deployed in weblogic-operator2 namespace and manages domains test2 namespace |
50-
| Domain Configuration | Domain on PV using WDT, Domain with serverStartPolicy ADMIN_ONLY, Domain with auto and custom situational configuration, Two domains managed by two operators, Domain with Recycle weblogicDomainStorageReclaimPolicy, Domain with default sample values |
49+
| Operator Configuration | operator2 deployed in `weblogic-operator2` namespace and manages domains `test2` namespace. |
50+
| Domain Configuration | Domain on PV using WDT; domain with `serverStartPolicy` `ADMIN_ONLY`; domain with auto and custom situational configuration; two domains managed by two operators; domain with recycle `weblogicDomainStorageReclaimPolicy`; domain with default sample values. |
5151

5252

5353
Basic Use Cases described above are verified in all the domain configurations. Also the below use cases are covered:
5454

5555
| Domain | Use Case |
5656
| --- | --- |
5757
| Domain on PV using WDT | WLDF scaling |
58-
| Domain with ADMIN_ONLY | making sure only admin server is started and managed servers are not started. Shutdown domain by deleting domain CRD. Create domain on existing PV dir, pv is already populated by a shutdown domain. |
59-
| Domain with situational config | create domain with listen address not set for admin server and t3 channel/NAP and incorrect file for admin server log location. Introspector should override these with sit-config automatically. Also, with some junk value for t3 channel public address and using custom situational config override replace with valid public address using secret. Also, on Jenkins this domain uses NFS instead of HOSTPATH PV storage |
60-
| Two domains managed by two operators | verify scaling and restart of one domain doesn't impact another domain. Delete domain resources using delete script from samples. |
61-
| Domain with Recycle policy | create domain with pvReclaimPolicy="Recycle" Verify that the PV is deleted once the domain and PVC are deleted |
62-
| Domain with default sample values | create domain using mostly default values for inputs |
63-
58+
| Domain with ADMIN_ONLY | Making sure only admin server is started and managed servers are not started. Shutdown domain by deleting domain CRD. Create domain on existing PV dir, pv is already populated by a shutdown domain. |
59+
| Domain with situational config | Create domain with listen address not set for admin server and t3 channel/NAP and incorrect file for admin server log location. Introspector should override these with sit-config automatically. Also, with some junk value for t3 channel public address and using custom situational config override replace with valid public address using secret. Also, on Jenkins this domain uses NFS instead of HOSTPATH PV storage. |
60+
| Two domains managed by two operators | Verify scaling and restart of one domain doesn't impact another domain. Delete domain resources using delete script from samples. |
61+
| Domain with Recycle policy | Create domain with pvReclaimPolicy="Recycle" Verify that the PV is deleted once the domain and PVC are deleted. |
62+
| Domain with default sample values | Create domain using mostly default values for inputs. |
63+
6464

6565
# Directory Configuration and Structure
6666

6767
Directory structure of source code:
6868

69-
A new module "integration-tests" is added to the Maven project weblogic-kubernetes-operator.
69+
A new module "integration-tests" is added to the Maven project `weblogic-kubernetes-operator`.
7070

71-
weblogic-kubernetes-operator/integration-tests - location of module pom.xml
72-
weblogic-kubernetes-operator/integration-tests/src/test/java - integration test(JUnit) classes and utility classes
73-
weblogic-kubernetes-operator/integration-tests/src/test/resources - properties, yaml files(see Configuration Files section) and other scripts
71+
`weblogic-kubernetes-operator/integration-tests` - location of module pom.xml
72+
`weblogic-kubernetes-operator/integration-tests/src/test/java` - integration test(JUnit) classes and utility classes
73+
`weblogic-kubernetes-operator/integration-tests/src/test/resources` - properties, YAML files (see Configuration Files section) and other scripts.
7474

7575
Directory structure used for the test run:
7676

77-
Main external env vars:
77+
Main external `env vars`:
7878

7979
| Variable | Description |
8080
| --- | --- |
8181
| RESULT_ROOT | Root path for local test files. |
8282
| PV_ROOT | Root NFS path behind PV/C directories. This must have permissions suitable for WL pods to add files |
8383

84-
Defaults for RESULT_ROOT & PV_ROOT:
84+
Defaults for `RESULT_ROOT` & `PV_ROOT`:
8585

8686
| Test Mode | RESULT_ROOT | PV_ROOT | Where initialized |
8787
| --- | --- | --- | --- |
@@ -173,7 +173,7 @@ Integration test classes:
173173

174174
When the integration test class ITOperator is executed, staticPrepare() method is called once before any of the test methods in the class and staticUnPrepare() method once at the end.
175175

176-
staticPrepare() - initializes the application properties from OperatorIT.properties and creates resultRoot, pvRoot, userprojectsDir directories by calling initialize() method from the base class BaseTest.
176+
staticPrepare() - initializes the application properties from OperatorIT.properties and creates resultRoot, pvRoot, userprojectsDir directories by calling initialize() method from the base class BaseTest.
177177

178178
staticUnPrepare() - releases the cluster lease on wercker env.
179179

@@ -225,7 +225,7 @@ WERCKER=true:
225225
Successful run will have the output like below:
226226
```
227227
[INFO] Reactor Summary:
228-
[INFO]
228+
[INFO]
229229
[INFO] weblogic-kubernetes-operator ....................... SUCCESS [ 0.305 s]
230230
[INFO] operator-model ..................................... SUCCESS [ 10.274 s]
231231
[INFO] operator-swagger ................................... SUCCESS [ 0.436 s]
@@ -243,19 +243,19 @@ Successful run will have the output like below:
243243
Failed run will have the output like
244244
```
245245
246-
[INFO]
246+
[INFO]
247247
[INFO] Results:
248-
[INFO]
249-
[ERROR] Errors:
248+
[INFO]
249+
[ERROR] Errors:
250250
[ERROR] ITOperator.testDomainOnPVUsingWLST:145 ? Runtime FAILURE: Couldn't create serv...
251-
[INFO]
251+
[INFO]
252252
[ERROR] Tests run: 9, Failures: 0, Errors: 1, Skipped: 0
253-
[INFO]
254-
[INFO]
253+
[INFO]
254+
[INFO]
255255
[INFO] --- maven-failsafe-plugin:2.20.1:verify (integration-tests) @ operator-integration-tests ---
256256
[INFO] ------------------------------------------------------------------------
257257
[INFO] Reactor Summary:
258-
[INFO]
258+
[INFO]
259259
[INFO] Build Tools ........................................ SUCCESS [ 1.193 s]
260260
[INFO] weblogic-kubernetes-operator ....................... SUCCESS [ 2.671 s]
261261
[INFO] json-schema ........................................ SUCCESS [ 14.917 s]
@@ -298,7 +298,7 @@ $RESULT_ROOT/acceptance_test_tmp is archived under $RESULT_ROOT/acceptance_test_
298298

299299
$PV_ROOT/acceptance_test_pv is archived under $PV_ROOT/acceptance_test_pv_archive
300300

301-
On Wercker, these logs can be downloaded by clicking "Download artifact" on cleanup and store step.
301+
On Wercker, these logs can be downloaded by clicking "Download artifact" on cleanup and store step.
302302

303303
# How to add a new test
304304

@@ -321,6 +321,8 @@ You may run into one or more of the following errors when you attempt to execute
321321
mvn clean verify -P java-integration-tests 2>&1 | tee log.txt
322322
```
323323
1. `[ERROR] No permision to create directory /scratch/...`
324-
there are a couple ways to resolve this issue:
325-
* create a world writable directory named /scratch
326-
* create some other world writable directory and then define the environment variables RESULT_ROOT and PV_ROOT to point to that directory. If you want, you can create two directories to keep things separated. See [Directory Configuration and Structure](#directory-configuration-and-structure) for more details.
324+
325+
There are a couple ways to resolve this issue:
326+
327+
* Create a world writable directory named `/scratch`.
328+
* Create some other world writable directory and then define the environment variables `RESULT_ROOT` and `PV_ROOT` to point to that directory. If you want, you can create two directories to keep things separated. See [Directory Configuration and Structure](#directory-configuration-and-structure) for more details.

kubernetes/samples/scripts/create-weblogic-domain-pv-pvc/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,13 @@ Events: <none>
216216

217217
## Troubleshooting
218218

219-
1. Message: "[ERROR] The weblogicDomainStoragePath parameter in kubernetes/samples/scripts/create-weblogic-domain-pv-pvc/create-pv-pvc-inputs.yaml is missing, null or empty"
219+
* Message: `[ERROR] The weblogicDomainStoragePath parameter in kubernetes/samples/scripts/create-weblogic-domain-pv-pvc/create-pv-pvc-inputs.yaml is missing, null or empty`
220220
Edit the file and set the value of the field. This value must be a directory that is world writable.
221-
Optionally, follow these steps to tighten permissions on the named directory after you run the sample the first time.
222-
* become the root user
223-
* ls -nd $value-of-weblogicDomainStoragePath
224-
* Note the values of the third and fourth field of the output
225-
* chown $third-field:$fourth-field $value-of-weblogicDomainStoragePath
226-
* chmod 755 $value-of-weblogicDomainStoragePath
227-
* return to your normal user id
221+
Optionally, follow these steps to tighten permissions on the named directory after you run the sample the first time:
222+
223+
* Become the root user.
224+
* `ls -nd $value-of-weblogicDomainStoragePath`
225+
* Note the values of the third and fourth field of the output.
226+
* `chown $third-field:$fourth-field $value-of-weblogicDomainStoragePath`
227+
* `chmod 755 $value-of-weblogicDomainStoragePath`
228+
* Return to your normal user ID.

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/README.md

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -386,44 +386,52 @@ $ kubectl create -f delete-domain-job.yaml
386386
```
387387
## Troubleshooting
388388

389-
1. Message: "status on iteration 20 of 20
389+
1. Message: `status on iteration 20 of 20
390390
pod domain1-create-weblogic-sample-domain-job-4qwt2 status is Pending
391-
The create domain job is not showing status completed after waiting 300 seconds."
392-
* The most likely cause is related to the value of persistentVolumeClaimName, defined in domain-home-on-pv/create-domain-inputs.yaml.
393-
To find out if this is the problem, do the following:
394-
* execute `kubectl get all --all-namespaces` to find the name of the create weblogic sample domain job.
395-
* execute `kubectl describe pod <name-of-create-weblogic-sample-domain-job>` to see if there is an Event that has text similar to `persistentvolumeclaim "domain1-weblogic-sample-pvc" not found`
396-
* find the name of the pvc that was created by executing [create-pv-pvc.sh](../../create-weblogic-domain-pv-pvc/README.md), using `kubectl describe pvc`. It is likely to be `weblogic-sample-pvc`
397-
398-
Change the value of persistentVolumeClaimName to match the name created when you executed [create-pv-pvc.sh](../../create-weblogic-domain-pv-pvc/README.md). Rerun the `create-domain.sh` script with the same arguments as you did before.
399-
* Verify that the operator is deployed. Use the command
391+
The create domain job is not showing status completed after waiting 300 seconds.`
392+
393+
The most likely cause is related to the value of `persistentVolumeClaimName`, defined in `domain-home-on-pv/create-domain-inputs.yaml`.
394+
* To determine if this is the problem:
395+
396+
* Execute `kubectl get all --all-namespaces` to find the name of the `create-weblogic-sample-domain-job`.
397+
* Execute `kubectl describe pod <name-of-create-weblogic-sample-domain-job>` to see if there is an event that has text similar to `persistentvolumeclaim "domain1-weblogic-sample-pvc" not found`.
398+
* Find the name of the PVC that was created by executing [create-pv-pvc.sh](../../create-weblogic-domain-pv-pvc/README.md), using `kubectl describe pvc`. It is likely to be `weblogic-sample-pvc`.
399+
400+
* Change the value of `persistentVolumeClaimName` to match the name created when you executed [create-pv-pvc.sh](../../create-weblogic-domain-pv-pvc/README.md).
401+
* Rerun the `create-domain.sh` script with the same arguments as you did before.
402+
* Verify that the operator is deployed. Use the command:
400403
```
401404
kubectl get all --all-namespaces
402405
```
403-
and look for lines similar to
406+
Look for lines similar to:
404407
```
405408
weblogic-operator1 pod/weblogic-operator-
406409
```
407-
If you do not find something similar in the output, the WebLogic Operator for Kubernetes may not have been installed completely. Review the operator [installation instructions](../../../../../site/install.md).
410+
If you do not find something similar in the output, the WebLogic Operator for Kubernetes may not have been installed completely. Review the operator [installation instructions](../../../../../site/install.md).
411+
408412

409-
2. Message: "ERROR: Unable to create folder /shared/domains"
410-
The most common cause is a poor choice of value for weblogicDomainStoragePath in the input file used when you executed
413+
2. Message: `ERROR: Unable to create folder /shared/domains`
414+
The most common cause is a poor choice of value for `weblogicDomainStoragePath` in the input file used when you executed:
411415
```
412416
create-pv-pvc.sh
413417
```
414-
Then you should [delete the resources for your sample domain](../../delete-domain/README.md), correct the value in that file and rerun the commands to create the pv/pvc and the credential before you attempt to rerun
418+
You should [delete the resources for your sample domain](../../delete-domain/README.md), correct the value in that file, and rerun the commands to create the PV/PVC and the credential before you attempt to rerun:
415419
```
416420
create-domain.sh
417421
```
418-
A correct value for weblogicDomainStoragePath will meet the following requirements:
419-
* Must be the name of a directory
420-
* the directory must be world writable.
421-
Optionally, follow these steps to tighten permissions on the named directory after you run the sample the first time.
422-
* become the root user
423-
* ls -nd $value-of-weblogicDomainStoragePath
424-
* Note the values of the third and fourth field of the output
425-
* chown $third-field:$fourth-field $value-of-weblogicDomainStoragePath
426-
* chmod 755 $value-of-weblogicDomainStoragePath
427-
* return to your normal user id
428-
3. Message: "ERROR: The create domain job will not overwrite an existing domain. The domain folder /shared/domains/domain1 already exists"
429-
You will see this message if the directory domains/domain1 exists in the directory named as the value of weblogicDomainStoragePath in create-pv-pvc-inputs.yaml. For example, if the value of weblogicDomainStoragePath is `/tmp/wls-op-4-k8s`, you would need to remove (or move) `/tmp/wls-op-4-k8s/domains/domain1`.
422+
A correct value for `weblogicDomainStoragePath` will meet the following requirements:
423+
424+
* Must be the name of a directory.
425+
* The directory must be world writable.
426+
427+
Optionally, follow these steps to tighten permissions on the named directory after you run the sample the first time:
428+
429+
* Become the root user.
430+
* `ls -nd $value-of-weblogicDomainStoragePath`
431+
* Note the values of the third and fourth field of the output.
432+
* `chown $third-field:$fourth-field $value-of-weblogicDomainStoragePath`
433+
* `chmod 755 $value-of-weblogicDomainStoragePath`
434+
* Return to your normal user ID.
435+
436+
3. Message: `ERROR: The create domain job will not overwrite an existing domain. The domain folder /shared/domains/domain1 already exists`
437+
You will see this message if the directory `domains/domain1` exists in the directory named as the value of `weblogicDomainStoragePath` in `create-pv-pvc-inputs.yaml`. For example, if the value of `weblogicDomainStoragePath` is `/tmp/wls-op-4-k8s`, you would need to remove (or move) `/tmp/wls-op-4-k8s/domains/domain1`.

0 commit comments

Comments
 (0)