Skip to content

Commit 2351af5

Browse files
committed
Merge remote-tracking branch 'origin/develop' into domain-introspector
Merge Ryan's latest changes from develop
2 parents 1e82a5b + d6b4d1b commit 2351af5

File tree

12 files changed

+412
-3
lines changed

12 files changed

+412
-3
lines changed

kubernetes/samples/charts/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Weblogic operator supports three types load balancers: TRAEFIK, VOYAGER, APACHE. We provide samples for each type to demostrate how to install and configure load balancer. Samples are located in following folders:
2+
traefik
3+
voyager
4+
ingress-per-domain
5+
apache-samples
6+
Note: apache-webtier is helm chart. It is used in apache-samples.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Apache Load Balancer custom sample
2+
In this sample, we will configure Apache webtier as a load balancer for multiple WebLogic domains using custom configuration. We will demonstrate how to use Apache webtier to handle traffic to the multiple backend WebLogic domains.
3+
4+
## 1. Create Namespace
5+
In this sample, both Apache webtier and WebLogic domain instances are located in the namespace `apache-sample`.
6+
```
7+
$ kubectl create namespace apache-sample
8+
```
9+
10+
## 2. Create WebLogic Domains
11+
Now we need to prepare some backends for Apache webtier to do load balancing. Please refer the sample https://github.com/oracle/weblogic-kubernetes-operator/tree/develop/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv to create two WebLogic domains under the namespace `apache-sample`.
12+
13+
The first domain uses the following custom configuration parameters:
14+
- namespace: apache-sample
15+
- domainUID: domain1
16+
- clusterName: cluster-1
17+
- adminServerName: admin-server
18+
- adminPort: 7001
19+
- adminNodePort: 30701
20+
- managedServerPort: 8001
21+
22+
The second domain uses the following custom configuration parameters:
23+
- namespace: apache-sample
24+
- domainUID: domain2
25+
- clusterName: cluster-1
26+
- adminServerName: admin-server
27+
- adminPort: 7011
28+
- adminNodePort: 30702
29+
- managedServerPort: 8021
30+
31+
After the domains are successfully created, deploy the sample web application testwebapp.war on each domain cluster through the admin console. The sample web application is located in the kubernetes/samples/charts/application directory.
32+
33+
## 3. Build Apache Webtier Docker Image
34+
Please refer the sample https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-webtier-apache to build Apache webtier docker image.
35+
36+
## 4. Provide Custom Apache Plugin Configuration
37+
In this sample we will provide custom Apache plugin configuration to fine tune the behavior of Apache.
38+
- Create a custom Apache plugin configuration file named `custom_mod_wl_apache.conf`. The file content is similar as below.
39+
```
40+
# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
41+
#
42+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
43+
#
44+
45+
<IfModule mod_weblogic.c>
46+
WebLogicHost ${WEBLOGIC_HOST}
47+
WebLogicPort ${WEBLOGIC_PORT}
48+
</IfModule>
49+
50+
# Directive for weblogic admin Console deployed on Weblogic Admin Server
51+
<Location /console>
52+
SetHandler weblogic-handler
53+
WebLogicHost domain1-admin-server
54+
WebLogicPort ${WEBLOGIC_PORT}
55+
</Location>
56+
57+
# Directive for all application deployed on weblogic cluster with a prepath defined by LOCATION variable
58+
# For example, if the LOCAITON is set to '/weblogic', all applications deployed on the cluster can be accessed via
59+
# http://myhost:myport/weblogic/application_end_url
60+
# where 'myhost' is the IP of the machine that runs the Apache web tier, and
61+
# 'myport' is the port that the Apache web tier is publicly exposed to.
62+
# Note that LOCATION cannot be set to '/' unless this is the only Location module configured.
63+
<Location /weblogic1>
64+
WLSRequest On
65+
WebLogicCluster domain1-cluster-cluster-1:8001
66+
PathTrim /weblogic1
67+
</Location>
68+
69+
# Directive for all application deployed on weblogic cluster with a prepath defined by LOCATION2 variable
70+
# For example, if the LOCAITON2 is set to '/weblogic2', all applications deployed on the cluster can be accessed via
71+
# http://myhost:myport/weblogic2/application_end_url
72+
# where 'myhost' is the IP of the machine that runs the Apache web tier, and
73+
# 'myport' is the port that the Apache webt ier is publicly exposed to.
74+
<Location /weblogic2>
75+
WLSRequest On
76+
WebLogicCluster domain2-cluster-cluster-1:8021
77+
PathTrim /weblogic2
78+
</Location>
79+
```
80+
- Place the `custom_mod_wl_apache.conf` file in a local directory `<host-config-dir>` on the host machine.
81+
82+
## 5. Prepare Your Own Certificate and Private Key
83+
In production, Oracle strongly recommends that you provide your own certificates. Run following commands to to generate your own certificate and private key using openssl.
84+
```
85+
$ cd kubernetes/samples/charts/apache-samples/custom-sample
86+
$ export VIRTUAL_HOST_NAME=apache-sample-host
87+
$ export SSL_CERT_FILE=apache-sample.crt
88+
$ export SSL_CERT_KEY_FILE=apache-sample.key
89+
$ sh certgen.sh
90+
```
91+
92+
## 6. Prepare the Input Values for Apache Webtier Helm Chart
93+
Run following commands to prepare the input value file for Apache webtier helm chart.
94+
```
95+
$ base64 -i ${SSL_CERT_FILE} | tr -d '\n'
96+
$ base64 -i ${SSL_CERT_KEY_FILE} | tr -d '\n'
97+
$ touch input.yaml
98+
```
99+
Edit the input parameters file `input.yaml`, the file content is similar as below.
100+
```
101+
# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
102+
#
103+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
104+
105+
# Use this to provide your own Apache webtier configuration as needed; simply define this
106+
# path and put your own custom_mod_wl_apache.conf file under this path.
107+
volumePath: <host-config-dir>
108+
109+
# The VirtualHostName of the Apache HTTP server. It is used to enable custom SSL configuration.
110+
virtualHostName: apache-sample-host
111+
112+
# The customer supplied certificate to use for Apache webtier SSL configuration.
113+
# The value must be a string containing a base64 encoded certificate. Run following command to get it.
114+
# base64 -i ${SSL_CERT_FILE} | tr -d '\n'
115+
customCert: <cert_data>
116+
117+
# The customer supplied private key to use for Apache webtier SSL configuration.
118+
# The value must be a string containing a base64 encoded key. Run following command to get it.
119+
# base64 -i ${SSL_KEY_FILE} | tr -d '\n'
120+
customKey: <key_data>
121+
```
122+
123+
## 7. Install Apache Webtier Helm Chart
124+
Apache webtier helm chart is located in kubernetes/samples/charts/apache-webtier directory. Install Apache webtier helm chart to apache-sample namespace with specified input parameters:
125+
```
126+
$ cd kubernetes/samples/charts
127+
$ helm install --name my-release --values apache-samples/custom-sample/input.yaml --namespace apache-sample apache-webtier
128+
```
129+
130+
## 8. Run the Sample Application
131+
Now you can send requests to different WebLogic domains with the unique entry point of Apache with different path. Alternatively, you can access the URLs in a web browser.
132+
```
133+
$ curl --silent http://${HOSTNAME}:30305/weblogic1/testwebapp/
134+
$ curl --silent http://${HOSTNAME}:30305/weblogic2/testwebapp/
135+
```
136+
You can also use SSL URLs to send requests to different WebLogic domains. Access the SSL URL via the curl command or a web browser.
137+
```
138+
$ curl -k --silent https://${HOSTNAME}:30443/weblogic1/testwebapp/
139+
$ curl -k --silent https://${HOSTNAME}:30443/weblogic2/testwebapp/
140+
```
141+
142+
## 9. Uninstall Apache Webtier
143+
```
144+
$ helm delete --purge my-release
145+
```
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/sh
2+
#
3+
# Since: June, 2018
4+
5+
# Description: script to start Apache HTTP Server
6+
#
7+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8+
#
9+
# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
10+
#
11+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
12+
13+
# Generated configuration file
14+
CONFIG_FILE="config.txt"
15+
16+
cat > $CONFIG_FILE <<-EOF
17+
[req]
18+
default_bits = 2048
19+
prompt = no
20+
default_md = sha256
21+
req_extensions=v3_req
22+
extensions=v3_req
23+
distinguished_name = dn
24+
25+
[dn]
26+
C = US
27+
ST = CA
28+
L = Redwood Shores
29+
O = Oracle Corporation
30+
OU = Apache HTTP Server With Plugin
31+
CN = $VIRTUAL_HOST_NAME
32+
33+
[v3_req]
34+
subjectAltName = @alt_names
35+
[alt_names]
36+
DNS.1 = $VIRTUAL_HOST_NAME
37+
DNS.2 = $VIRTUAL_HOST_NAME.us.oracle.com
38+
DNS.3 = $VIRTUAL_HOST_NAME.cloud.oracle.com
39+
DNS.4 = *.$VIRTUAL_HOST_NAME
40+
DNS.5 = localhost
41+
EOF
42+
43+
echo "Generating certs for $VIRTUAL_HOST_NAME"
44+
45+
# Generate our Private Key, CSR and Certificate
46+
# Use SHA-2 as SHA-1 is unsupported from Jan 1, 2017
47+
48+
openssl req -x509 -newkey rsa:2048 -sha256 -nodes -keyout "$SSL_CERT_KEY_FILE" -days 3650 -out "$SSL_CERT_FILE" -config "$CONFIG_FILE"
49+
50+
# OPTIONAL - write an info to see the details of the generated crt
51+
openssl x509 -noout -fingerprint -text < "$SSL_CERT_FILE" > "$SSL_CERT_FILE.info"
52+
# Protect the key
53+
chmod 400 "$SSL_CERT_KEY_FILE"
54+
chmod 400 "$SSL_CERT_FILE.info"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
4+
#
5+
6+
<IfModule mod_weblogic.c>
7+
WebLogicHost ${WEBLOGIC_HOST}
8+
WebLogicPort ${WEBLOGIC_PORT}
9+
</IfModule>
10+
11+
# Directive for weblogic admin Console deployed on Weblogic Admin Server
12+
<Location /console>
13+
SetHandler weblogic-handler
14+
WebLogicHost domain1-admin-server
15+
WebLogicPort ${WEBLOGIC_PORT}
16+
</Location>
17+
18+
# Directive for all application deployed on weblogic cluster with a prepath defined by LOCATION variable
19+
# For example, if the LOCAITON is set to '/weblogic', all applications deployed on the cluster can be accessed via
20+
# http://myhost:myport/weblogic/application_end_url
21+
# where 'myhost' is the IP of the machine that runs the Apache web tier, and
22+
# 'myport' is the port that the Apache web tier is publicly exposed to.
23+
# Note that LOCATION cannot be set to '/' unless this is the only Location module configured.
24+
<Location /weblogic1>
25+
WLSRequest On
26+
WebLogicCluster domain1-cluster-cluster-1:8001
27+
PathTrim /weblogic1
28+
</Location>
29+
30+
# Directive for all application deployed on weblogic cluster with a prepath defined by LOCATION2 variable
31+
# For example, if the LOCAITON2 is set to '/weblogic2', all applications deployed on the cluster can be accessed via
32+
# http://myhost:myport/weblogic2/application_end_url
33+
# where 'myhost' is the IP of the machine that runs the Apache web tier, and
34+
# 'myport' is the port that the Apache webt ier is publicly exposed to.
35+
<Location /weblogic2>
36+
WLSRequest On
37+
WebLogicCluster domain2-cluster-cluster-1:8021
38+
PathTrim /weblogic2
39+
</Location>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
4+
5+
# Use this to provide your own Apache webtier configuration as needed; simply define this
6+
# path and put your own custom_mod_wl_apache.conf file under this path.
7+
volumePath: <host-config-dir>
8+
9+
# The VirtualHostName of the Apache HTTP server. It is used to enable custom SSL configuration.
10+
virtualHostName: apache-sample-host
11+
12+
# The customer supplied certificate to use for Apache webtier SSL configuration.
13+
# The value must be a string containing a base64 encoded certificate. Run following command to get it.
14+
# base64 -i ${SSL_CERT_FILE} | tr -d '\n'
15+
customCert: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURxakNDQXBJQ0NRQ0w2Q2JwRWZ6QnB6QU5CZ2txaGtpRzl3MEJBUXNGQURDQmxqRUxNQWtHQTFVRUJoTUMKVlZNeEN6QUpCZ05WQkFnTUFrTkJNUmN3RlFZRFZRUUhEQTVTWldSM2IyOWtJRk5vYjNKbGN6RWJNQmtHQTFVRQpDZ3dTVDNKaFkyeGxJRU52Y25CdmNtRjBhVzl1TVNjd0pRWURWUVFMREI1QmNHRmphR1VnU0ZSVVVDQlRaWEoyClpYSWdWMmwwYUNCUWJIVm5hVzR4R3pBWkJnTlZCQU1NRW1Gd1lXTm9aUzF6WVcxd2JHVXRhRzl6ZERBZUZ3MHgKT0RFe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DNEaHR1NW90UW4zZTdGaGNRRHhDelN6SldkUTRJTFh4SExsTVBkeHpRN1NwTzVySERGeAo0eEd6dkNHRkMwSlhBZ2w4dFhvR3dUYkpDR1hxYWV2cUIrNXVLY1NpSUo2M2dhQk1USytjUmF5MkR4L1dwcEdBClZWTnJsTWs4TEVQT1VSN2RZMm0xT3RaU1hCckdib3QwQjNEUG9yRkNpeVF5Q20vd0FYMFk0Z0hiMlNmcitOeFoKQkppb2VXajZ6ZGFvU3dPZkwxd2taWlJjVGtlZlZyZXdVRjZRQ3BCcAotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
16+
17+
# The customer supplied private key to use for Apache webtier SSL configuration.
18+
# The value must be a string containing a base64 encoded key. Run following command to get it.
19+
# base64 -i ${SSL_KEY_FILE} | tr -d '\n'
20+
customKey: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2Z0lCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktnd2dnU2tBZ0VBQW9JQkFRREtsUm5YZGJLYW9TQWcKVTFUb0tScmdrQ1BXb3pOL0U1cHcwZ3hRa002eDRxTy9jMXVNaWdyY0RUNms1NFBjNzJreW9TcmVySjZJRXdxQgpNUFFNZGpuOFlGWnpFVCs0R3RrejRMeXZMQVJqMEQzSnhhU0RISGtDTWRMbCswclJlSUE0MTZDQkc2MFRSSTIxCitkL3M0Q21MNnhJamtVK3c1Njk1OFZYYWZZWS96aVd3SXpyQnlvcXEwbkw2bnovRk1FbTZZdHgySDlabHNvVXYKdkp6VVVydFBuQTVUVERMK0NCaFQwU2c2WTZ6dlFJOW1LRWtLU3hlVEJhMElFY2NEUmRzN1hOZmRSaSsyTEZ6UwpoN3VGaWJDaXgvSTlneVNIOXIrTlZ6VmtkbXlla0M5dGpxUk1uWnhZQ1Jlc29yNVdEMTF1UmQ0NXdBUTJ3YVRiCitxcXBOdzFaQWdNQkFBRUNnZ0VCQUtPKzR4VnFHRVN1aWxZMnBVSEd2K2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dzZmFlOXA3dThVQm0KZm9mNDg5WkNuV2pYb3hGUFYzYTNWOW92RlBSQUdSUGMwT0FpaWJQZWRIcGk0MHc1YlRrTnZsR0RTd0tCZ1FESApubWk2eUR2WDZ5dmowN2tGL2VYUkNIK0NHdm1oSEZremVoRXNwYWtSbkg5dFJId2UxMEtnZUhqODNnVDVURGZzCis3THBGbklsa29JS1A2czdVN1JWV2tsTnErSENvRW9adGw5NGNjUC9WSmhnOU1iZWhtaUQwNFRHUVZvUjFvTHgKb1YyZEJQUFBBRDRHbDVtTjh6RGcwNXN4VUhKOUxPckxBa3VNR01NdlVRS0JnQ2RUUGgwVHRwODNUUVZFZnR3bwpuSGVuSEQzMkhrZkR0MTV4Wk84NVZGcTlONVg2MjB2amZKNkNyVnloS1RISllUREs1N2owQ3Z2STBFTksxNytpCi9yaXgwVlFNMTBIMFFuTkZlb0pmS0VITHhXb2czSHVBSVZxTEg4NmJwcytmb25nOCtuMGgvbk5NZUZNYjdSNUMKdmFHNEVkc0VHV0hZS2FiL2lzRlowUVU0Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Apache Load Balancer default sample
2+
In this sample, we will configure Apache webtier as a load balancer for WebLogic domain using the default configuration. We will demonstrate how to use Apache webtier to handle traffic to the backend WebLogic domain.
3+
4+
## 1. Create WebLogic Domain
5+
Now we need to prepare backend for Apache webtier to do load balancing. Please refer the sample https://github.com/oracle/weblogic-kubernetes-operator/tree/develop/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv to create a WebLogic domain. Keep the default values for the following configuration parameters:
6+
- namespace: default
7+
- domainUID: domain1
8+
- clusterName: cluster-1
9+
- adminServerName: admin-server
10+
- adminPort: 7001
11+
- managedServerPort: 8001
12+
13+
After the domain is successfully created, deploy the sample web application testwebapp.war on the domain cluster through the admin console. The sample web application is located in the kubernetes/samples/charts/application directory.
14+
15+
## 2. Build Apache Webtier Docker Image
16+
Please refer the sample https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-webtier-apache to build Apache webtier docker image.
17+
18+
## 3. Install Apache Webtier with Helm Chart
19+
Apache webtier helm chart is located at https://github.com/oracle/weblogic-kubernetes-operator/blob/develop/kubernetes/samples/charts/apache-webtier.
20+
Install Apache webtier helm chart to default namespace with default settings:
21+
```
22+
$ cd kubernetes/samples/charts
23+
$ helm install --name my-release apache-webtier
24+
```
25+
26+
## 4. Run the sample application
27+
Now you can send request to WebLogic domain with the unique entry point of Apache. Alternatively, you can access the URL in a web browser.
28+
```
29+
$ curl --silent http://${HOSTNAME}:30305/weblogic/testwebapp/
30+
```
31+
You can also use SSL URL to send request to WebLogic domain. Access the SSL URL via the curl command or a web browser.
32+
```
33+
$ curl -k --silent https://${HOSTNAME}:30443/weblogic/testwebapp/
34+
```
35+
36+
## 5. Uninstall Apache Webtier
37+
```
38+
$ helm delete --purge my-release
39+
```

