Skip to content

Commit c6f780f

Browse files
committed
operator 1.0 style helm charts for weblogic domain
1 parent 7f66008 commit c6f780f

17 files changed

+1468
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright 2017, Oracle Corporation and/or its affiliates. All rights reserved.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
3+
4+
name: weblogic-domain
5+
version: 0.2.0
6+
description: Helm package for creation of Weblogic domain.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Weblogic Domain Helm Chart
2+
This chart creates a single Weblogic domain on a [Kubernetes](https://kubernetes.io/) cluster using the
3+
[Helm](https://github.com/kubernetes/helm) package manager.
4+
5+
## Prerequisites
6+
- Kubernetes 1.7.5+ with Beta APIs enabled
7+
8+
- Install [Helm](https://github.com/kubernetes/helm#install)
9+
10+
- Initialize Helm by installing Tiller, the server portion of Helm, to your Kubernetes cluster
11+
12+
```bash
13+
helm init
14+
```
15+
- Install of the weblogic-operator helm chart
16+
17+
## Creating a Namespace
18+
We recommend that you create a namespace to run your WebLogic Domain(s) in.
19+
You may wish to maintain a one to one relationship between WebLogic Domains
20+
and Kubernetes namespaces, but this is not required. You may run more than
21+
one WebLogic Domain in a single namespace if you wish to.
22+
23+
To create a namespace named `my-namespace`:
24+
25+
```bash
26+
kubectl create namespace my-namespace
27+
```
28+
29+
## Setting a Secret for the Admin Server
30+
You must setup the Admin Server `username` and `password` credentials as a Kubernetes secret.
31+
32+
To create a secret named `my-secret` in the namespace `my-namespace`:
33+
34+
```bash
35+
kubectl create secret generic my-secret --from-literal=username=ADMIN-USERNAME --from-literal=password=ADMIN-PASSWORD --namespace my-namespace
36+
```
37+
In this command, you must replace the uppercase items with your
38+
own values. The secret name will be needed when installing the helm chart.
39+
40+
## Installing the Chart
41+
Clone the git weblogic-operator repo:
42+
43+
```bash
44+
git clone https://github.com/oracle/weblogic-kubernetes-operator.git
45+
```
46+
47+
Change directory to the cloned git weblogic-operator repo:
48+
49+
```bash
50+
cd weblogic-operator/kubernetes/helm-charts
51+
```
52+
53+
To install the chart with the release `my-release`, namespace `my-namespace` and secret `my-secret' without creating a weblogic domain (such as when a WebLogic domain already exists):
54+
55+
```bash
56+
helm install weblogic-domain --name my-release --namespace my-namespace --set secretName=my-secret --set createWeblogicDomain=false
57+
```
58+
59+
The command deploys weblogic-domain on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists
60+
the parameters that can be configured during installation.
61+
62+
> Note: if you do not pass the --name flag, a release name will be auto-generated. You can view releases by running helm list (or helm ls, for short).
63+
64+
65+
## Uninstalling the Chart
66+
To uninstall/delete the `my-release` deployment:
67+
68+
```bash
69+
helm delete --purge my-release
70+
```
71+
72+
The command removes all the Kubernetes components associated with the chart and deletes the release.
73+
74+
## Configuration
75+
| Key | Description | Default |
76+
| -------------------------------|-----------------------------------|-----------------------|
77+
| createWeblogicDomain | Boolean indicating if a weblogic domain should be created | true |
78+
| adminNodePort | NodePort to expose for the admin server | 30701 |
79+
| adminPort | Port number for Admin Server | 7001 |
80+
| adminServerName | Name of the Admin Server | admin-server |
81+
| clusterName | Cluster name | cluster-1 |
82+
| createDomainScript | Script used to create the domain | /u01/weblogic/create-domain-script.sh |
83+
| domainName | Name of the WebLogic domain to create | base_domain |
84+
| domainUid | Unique id identifying a domain. The id must be unique across all domains in a Kubernetes cluster | domain1 |
85+
| exposeAdminT3Channel | Boolean to indicate if the channel should be exposed as a service | false |
86+
| exposeAdminNodePort | Boolean to indicate if the adminNodePort will be exposed | false |
87+
| imagePullSecretName | Name of the Kubernetes secret to access the Docker Store to pull the Weblogic Docker image | |
88+
| loadBalancer | Load balancer to deploy. Supported values are: traefik, none | traefik |
89+
| loadBalancerAdminPort | Load balancer admin port | 30315 |
90+
| loadBalancerWebPort| Load balancer web port | 30305 |
91+
| managedServerCount | Number of managed servers to generate for the domain | 2 |
92+
| managedServerStartCount | Number of managed severs to initially start for a domain | 2 |
93+
| managedServerNameBase | Base string used to generate managed server names | managed-server |
94+
| managedServerPort | Port number for each managed server | 8001 |
95+
| persistencePath | Physical path of the persistent volume storage | /scratch/k8s_dir/persistentVolume001 |
96+
| persistenceSize | Total storage allocated by the persistent volume | 10Gi |
97+
| productionModeEnabled | Boolean indicating if production mode is enabled for the domain | true |
98+
| secretName | Name of the Kubernetes secret for the Admin Server's username and password | domain1-weblogic-credentials |
99+
| t3ChannelPort | Port for the T3Channel of the NetworkAccessPoint | 30012 |
100+
| t3PublicAddress | Public address for T3Channel of the NetworkAccessPoint. This value should be set to the Kubernetes server address, which you can get by running "kubectl cluster-info". If this value is not set to that address, WLST will not be able to connect from outside the Kubernetes cluster | kubernetes |
101+
102+
Specify parameters to override default values using the `--set key=value[,key=value]` argument to helm install. For example:
103+
104+
```bash
105+
helm install weblogic-domain --name my-release --namespace my-namespace --set managedServerCount=3
106+
```
107+
108+
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example:
109+
110+
```bash
111+
helm install weblogic-domain --name my-release --namespace my-namespace --values values.yaml
112+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2017, Oracle Corporation and/or its affiliates. All rights reserved.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
3+
4+
{{/* vim: set filetype=mustache: */}}
5+
{{/*
6+
Expand the name of the chart.
7+
*/}}
8+
{{- define "weblogic-domain.name" -}}
9+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
10+
{{- end -}}
11+
12+
{{/*
13+
Create a default fully qualified app name.
14+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
15+
*/}}
16+
{{- define "weblogic-domain.fullname" -}}
17+
{{- $name := default .Chart.Name .Values.nameOverride -}}
18+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
19+
{{- end -}}

0 commit comments

Comments
 (0)