You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/README.md
+30-19Lines changed: 30 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,23 @@ The sample scripts demonstrate the creation of a WebLogic domain home in a Docke
7
7
Before you begin, read this guide, [Domain Resource](../../../../../site/domain-resource.md)
8
8
9
9
The following prerequisites must be handled prior to running the create domain script:
10
-
* The WDT sample requires that JAVA_HOME is set to a java JDK version 1.8 or greater
11
-
* Make sure the WebLogic operator is running.
12
-
* The operator requires WebLogic Server 12.2.1.3.0 with patch 28076014 applied. Refer to [Weblogic Docker images](../../../../../site/weblogic-docker-images.md) for details on how to create one. If a different `domainHomeImageBase` (see Configuration table below) is specified, the specified image needs to be built locally or pulled from a repository.
10
+
* The WDT sample requires that `JAVA_HOME` is set to a Java JDK version 1.8 or later.
11
+
* Make sure that the WebLogic operator is running.
12
+
* The operator requires WebLogic Server 12.2.1.3.0 with patch 28076014 applied. Refer to [WebLogic Docker images](../../../../../site/weblogic-docker-images.md) for details on how to create one. If a different `domainHomeImageBase` (see Configuration table below) is specified, the specified image needs to be built locally or pulled from a repository.
13
13
* Create a Kubernetes namespace for the domain unless the intention is to use the default namespace.
14
14
* If logHomeOnPV is enabled, create the Kubernetes persistent volume where the log home will be hosted, and the Kubernetes persistent volume claim for the domain in the same Kubernates namespace. For samples to create a PV and PVC, see [Create sample PV and PVC](../../create-weblogic-domain-pv-pvc/README.md).
15
-
* Create the Kubernetes secrets `username` and `password` of the admin account in the same Kubernetes namespace as the domain.
15
+
* Create a Kubernetes secret for the WebLogic administrator credentials that contains the fields `username` and `password`, and make sure that the secret name matches the value specified for `weblogicCredentialsSecretName` (see Configuration table below). For example:
16
+
17
+
```
18
+
$ cd ./kubernetes/samples/scripts/create-weblogic-domain-credentials
19
+
$ create-weblogic-credentials.sh
20
+
-u weblogic
21
+
-p welcome1
22
+
-d domain1
23
+
-n default
24
+
-s domain1-weblogic-credentials
25
+
```
26
+
**NOTE**: Then make sure to configure `weblogicCredentialsSecretName` to be `domain1-weblogic-credentials`.
16
27
17
28
## Use the script to create a domain
18
29
@@ -30,7 +41,7 @@ The script will perform the following steps:
30
41
31
42
* Create a directory for the generated properties and Kubernetes YAML files for this domain if it does not already exist. The pathname is `/path/to/weblogic-operator-output-directory/weblogic-domains/<domainUID>`. If the directory already exists, its contents will be removed.
32
43
* Create a properties file, `domain.properties`, in the directory that is created above. This properties file will be used to create a sample WebLogic Server domain.
33
-
* Clone the weblogic docker-images project into the current directory using `git clone https://github.com/oracle/docker-images.git`.
44
+
* Clone the WebLogic docker-images project into the current directory using `git clone https://github.com/oracle/docker-images.git`.
34
45
* Replace the built-in user name and password in the `properties/docker-build/domain_security.properties` file with the `username` and `password` that are supplied on the command line using the `-u` and `-p` options. These credentials need to match the WebLogic domain admin credentials in the secret that is specified via the `weblogicCredentialsSecretName` property in the `create-domain-inputs.yaml` file.
35
46
* Build a Docker image based on the Docker sample, [Example Image with a WebLogic Server Domain using the Oracle WebLogic Deploy Tooling (WDT)](https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-domain-home-in-image-wdt) and [Example Image with a WebLogic Server Domain using WLST](https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-domain-home-in-image). It will create a sample WebLogic Server domain in the Docker image. Also, you can run the Docker sample, [Example Image with a WebLogic Server Domain](https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-domain-home-in-image), manually with the generated `domain.properties` to create a domain home image. **Note**: Oracle recommends keeping the domain home image private in the local repository.
36
47
* Create a tag that refers to the generated Docker image.
@@ -39,9 +50,9 @@ The script will perform the following steps:
As a convenience, using the `-e` option, the script can optionally create the domain object, which in turn results in the creation of the corresponding WebLogic Server pods and services. This option should only be used in a single node Kubernetes cluster.
53
+
As a convenience, using the `-e` option, the script can optionally create the domain object, which in turn results in the creation of the corresponding WebLogic Server pods and services. This option should be used in a single node Kubernetes cluster only.
43
54
44
-
For a multi-node Kubernetes cluster, make sure that the generated image is available on all nodes before creating the domain resource using the kubectl apply -f command.
55
+
For a multi-node Kubernetes cluster, make sure that the generated image is available on all nodes before creating the domain resource using the `kubectl apply -f` command.
-o Ouput directory for the generated properties and YAML files, must be specified.
53
-
-u Username used in building the Docker image for WebLogic domain in image.
64
+
-u User name used in building the Docker image for WebLogic domain in image.
54
65
-p Password used in building the Docker image for WebLogic domain in image.
55
66
-e Also create the resources in the generated YAML files, optional.
56
67
-v Validate the existence of persistentVolumeClaim, optional.
57
68
-k Keep what has been previously cloned from https://github.com/oracle/docker-images.git, optional.
58
-
If not specified, this script will always remove existing project and clone again.
69
+
If not specified, this script will always remove the existing project and clone again.
59
70
-h Help
60
71
61
72
```
@@ -70,11 +81,11 @@ The default domain created by the script has the following characteristics:
70
81
* No applications deployed.
71
82
* A T3 channel.
72
83
73
-
If you run the sample from a machine that is remote to the Kubernetes cluster, and you need to push the new image to a registry that is local to the cluster, you need to do the following (also see the `image` property in the table in the next section):
74
-
* Set the `image` property in the inputs file to the target image name (including the registry hostname/port and the tag if needed).
84
+
If you run the sample from a machine that is remote to the Kubernetes cluster, and you need to push the new image to a registry that is local to the cluster, you need to do the following (also see the `image` property in the Configuration parameters table in the next section):
85
+
* Set the `image` property in the inputs file to the target image name (including the registry hostname/port and the tag, if needed).
75
86
* Run the `create-domain.sh` script without the `-e` option.
@@ -93,16 +104,16 @@ The following parameters can be provided in the inputs file.
93
104
|`clusterName`| Name of the WebLogic cluster instance to generate for the domain. |`cluster-1`|
94
105
|`clusterType`| Type of the WebLogic Cluster. Legal values are `CONFIGURED` or `DYNAMIC`. |`DYNAMIC`|
95
106
|`configuredManagedServerCount`| Number of Managed Server instances to generate for the domain. |`5`|
96
-
|`domainHomeImageBase`| Base WebLogic binary image used to build the WebLogic domain image. The operator requires WebLogic Server 12.2.1.3.0 with patch 28076014 applied. Refer to [Weblogic Docker images](../../../../../site/weblogic-docker-images.md) for details on how to create one. If a different `domainHomeImageBase`(see Configuration table below) is specified, the specified image needs to be built locally or pulled from a repository before the `create-domain.sh` script is executed. ||
97
-
|`domainHomeImageBuildPath`| Location of the WebLogic "domain home in image" Docker image in `https://github.com/oracle/docker-images.git` project. If not specified, use "./docker-images/OracleWebLogic/samples/12213-domain-home-in-image-wdt". Another possible value is "./docker-images/OracleWebLogic/samples/12213-domain-home-in-image" which uses WLST scripts, instead of WDT, to generate the domain configuration. |`./docker-images/OracleWebLogic/samples/12213-domain-home-in-image-wdt`|
107
+
|`domainHomeImageBase`| Base WebLogic binary image used to build the WebLogic domain image. The operator requires WebLogic Server 12.2.1.3.0 with patch 28076014 applied. Refer to [Weblogic Docker images](../../../../../site/weblogic-docker-images.md) for details on how to create one. If a different `domainHomeImageBase` is specified, the specified image needs to be built locally or pulled from a repository before the `create-domain.sh` script is executed. ||
108
+
|`domainHomeImageBuildPath`| Location of the WebLogic "domain home in image" Docker image in `https://github.com/oracle/docker-images.git` project. If not specified, use `./docker-images/OracleWebLogic/samples/12213-domain-home-in-image-wdt`. Another possible value is `./docker-images/OracleWebLogic/samples/12213-domain-home-in-image` which uses WLST scripts, instead of WDT, to generate the domain configuration. |`./docker-images/OracleWebLogic/samples/12213-domain-home-in-image-wdt`|
98
109
|`domainPVMountPath`| Mount path of the domain persistent volume. |`/shared`|
99
110
|`domainUID`| Unique ID that will be used to identify this particular domain. Used as the name of the generated WebLogic domain as well as the name of the Kubernetes domain resource. This ID must be unique across all domains in a Kubernetes cluster. This ID cannot contain any character that is not valid in a Kubernetes service name. |`domain1`|
100
111
|`exposeAdminNodePort`| Boolean indicating if the Administration Server is exposed outside of the Kubernetes cluster. |`false`|
101
112
|`exposeAdminT3Channel`| Boolean indicating if the T3 administrative channel is exposed outside the Kubernetes cluster. |`false`|
102
-
|`image`| WebLogic Docker image that the domain resource will pull if needed. You only need to specify this if you are going to tag the generated image to a different name. If you run the sample script from a machine that is remote to the Kubernetes cluster, you need to specify this to point to an image in a registry local to the cluster, and then push the generate image to that registry before starting the domain. If not specified, the sample uses the internally generated image name, either "domain-home-in-image:latest" or "domain-home-in-image-wdt:latest". ||
103
-
|`imagePullPolicy`| WebLogic Docker image pull policy. Legal values are "IfNotPresent", "Always", or "Never"|`IfNotPresent`|
104
-
|`imagePullSecretName`| Name of the Kubernetes secret to access the Docker Store to pull the WebLogic Server Docker image. The presence of the secret will be validated when this parameter is specified ||
105
-
|`includeServerOutInPodLog`| Boolean indicating whether to include server.out to the pod's stdout. |`true`|
113
+
|`image`| WebLogic Docker image that the domain resource will pull if needed. You need to specify this only if you are going to tag the generated image to a different name. If you run the sample script from a machine that is remote to the Kubernetes cluster, you need to specify this to point to an image in a registry local to the cluster, and then push the generated image to that registry before starting the domain. If not specified, the sample uses the internally generated image name, either `domain-home-in-image:latest` or `domain-home-in-image-wdt:latest`. ||
114
+
|`imagePullPolicy`| WebLogic Docker image pull policy. Legal values are `IfNotPresent`, `Always`, or `Never`.|`IfNotPresent`|
115
+
|`imagePullSecretName`| Name of the Kubernetes secret to access the Docker Store to pull the WebLogic Server Docker image. The presence of the secret will be validated when this parameter is specified.||
116
+
|`includeServerOutInPodLog`| Boolean indicating whether to include `server.out` to the pod's stdout. |`true`|
106
117
|`initialManagedServerReplicas`| Number of Managed Servers to initially start for the domain. |`2`|
107
118
|`javaOptions`| Java options for starting the Administration and Managed Servers. A Java option can have references to one or more of the following pre-defined variables to obtain WebLogic domain information: `$(DOMAIN_NAME)`, `$(DOMAIN_HOME)`, `$(ADMIN_NAME)`, `$(ADMIN_PORT)`, and `$(SERVER_NAME)`. |`-Dweblogic.StdoutDebugEnabled=false`|
108
119
|`logHomeOnPV`| Specifies whether the log home is stored on the persistent volume. |`false`|
0 commit comments