kubernetes/samples/charts/apache-webtier/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The command deploys Apache HTTP Server on the Kubernetes cluster in the default
3535
To uninstall/delete the `my-release`:
3636

3737
```console
38-
$ helm delete my-release
38+
$ helm delete --purge my-release
3939
```
4040

4141
The command removes all the Kubernetes components associated with the chart and deletes the release.
@@ -55,6 +55,15 @@ The following table lists the configurable parameters of the Apache webtier char
5555
| `createRBAC` | Boolean indicating if RBAC resources should be created | `true` |
5656
| `httpNodePort` | NodePort to expose for http access | `30305` |
5757
| `httpsNodePort` | NodePort to expose for https access | `30443` |
58+
| `virtualHostName` | The VirtualHostName of the Apache HTTP server | `` |
59+
| `customCert` | The customer supplied certificate | `` |
60+
| `customKey` | The customer supplied private key | `` |
61+
| `domainUID` | Unique ID identifying a domain | `domain1` |
62+
| `clusterName` | Cluster name | `cluster-1` |
63+
| `adminServerName` | Name of the admin server | `admin-server` |
64+
| `adminPort` | Port number for admin server | `7001` |
65+
| `managedServerPort` | Port number for each managed server | `8001` |
66+
| `location` | Prepath for all application deployed on WebLogic cluster | `/weblogic` |
5867

5968
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:
6069

0 commit comments

Comments
 (0)