Skip to content

Commit c95b821

Browse files
committed
Merge branch 'develop' into owls-70659
2 parents 90a2828 + ba4d218 commit c95b821

37 files changed

+536
-1580
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Oracle is finding ways for organizations using WebLogic Server to run important
1818
* Scale WebLogic domains by starting and stopping Managed Servers on demand, or by integrating with a REST API to initiate scaling based on WLDF, Prometheus, Grafana, or other rules.
1919
* Publish operator and WebLogic Server logs into Elasticsearch and interact with them in Kibana.
2020

21-
The fastest way to experience the operator is to follow the [Quick start guide](site/quickstart.md), or you can peruse our [documentation](site), read our blogs, or try out the [samples](kubernetes/samples/README.md).
21+
The fastest way to experience the operator is to follow the [Quick start guide](site/quickstart.md), or you can peruse our [documentation](site), read our [blogs](https://blogs.oracle.com/weblogicserver/how-to-weblogic-server-on-kubernetes), or try out the [samples](kubernetes/samples/README.md).
2222

2323
# About this documentation
2424

@@ -54,6 +54,14 @@ The [User guide](site/user-guide.md) provides detailed information about all asp
5454

5555
Please refer to our [samples](kubernetes/samples/README.md) for information about the available sample code we provide.
5656

57+
# Need more help?
58+
59+
We have a public Slack channel where you can get in touch with us to ask questions about using the operator. To join our channel, please [visit this site to get an invitation](https://weblogic-slack-inviter.herokuapp.com/). The invitation email will include details of how to access our Slack workspace. After you are logged in, please come to #operator and say, "hello!"
60+
61+
# Recent changes
62+
63+
See [Recent changes](site/recent-changes.md) for changes to the operator, including any backward incompatible changes.
64+
5765
# Developer guide
5866

5967
Developers interested in this project are encouraged to read the [Developer guide](site/developer.md) to learn how to build the project, run tests, and so on. The Developer guide also provides details about the structure of the code, coding standards, and the Asynchronous Call facility used in the code to manage calls to the Kubernetes API.
@@ -70,15 +78,6 @@ Documentation for APIs is provided here:
7078

7179
* [Javadoc](https://oracle.github.io/weblogic-kubernetes-operator/apidocs/index.html) for the operator.
7280

73-
## Need more help?
74-
75-
We have a public Slack channel where you can get in touch with us to ask questions about using the operator. To join our channel, please [visit this site to get an invitation](https://weblogic-slack-inviter.herokuapp.com/). The invitation email will include details of how to access our Slack workspace. After you are logged in, please come to #operator and say, "hello!"
76-
77-
## Recent changes
78-
79-
See [Recent changes](site/recent-changes.md) for changes to the operator, including any backward incompatible changes.
80-
81-
8281
# Contributing to the operator
8382

8483
Oracle welcomes contributions to this project from anyone. Contributions may be reporting an issue with the operator or submitting a pull request. Before embarking on significant development that may result in a large pull request, it is recommended that you create an issue and discuss the proposed changes with the existing developers first.

integration-tests/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ Full test use cases
4848
* shutdown and delete domain7
4949
* create domain domain8 and test that create domain fails when its pv is already populated by a shutdown domain
5050
* create another domain domain9 with APACHE load balancer and access admin console via LB port. shutdown domain.
51-
* create another domain domain10 with mostly default values from sample domain inputs, mainly exposeAdminT3Channel and exposeAdminNodePort which are false by default and verify domain startup and cluster scaling using operator rest endpoint works.
51+
* create another domain domain10 with mostly default values from sample domain inputs, mainly exposeAdminT3Channel and exposeAdminNodePort which are false by default and verify domain startup and cluster scaling using operator rest endpoint works.
52+
* create another domain domain11 with listen address not set for admin server and t3 channel and incorrect file for admin server log
53+
* verify automatic situational config override works by bringing up the domain and by doing checks 2 - 5 listed in quick test
54+
* create another domain domain12 with some junk value for t3 channel public address and using custom situational config override replace with valid public address
55+
* verify the domain by doing checks 2 - 5 listed in quick test
56+
5257

5358

5459
# Directory Configuration and Structure

integration-tests/src/test/java/oracle/kubernetes/operator/ITOperator.java

Lines changed: 96 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static void staticPrepare() throws Exception {
9191
}
9292

9393
/**
94-
* Releases k8s cluster lease
94+
* Releases k8s cluster lease, archives result, pv directories
9595
*
9696
* @throws Exception
9797
*/
@@ -124,6 +124,19 @@ public static void staticUnPrepare() throws Exception {
124124
logger.info("SUCCESS");
125125
}
126126

127+
/**
128+
* Create operator and verify its deployed successfully. Create domain and verify domain is
129+
* started. Verify admin external service by accessing admin REST endpoint with nodeport in URL
130+
* Verify admin t3 channel port by exec into the admin pod and deploying webapp using the channel
131+
* port for WLST Verify web app load balancing by accessing the webapp using loadBalancerWebPort
132+
* Verify domain life cycle(destroy and create) should not any impact on Operator Cluster scale
133+
* up/down using Operator REST endpoint, webapp load balancing should adjust accordingly. Operator
134+
* life cycle(destroy and create) should not impact the running domain Verify liveness probe by
135+
* killing managed server 1 process 3 times to kick pod auto-restart shutdown the domain by
136+
* changing domain serverStartPolicy to NEVER
137+
*
138+
* @throws Exception
139+
*/
127140
@Test
128141
public void test1CreateFirstOperatorAndDomain() throws Exception {
129142

@@ -148,7 +161,15 @@ public void test1CreateFirstOperatorAndDomain() throws Exception {
148161

149162
logger.info("SUCCESS - test1CreateFirstOperatorAndDomain");
150163
}
151-
164+
/**
165+
* Create operator if its not running and create domain and verify domain in started successfully.
166+
* Verify admin external service by accessing admin REST endpoint with nodeport in URL Verify
167+
* admin t3 channel port by exec into the admin pod and deploying webapp using the channel port
168+
* for WLST Verify web app load balancing by accessing the webapp using loadBalancerWebPort
169+
* shutdown by deleting domain CRD using yaml
170+
*
171+
* @throws Exception
172+
*/
152173
@Test
153174
public void test2CreateAnotherDomainInDefaultNS() throws Exception {
154175
Assume.assumeFalse(QUICKTEST);
@@ -174,7 +195,13 @@ public void test2CreateAnotherDomainInDefaultNS() throws Exception {
174195
}
175196
logger.info("SUCCESS - test2CreateAnotherDomainInDefaultNS");
176197
}
177-
198+
/**
199+
* Create operator if its not running. Create domain with dynamic cluster using WDT and verify the
200+
* domain is started successfully. Verify cluster scaling by doing scale up for domain3 using WLDF
201+
* scaling shutdown by deleting domain CRD using yaml
202+
*
203+
* @throws Exception
204+
*/
178205
@Test
179206
public void test3CreateDomainInTest1NS() throws Exception {
180207
Assume.assumeFalse(QUICKTEST);
@@ -201,7 +228,11 @@ public void test3CreateDomainInTest1NS() throws Exception {
201228

202229
logger.info("SUCCESS - test3CreateDomainInTest1NS");
203230
}
204-
231+
/**
232+
* Create operator managing test2 namespace
233+
*
234+
* @throws Exception
235+
*/
205236
@Test
206237
public void test4CreateAnotherOperatorManagingTest2NS() throws Exception {
207238
Assume.assumeFalse(QUICKTEST);
@@ -213,6 +244,15 @@ public void test4CreateAnotherOperatorManagingTest2NS() throws Exception {
213244
logger.info("SUCCESS - test4CreateAnotherOperatorManagingTest2NS");
214245
}
215246

247+
/**
248+
* Create two operators if they are not running. Create domain domain4 with dynamic cluster in
249+
* default namespace, managed by operator1 Create domain domain5 with Configured cluster using WDT
250+
* in test2 namespace, managed by operator2 Verify scaling for domain5 cluster from 2 to 3 servers
251+
* and back to 2, plus verify no impact on domain4 Cycle domain4 down and back up, plus verify no
252+
* impact on domain5 shutdown by deleting both domain4 and domain5 CRD's
253+
*
254+
* @throws Exception
255+
*/
216256
@Test
217257
public void test5CreateConfiguredDomainInTest2NS() throws Exception {
218258
Assume.assumeFalse(QUICKTEST);
@@ -265,7 +305,13 @@ public void test5CreateConfiguredDomainInTest2NS() throws Exception {
265305
}
266306
logger.info("SUCCESS - test5CreateConfiguredDomainInTest2NS");
267307
}
268-
308+
/**
309+
* Create operator if its not running and create domain with serverStartPolicy="ADMIN_ONLY" Verify
310+
* only admin server is created. on Jenkins, this domain will also test NFS instead of HOSTPATH PV
311+
* storage shutdown by deleting domain CRD
312+
*
313+
* @throws Exception
314+
*/
269315
@Test
270316
public void test6CreateDomainWithStartPolicyAdminOnly() throws Exception {
271317
Assume.assumeFalse(QUICKTEST);
@@ -289,7 +335,12 @@ public void test6CreateDomainWithStartPolicyAdminOnly() throws Exception {
289335

290336
logger.info("SUCCESS - test6CreateDomainWithStartPolicyAdminOnly");
291337
}
292-
338+
/**
339+
* Create operator and create domain with pvReclaimPolicy="Recycle" Verify that the PV is deleted
340+
* once the domain and PVC are deleted
341+
*
342+
* @throws Exception
343+
*/
293344
@Test
294345
public void test7CreateDomainPVReclaimPolicyRecycle() throws Exception {
295346
Assume.assumeFalse(QUICKTEST);
@@ -312,7 +363,12 @@ public void test7CreateDomainPVReclaimPolicyRecycle() throws Exception {
312363
domain7.deletePVCAndCheckPVReleased();
313364
logger.info("SUCCESS - test7CreateDomainPVReclaimPolicyRecycle");
314365
}
315-
366+
/**
367+
* Create operator and create domain and verify that create domain fails when its pv is already
368+
* populated by a shutdown domain
369+
*
370+
* @throws Exception
371+
*/
316372
@Test
317373
public void test8CreateDomainOnExistingDir() throws Exception {
318374
Assume.assumeFalse(QUICKTEST);
@@ -338,6 +394,12 @@ public void test8CreateDomainOnExistingDir() throws Exception {
338394
logger.info("SUCCESS - test8CreateDomainOnExistingDir");
339395
}
340396

397+
/**
398+
* Create operator and create domain with APACHE load balancer and verify domain is started
399+
* successfully and access admin console via LB port. shutdown domain.
400+
*
401+
* @throws Exception
402+
*/
341403
// @Test
342404
public void testACreateDomainApacheLB() throws Exception {
343405
Assume.assumeFalse(QUICKTEST);
@@ -360,7 +422,13 @@ public void testACreateDomainApacheLB() throws Exception {
360422
}
361423
logger.info("SUCCESS - testACreateDomainApacheLB");
362424
}
363-
425+
/**
426+
* Create operator and create domain with mostly default values from sample domain inputs, mainly
427+
* exposeAdminT3Channel and exposeAdminNodePort which are false by default and verify domain
428+
* startup and cluster scaling using operator rest endpoint works.
429+
*
430+
* @throws Exception
431+
*/
364432
@Test
365433
public void testBCreateDomainWithDefaultValuesInSampleInputs() throws Exception {
366434
Assume.assumeFalse(QUICKTEST);
@@ -462,7 +530,14 @@ public void testDeleteTwoDomains() throws Exception {
462530
TestUtils.verifyAfterDeletion(domainDel2);
463531
logger.info("SUCCESS - testDeleteTwoDomains");
464532
}
465-
533+
/**
534+
* Create Operator and create domain with listen address not set for admin server, t3 channel and
535+
* incorrect file for admin server log location Verify automatic situational config override works
536+
* by bringing up the domain and by verifying domain is started successfully and web application
537+
* can be deployed and accessed.
538+
*
539+
* @throws Exception
540+
*/
466541
@Test
467542
public void testAutoSitConfigOverrides() throws Exception {
468543
Assume.assumeFalse(QUICKTEST);
@@ -492,7 +567,7 @@ public void testAutoSitConfigOverrides() throws Exception {
492567
testBasicUseCases(domain11);
493568
// testAdvancedUseCasesForADomain(operator1, domain11);
494569
testCompletedSuccessfully = true;
495-
logger.info("SUCCESS - testAutoSitConfigOverrides");
570+
496571
} finally {
497572
Files.copy(
498573
new File(createDomainScriptDir + "/create-domain.py.bak").toPath(),
@@ -502,9 +577,16 @@ public void testAutoSitConfigOverrides() throws Exception {
502577
domain11.destroy();
503578
}
504579
}
580+
logger.info("SUCCESS - testAutoSitConfigOverrides");
505581
}
506-
507-
// @Test
582+
/**
583+
* Create Operator and create domain with some junk value for t3 channel public address and using
584+
* custom situational config override replace with valid public address using secret Verify the
585+
* domain is started successfully and web application can be deployed and accessed.
586+
*
587+
* @throws Exception
588+
*/
589+
@Test
508590
public void testCustomSitConfigOverrides() throws Exception {
509591
Assume.assumeFalse(QUICKTEST);
510592
logTestBegin("testCustomSitConfigOverrides");
@@ -533,7 +615,7 @@ public void testCustomSitConfigOverrides() throws Exception {
533615
testBasicUseCases(domain12);
534616
// testAdvancedUseCasesForADomain(operator1, domain11);
535617
testCompletedSuccessfully = true;
536-
logger.info("SUCCESS - testCustomSitConfigOverrides");
618+
537619
} finally {
538620
Files.copy(
539621
new File(createDomainScriptDir + "/create-domain.py.bak").toPath(),
@@ -543,6 +625,7 @@ public void testCustomSitConfigOverrides() throws Exception {
543625
domain12.destroy();
544626
}
545627
}
628+
logger.info("SUCCESS - testCustomSitConfigOverrides");
546629
}
547630

548631
private Domain testAdvancedUseCasesForADomain(Operator operator, Domain domain) throws Exception {

integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,13 @@ public void verifyWebAppLoadBalancing(String webappName) throws Exception {
322322
"webapp is not deployed as exposeAdminT3Channel is false, can not verify loadbalancing");
323323
}
324324
}
325-
325+
/**
326+
* call webapp and verify load balancing by checking server name in the response
327+
*
328+
* @param webappName
329+
* @param verifyLoadBalance
330+
* @throws Exception
331+
*/
326332
public void callWebAppAndVerifyLoadBalancing(String webappName, boolean verifyLoadBalance)
327333
throws Exception {
328334
if (!loadBalancer.equals("NONE")) {
@@ -362,7 +368,7 @@ public void callWebAppAndVerifyLoadBalancing(String webappName, boolean verifyLo
362368
}
363369

364370
/**
365-
* startup the domain
371+
* create domain crd
366372
*
367373
* @throws Exception
368374
*/
@@ -390,7 +396,7 @@ public void create() throws Exception {
390396
}
391397

392398
/**
393-
* shutdown the domain
399+
* delete domain crd using yaml
394400
*
395401
* @throws Exception
396402
*/
@@ -411,6 +417,11 @@ public void destroy() throws Exception {
411417
verifyDomainDeleted(replicas);
412418
}
413419

420+
/**
421+
* delete domain using domain name
422+
*
423+
* @throws Exception
424+
*/
414425
public void shutdown() throws Exception {
415426
int replicas = TestUtils.getClusterReplicas(domainUid, clusterName, domainNS);
416427
String cmd = "kubectl delete domain " + domainUid + " -n " + domainNS;
@@ -424,6 +435,11 @@ public void shutdown() throws Exception {
424435
verifyDomainDeleted(replicas);
425436
}
426437

438+
/**
439+
* shutdown domain by setting serverStartPolicy to NEVER
440+
*
441+
* @throws Exception
442+
*/
427443
public void shutdownUsingServerStartPolicy() throws Exception {
428444
int replicas = TestUtils.getClusterReplicas(domainUid, clusterName, domainNS);
429445
String cmd =
@@ -454,6 +470,12 @@ public void verifyDomainDeleted(int replicas) throws Exception {
454470
verifyServerPodsDeleted(replicas);
455471
}
456472

473+
/**
474+
* verify server pods are deleted
475+
*
476+
* @param replicas
477+
* @throws Exception
478+
*/
457479
public void verifyServerPodsDeleted(int replicas) throws Exception {
458480
TestUtils.checkPodDeleted(domainUid + "-" + adminServerName, domainNS);
459481
for (int i = 1; i <= replicas; i++) {
@@ -465,6 +487,11 @@ public Map<String, Object> getDomainMap() {
465487
return domainMap;
466488
}
467489

490+
/**
491+
* delete PVC and check PV status released when weblogicDomainStorageReclaimPolicy is Recycle
492+
*
493+
* @throws Exception
494+
*/
468495
public void deletePVCAndCheckPVReleased() throws Exception {
469496
StringBuffer cmd = new StringBuffer("kubectl get pv ");
470497
String pvBaseName = (String) pvMap.get("baseName");
@@ -485,7 +512,11 @@ public void deletePVCAndCheckPVReleased() throws Exception {
485512
logger.info("PV is released when PVC is deleted");
486513
}
487514
}
488-
515+
/**
516+
* create domain on existing directory
517+
*
518+
* @throws Exception
519+
*/
489520
public void createDomainOnExistingDirectory() throws Exception {
490521
String domainStoragePath = domainMap.get("weblogicDomainStoragePath").toString();
491522
String domainDir = domainStoragePath + "/domains/" + domainMap.get("domainUID").toString();
@@ -507,7 +538,11 @@ public void createDomainOnExistingDirectory() throws Exception {
507538
}
508539
throw new RuntimeException("FAIL: unexpected result, create domain job did not report error");
509540
}
510-
541+
/**
542+
* access admin console using load balancer web port for Apache load balancer
543+
*
544+
* @throws Exception
545+
*/
511546
public void verifyAdminConsoleViaLB() throws Exception {
512547
if (!loadBalancer.equals("APACHE")) {
513548
logger.info("This check is done only for APACHE load balancer");
@@ -554,7 +589,11 @@ public void verifyAdminConsoleViaLB() throws Exception {
554589
public String getDomainUid() {
555590
return domainUid;
556591
}
557-
592+
/**
593+
* test liveness probe for managed server 1
594+
*
595+
* @throws Exception
596+
*/
558597
public void testWlsLivenessProbe() throws Exception {
559598

560599
// test managed server1 pod auto restart

0 commit comments

Comments
 (0)