Skip to content

Commit 4621dfb

Browse files
committed
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernetes-operator into develop-feature-disable-hooks
2 parents dfe8339 + aeb3e2c commit 4621dfb

File tree

72 files changed

+2306
-1192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2306
-1192
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ Built with [Wercker](http://www.wercker.com)
44

55
[![wercker status](https://app.wercker.com/status/68ce42623fce7fb2e52d304de8ea7530/m/develop "wercker status")](https://app.wercker.com/project/byKey/68ce42623fce7fb2e52d304de8ea7530)
66

7-
Oracle is finding ways for organizations using WebLogic Server to run important workloads, to move those workloads into the cloud. By certifying on industry standards, such as Docker and Kubernetes, WebLogic now runs in a cloud neutral infrastructure. To enhance WebLogic taking full advantage of Kubernetes, you can persist the WebLogic domain home in a Docker image, making deployment much more portable and improving support for CI/CD deployments.
8-
9-
In addition, we've provided an open-source Oracle WebLogic Server Kubernetes Operator (the “operator”) which has several key features to assist you with deploying and managing WebLogic domains in a Kubernetes environment. You can:
7+
Oracle is finding ways for organizations using WebLogic Server to run important workloads, to move those workloads into the cloud. By certifying on industry standards, such as Docker and Kubernetes, WebLogic now runs in a cloud neutral infrastructure. In addition, we've provided an open-source Oracle WebLogic Server Kubernetes Operator (the “operator”) which has several key features to assist you with deploying and managing WebLogic domains in a Kubernetes environment. You can:
108

119
* Create WebLogic domains on a Kubernetes persistent volume. This persistent volume can reside in an NFS.
1210
* Create a WebLogic domain in a Docker image.
@@ -66,7 +64,7 @@ Use these [scripts and Helm charts](kubernetes/samples/README.md) to install Tra
6664

6765
### Configuring Kibana and Elasticsearch
6866

69-
You can send the operator logs to Elasticsearch, to be displayed in Kibana. Use this [sample script](samples/scripts/elasticsearch_and_kibana.yaml) to configure Elasticsearch and Kibana deployments and services.
67+
You can send the operator logs to Elasticsearch, to be displayed in Kibana. Use this [sample script](kubernetes/samples/scripts/elasticsearch_and_kibana.yaml) to configure Elasticsearch and Kibana deployments and services.
7068

7169
## Create and manage the operator
7270

kubernetes/samples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
* [Sample Traefik Helm chart](charts/traefik/README.md) for setting up a Traefik load balancer for WebLogic clusters.
1414
* [Sample Voyager Helm chart](charts/voyager/README.md) for setting up a Voyager load balancer for WebLogic clusters.
1515
* [Sample Ingress Helm chart](charts/ingress-per-domain/README.md) for setting up a Kubernetes Ingress for each WebLogic cluster using Traefik or Voyager load balancer.
16-
* [Sample Apache Helm chart](charts/apache-webtier/README.md) for setting up a load balancer for WebLogic clusters using the Apache HTTP Server with WebLogic Server Plugins.
16+
* [Sample Apache Helm chart](charts/apache-webtier/README.md) and [Apache samples using the default or custom configurations](charts/apache-samples/README.md) for setting up a load balancer for WebLogic clusters using the Apache HTTP Server with WebLogic Server Plugins.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Apache load balancer samples
2+
3+
The sample package contains two samples that use the [Apache helm chart](../apache-webtier/README.md). The samples use the Docker image for the Apache HTTP Server with the 12.2.1.3.0 Oracle WebLogic Server Proxy Plugin. See the details in [Apache HTTP Server with Oracle WebLogic Server Proxy Plugin on Docker](https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-webtier-apache).
4+
5+
* [The default sample](default-sample/README.md) uses the built-in configuration in the above Docker image.
6+
7+
* [The custom sample](custom-sample/README.md) demonstrates how to customize the configuration of the Apache HTTP Server with the 12.2.1.3.0 Oracle WebLogic Server Proxy Plugins.
8+

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

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
# Apache webtier
2-
The Apache HTTP Server load balancer for WebLogic domains on Kubernetes
3-
4-
## Install
5-
6-
```console
7-
$ helm install apache-webtier
8-
```
9-
10-
## Introduction
11-
12-
This chart bootstraps an Apache HTTP Server deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
1+
# Apache webtier Helm chart
132

3+
This Helm chart bootstraps an Apache HTTP Server deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
4+
5+
The chart depends on the Docker image for the Apache HTTP Server with the 12.2.1.3.0 Oracle WebLogic Server Proxy Plugin. See the details in [Apache HTTP Server with Oracle WebLogic Server Proxy Plugin on Docker](https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-webtier-apache).
146

157
## Prerequisites
168

@@ -26,7 +18,7 @@ To install the chart with the release name `my-release`:
2618
```console
2719
$ helm install --name my-release apache-webtier
2820
```
29-
The command deploys the Apache HTTP Server on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
21+
The command deploys the Apache HTTP Server on the Kubernetes cluster with the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
3022

3123
> **Tip**: List all releases using `helm list`
3224

kubernetes/samples/scripts/create-weblogic-domain-pv-pvc/create-pv-pvc-inputs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ weblogicDomainStorageType: HOST_PATH
2626

2727
# Physical path of the persistent storage.
2828
# The following line must be uncomment and customized:
29-
#weblogicDomainStoragePath: /scratch/k8s_dir
29+
weblogicDomainStoragePath: /scratch/k8s_dir
3030

3131
# Reclaim policy of the persistent storage
3232
# The valid values are: 'Retain', 'Delete', and 'Recycle'

kubernetes/samples/scripts/create-weblogic-domain/create-weblogic-credentials.sh

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88
# The following pre-requisites must be handled prior to running this script:
99
# * The kubernetes namespace must already be created
1010
#
11+
# Secret name determination
12+
# 1) secretName - if specified
13+
# 2) domain1-weblogic-credentials - if secretName and domainUID are both not specified. This is the default out-of-the-box.
14+
# 3) <domainUID>-weblogic-credentials - if secretName is not specified, and domainUID is specified.
15+
# 4) weblogic-credentials - if secretName is not specified, and domainUID is specified as "".
16+
#
17+
# The generated secret will be labeled with
18+
# weblogic.domainUID=$domainUID
19+
# and
20+
# weblogic.domainName=$domainUID
21+
# Where the $domainUID is the value of the -d command line option, unless the value supplied is an empty String ""
22+
#
1123

1224
script="${BASH_SOURCE[0]}"
1325

@@ -27,11 +39,12 @@ function validateKubectlAvailable {
2739
}
2840

2941
function usage {
30-
echo usage: ${script} -u username -p password [-d domainUID] [-n namespace] [-h]
42+
echo usage: ${script} -u username -p password [-d domainUID] [-n namespace] [-s sercretName] [-h]
3143
echo " -u username, must be specified."
3244
echo " -p password, must be specified."
33-
echo " -n namespace, optional."
34-
echo " -d domainUID, optional."
45+
echo " -n namespace, optional. The value is default if not specified"
46+
echo " -d domainUID, optional. The default value is `domain1`. When specified, the secret will be label with the domainUID unless the given value is an empty string."
47+
echo " -s secretName, optional. When not specified, the secret name will be determined based on the domainUID option"
3548
echo " -h Help"
3649
exit $1
3750
}
@@ -41,7 +54,7 @@ function usage {
4154
#
4255
domainUID=domain1
4356
namespace=default
44-
while getopts "hu:p:n:d:" opt; do
57+
while getopts "hu:p:n:d:s:" opt; do
4558
case $opt in
4659
u) username="${OPTARG}"
4760
;;
@@ -51,13 +64,22 @@ while getopts "hu:p:n:d:" opt; do
5164
;;
5265
d) domainUID="${OPTARG}"
5366
;;
67+
s) secretName="${OPTARG}"
68+
;;
5469
h) usage 0
5570
;;
5671
*) usage 1
5772
;;
5873
esac
5974
done
60-
secretName=$domainUID-weblogic-credentials
75+
76+
if [ -z $secretName ]; then
77+
if [ -z $domainUID ]; then
78+
secretName=weblogic-credentials
79+
else
80+
secretName=$domainUID-weblogic-credentials
81+
fi
82+
fi
6183

6284
if [ -z ${username} ]; then
6385
echo "${script}: -u must be specified."
@@ -84,13 +106,15 @@ kubectl -n $namespace create secret generic $secretName \
84106
--from-literal=username=$username \
85107
--from-literal=password=$password
86108

87-
# label the secret with domainUID
88-
kubectl label secret ${secretName} -n $namespace weblogic.domainUID=$domainUID weblogic.domainName=$domainUID
109+
# label the secret with domainUID if needed
110+
if [ ! -z $domainUID ]; then
111+
kubectl label secret ${secretName} -n $namespace weblogic.domainUID=$domainUID weblogic.domainName=$domainUID
112+
fi
89113

90114
# Verify the secret exists
91115
SECRET=`kubectl get secret ${secretName} -n ${namespace} | grep ${secretName} | wc | awk ' { print $1; }'`
92116
if [ "${SECRET}" != "1" ]; then
93117
fail "The secret ${secretName} was not found in namespace ${namespace}"
94118
fi
95119

96-
echo "The secret ${secretName} has been successfully created in namespace ${namespace}"
120+
echo "The secret ${secretName} has been successfully created in the ${namespace} namespace."

0 commit comments

Comments
 (0)