In this sample, we will configure the Apache webtier as a load balancer for a WebLogic domain using the default configuration. We will demonstrate how to use the Apache webtier to handle traffic to a backend WebLogic domain.
We need to prepare a backend domain for load balancing by the Apache webtier. Refer to the sample, to create a WebLogic domain. Keep the default values for the following configuration parameters:
- namespace:
default
- domainUID:
domain1
- clusterName:
cluster-1
- adminServerName:
admin-server
- adminPort:
7001
- managedServerPort:
8001
After the domain is successfully created, deploy the sample web application, testwebapp.war
, on the domain cluster using the WLS Administration Console. The sample web application is located in the kubernetes/samples/charts/application
directory.
Refer to the sample, to build the Apache webtier Docker image.
The Apache webtier Helm chart is located here. Install the Apache webtier Helm chart into the default namespace with the default settings:
$ cd kubernetes/samples/charts
$ helm install my-release apache-webtier
Now you can send request to the WebLogic domain with the unique entry point of Apache. Alternatively, you can access the URL in a web browser.
$ curl --silent http://${HOSTNAME}:30305/weblogic/testwebapp/
You can also use an SSL URL to send requests to the WebLogic domain. Access the SSL URL via the curl
command or a web browser.
$ curl -k --silent https://${HOSTNAME}:30443/weblogic/testwebapp/
$ helm uninstall my-release