Skip to content

Commit

Permalink
add note for create-domain.sh (#2367)
Browse files Browse the repository at this point in the history
* add note for create-domain.sh
  • Loading branch information
rosemarymarano authored May 18, 2021
1 parent a8cf40d commit 9f237cd
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 43 deletions.
4 changes: 2 additions & 2 deletions documentation/staging/content/quickstart/create-domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ weight: 6

The script's behavior is controlled by an inputs file plus command-line options. The script downloads the [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/) and [WebLogic Deploy Tool](https://oracle.github.io/weblogic-deploy-tooling/) and uses these tools to create a new image with a domain home. The script also creates a domain resource YAML file that references the image, and, if the `-e` option is specified, deploys the domain resource to Kubernetes. For a detailed understanding of the steps that the `create-domain.sh` script performs for you, see the bulleted items under [Use the script to create a domain]({{< relref "/samples/simple/domains/domain-home-in-image/#use-the-script-to-create-a-domain" >}})
{{% notice note %}} The `create-domain.sh` script and its inputs file are for demonstration purposes only. In production, we strongly recommend that you use the WebLogic Image Tool and directly work with domain resource files instead.
{{% notice note %}} The `create-domain.sh` script and its inputs file are for demonstration purposes _only_; its contents and the domain resource file that it generates for you might change without notice. In production, we strongly recommend that you use the WebLogic Image Tool and WebLogic Deploy Tooling (when applicable), and directly work with domain resource files instead.
{{% /notice%}}
First, copy the sample [create-domain-inputs.yaml](http://github.com/oracle/weblogic-kubernetes-operator/blob/main/kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain-inputs.yaml) file and update your copy with:
Expand All @@ -52,7 +52,7 @@ weight: 6
{{% /notice %}}
For the detailed steps that the `create-domain.sh` script performs, see [Domain Home In Image]({{< relref "/samples/simple/domains/domain-home-in-image/_index.md" >}}).
1. Confirm that the operator started the servers for the domain:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ weblogic-operator-secrets Opaque
##### Create WebLogic Domain
We will use the `kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain.sh` script to create the WLS domain in the persistent volume we created previously.

{{% notice note %}} The `create-domain.sh` script and its inputs file are for demonstration purposes _only_; its contents and the domain resource file that it generates for you might change without notice. In production, we strongly recommend that you use the WebLogic Image Tool and WebLogic Deploy Tooling (when applicable), and directly work with domain resource files instead.
{{% /notice%}}

We need to set up the domain configuration for the WebLogic domain.

1. Check if resources are ready.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,44 +56,46 @@ $ ./create-domain.sh \
-i create-domain-inputs.yaml \
-o /<path to output-directory>
```
{{% notice note %}} The `create-domain.sh` script and its inputs file are for demonstration purposes _only_; its contents and the domain resource file that it generates for you might change without notice. In production, we strongly recommend that you use the WebLogic Image Tool and WebLogic Deploy Tooling (when applicable), and directly work with domain resource files instead.
{{% /notice%}}

The script will perform the following steps:

* 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 output-directory>/weblogic-domains/<domainUID>`. If the directory already exists, its contents will be removed.

* Create a properties file, `domain.properties`, in the directory that is created above.
* 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.
The `domain.properties` file will be removed upon successful completion of the script.

* Download the latest [WebLogic Deploy Tooling](https://oracle.github.io/weblogic-deploy-tooling) (WDT) and [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/) installer ZIP files to your `/tmp/dhii-sample/tools` directory.
WIT is required to create your Domain in Image container images, and WDT is required if using `wdt` mode.
Visit the GitHub [WebLogic Deploy Tooling Releases](https://github.com/oracle/weblogic-deploy-tooling/releases) and [WebLogic Image Tool Releases](https://github.com/oracle/weblogic-image-tool/releases) web pages to determine the latest release version for each.

* Set up the WebLogic Image Tool in the `<toolsDir>/imagetool` directory, where `<toolsDir>` is the
* Set up the WebLogic Image Tool in the `<toolsDir>/imagetool` directory, where `<toolsDir>` is the
directory specified in the `toolsDir` parameter in the inputs YAML file. Set the
WIT cache store location to the `<tools>/imagetool-cache` directory and
put a `wdt_<WDT_VERSION>` entry in the tool's cache, which points to the path of the WDT ZIP file installer.
For more information about the WIT cache, see the
[WIT Cache documentation](https://oracle.github.io/weblogic-image-tool/userguide/tools/cache/).

* If the optional `-n` option and an encryption key is provided, invoke the WDT
* If the optional `-n` option and an encryption key is provided, invoke the WDT
[Encrypt Model Tool](https://oracle.github.io/weblogic-deploy-tooling/userguide/tools/encrypt/)
in a container running the image specified in `domainHomeImageBase` parameter in your inputs file
in a container running the image specified in `domainHomeImageBase` parameter in your inputs file
to encrypt the password properties in `domain.properties` file. Note that this password encryption
step is skipped if the value of the `mode` parameter in the inputs YAML file is `wlst` because
step is skipped if the value of the `mode` parameter in the inputs YAML file is `wlst` because
the feature is provided by WDT.

* Invoke the [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool) to create a
new WebLogic Server domain based on the WebLogic image specified in the `domainHomeImageBase` parameter
* Invoke the [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool) to create a
new WebLogic Server domain based on the WebLogic image specified in the `domainHomeImageBase` parameter
from your inputs file. The new WebLogic Server domain is created using one of the
following options based on the value of the `mode` parameter in the inputs YAML file:
* If the value of the `mode` parameter is `wdt`, the WDT model specified in the `createDomainWdtModel`
parameter and the WDT variables in `domain.properties` file are used by the WebLogic Image Tool to create
the new WebLogic Server domain.
* If the value of the `mode` parameter is `wlst`, the offline WLST
script specified in the `createDomainWlstScript` parameter is run to create the new WebLogic Server domain.
* The generated image is tagged with the `image` parameter provided in your inputs file.

* The generated image is tagged with the `image` parameter provided in your inputs file.

{{% notice warning %}}
Oracle strongly recommends storing the image containing the domain home as private
Expand Down Expand Up @@ -498,7 +500,3 @@ By default, they are installed under `/tmp/dhii-sample/tools` directory.
```shell
$ rm -rf /tmp/dhii-sample/tools/
```




Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ $ ./create-domain.sh \
-i create-domain-inputs.yaml \
-o /<path to output-directory>
```
{{% notice note %}} The `create-domain.sh` script and its inputs file are for demonstration purposes _only_; its contents and the domain resource file that it generates for you might change without notice. In production, we strongly recommend that you use the WebLogic Image Tool and WebLogic Deploy Tooling (when applicable), and directly work with domain resource files instead.
{{% /notice%}}

The script will perform the following steps:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ description: "Sample for creating an FMW Infrastructure domain home inside an im


The sample scripts demonstrate the creation of a FMW Infrastructure domain home in an image using
[WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/) (WIT).
The sample scripts have the option of putting the WebLogic domain log, server logs, server output files,
and the Node Manager logs on an existing Kubernetes PersistentVolume (PV) and PersistentVolumeClaim (PVC).
[WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/) (WIT).
The sample scripts have the option of putting the WebLogic domain log, server logs, server output files,
and the Node Manager logs on an existing Kubernetes PersistentVolume (PV) and PersistentVolumeClaim (PVC).
The scripts also generate the domain resource YAML file, which can then be used by the scripts or used manually
to start the Kubernetes artifacts of the corresponding domain, including the WebLogic Server pods and services.

Expand All @@ -20,8 +20,8 @@ Before you begin, read this document, [Domain resource]({{< relref "/userguide/m
The following prerequisites must be met prior to running the create domain script:

* Make sure the WebLogic Kubernetes Operator is running.
* The operator requires an image with either FMW Infrastructure 12.2.1.3.0 with patch 29135930 applied or FMW Infrastructure 12.2.1.4.0.
For details on how to obtain or create the image, refer to
* The operator requires an image with either FMW Infrastructure 12.2.1.3.0 with patch 29135930 applied or FMW Infrastructure 12.2.1.4.0.
For details on how to obtain or create the image, refer to
[FMW Infrastructure domains]({{< relref "/userguide/managing-fmw-domains/fmw-infra/#obtaining-the-fmw-infrastructure-image" >}}).
* Create a Kubernetes Namespace for the domain unless you intend to use the default namespace.
* If `logHomeOnPV` is enabled, create the Kubernetes PersistentVolume where the log home will be hosted, and the Kubernetes PersistentVolumeClaim for the domain in the same Kubernetes Namespace. For samples to create a PV and PVC, see [Create sample PV and PVC]({{< relref "/samples/simple/storage/_index.md" >}}).
Expand All @@ -38,10 +38,10 @@ The sample for creating domains is in this directory:
```shell
$ cd kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-in-image
```
Make a copy of the `create-domain-inputs.yaml` file, update it with the correct values.
Make a copy of the `create-domain-inputs.yaml` file, update it with the correct values.
If `fwmDomainType` is `JRF`, also update the input files with configurations for accessing the RCU database schema,
including `rcuSchemaPrefix`, `rcuSchemaPassword`, `rcuDatabaseURL`, and `rcuCredentialSecrets`.
Run the create script, pointing it at your inputs file and an output directory, along with user name and password for the WebLogic administrator,
Run the create script, pointing it at your inputs file and an output directory, along with user name and password for the WebLogic administrator,
and if creating a JFR FMW domain, also provide the password for the RCU schema:

```shell
Expand All @@ -52,18 +52,20 @@ $ ./create-domain.sh \
-i create-domain-inputs.yaml \
-o /<path to output-directory>
```
{{% notice note %}} The `create-domain.sh` script and its inputs file are for demonstration purposes _only_; its contents and the domain resource file that it generates for you might change without notice. In production, we strongly recommend that you use the WebLogic Image Tool and WebLogic Deploy Tooling (when applicable), and directly work with domain resource files instead.
{{% /notice%}}

The script will perform the following steps:

* Create a directory for the generated Kubernetes YAML files for this domain if it does not
already exist. The path name is `/<path to output-directory>/weblogic-domains/<domainUID>`.
If the directory already exists, its contents must be removed before using this script.

* Create a properties file, `domain.properties`, in the directory that is created above.
This properties file will be used to create a sample FMW Infrastructure domain.
* Create a properties file, `domain.properties`, in the directory that is created above.
This properties file will be used to create a sample FMW Infrastructure domain.
The `domain.properties` file will be removed upon successful completion of the script.

* Download the latest [WebLogic Deploy Tooling](https://oracle.github.io/weblogic-deploy-tooling/) (WDT) and [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/) installer ZIP files to your `/tmp/dhii-sample/tools` directory.
* Download the latest [WebLogic Deploy Tooling](https://oracle.github.io/weblogic-deploy-tooling/) (WDT) and [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/) installer ZIP files to your `/tmp/dhii-sample/tools` directory.
WIT is required to create your Domain in Image container images, and WDT is required if using `wdt` mode.
Visit the GitHub [WebLogic Deploy Tooling Releases](https://github.com/oracle/weblogic-deploy-tooling/releases) and [WebLogic Image Tool Releases](https://github.com/oracle/weblogic-image-tool/releases) web pages to determine the latest release version for each.

Expand All @@ -74,23 +76,23 @@ The script will perform the following steps:
For more information about the WIT cache, see the
[WIT Cache documentation](https://oracle.github.io/weblogic-image-tool/userguide/tools/cache/).

* If the optional `-n` option and an encryption key is provided, invoke the WDT
* If the optional `-n` option and an encryption key is provided, invoke the WDT
[Encrypt Model Tool](https://oracle.github.io/weblogic-deploy-tooling/userguide/tools/encrypt/)
in a container running the image specified in `domainHomeImageBase` parameter in your inputs file
in a container running the image specified in `domainHomeImageBase` parameter in your inputs file
to encrypt the password properties in `domain.properties` file. Note that this password encryption
step is skipped if the value of the `mode` parameter in the inputs YAML file is `wlst` because
step is skipped if the value of the `mode` parameter in the inputs YAML file is `wlst` because
the feature is provided by WDT.
* Invoke the [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/) to create a new
FWM Infrastructure domain based on the FMW Infrastructure image specified in the `domainHomeImageBase`
parameter from your inputs file. The new WebLogic Server domain is created using one of the

* Invoke the [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/) to create a new
FWM Infrastructure domain based on the FMW Infrastructure image specified in the `domainHomeImageBase`
parameter from your inputs file. The new WebLogic Server domain is created using one of the
following options based on the value of the `mode` parameter in the inputs YAML file:
* If the value of the `mode` parameter is `wdt`, the WDT model specified in the `createDomainWdtModel`
* If the value of the `mode` parameter is `wdt`, the WDT model specified in the `createDomainWdtModel`
parameter and the WDT variables in `domain.properties` file are used by the WebLogic Image Tool to create
the new WebLogic Server domain.
* If the value of the `mode` parameter is `wlst`, the offline WLST
* If the value of the `mode` parameter is `wlst`, the offline WLST
script specified in the `createDomainWlstScript` parameter is run to create the new WebLogic Server domain.

* The generated image is tagged with the `image` parameter provided in your inputs file.

{{% notice warning %}}
Expand Down Expand Up @@ -245,11 +247,11 @@ spec:
# Identify which Secret contains the credentials for pulling an image
#imagePullSecrets:
#- name:
#- name:
# Identify which Secret contains the WebLogic Admin credentials (note that there is an example of
# how to create that Secret at the end of this file)
webLogicCredentialsSecret:
webLogicCredentialsSecret:
name: fmwdomain-weblogic-credentials
# Whether to include the server out file into the pod's stdout, default is true
Expand Down Expand Up @@ -336,7 +338,7 @@ spec:
# Istio
# configuration:
# istio:
# enabled:
# enabled:
# readinessPort:
```
Expand Down Expand Up @@ -375,7 +377,7 @@ Spec:
Server Pod:
Env:
Name: USER_MEM_ARGS
Value: -Djava.security.egd=file:/dev/./urandom -Xms512m -Xmx1024m
Value: -Djava.security.egd=file:/dev/./urandom -Xms512m -Xmx1024m
Server Start State: RUNNING
Clusters:
Cluster Name: cluster-1
Expand Down Expand Up @@ -405,7 +407,7 @@ Spec:
Name: JAVA_OPTIONS
Value: -Dweblogic.StdoutDebugEnabled=false
Name: USER_MEM_ARGS
Value: -Djava.security.egd=file:/dev/./urandom -Xms256m -Xmx1024m
Value: -Djava.security.egd=file:/dev/./urandom -Xms256m -Xmx1024m
Server Start Policy: IF_NEEDED
Web Logic Credentials Secret:
Name: fmwdomain-weblogic-credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Before you begin, read this document, [Domain resource]({{< relref "/userguide/m
The following prerequisites must be met prior to running the create domain script:

* Make sure the WebLogic Kubernetes Operator is running.
* The operator requires an image with either FMW Infrastructure 12.2.1.3.0 with patch 29135930 applied or FMW Infrastructure 12.2.1.4.0.
For details on how to obtain or create the image, refer to
* The operator requires an image with either FMW Infrastructure 12.2.1.3.0 with patch 29135930 applied or FMW Infrastructure 12.2.1.4.0.
For details on how to obtain or create the image, refer to
[FMW Infrastructure domains]({{< relref "/userguide/managing-fmw-domains/fmw-infra/#obtaining-the-fmw-infrastructure-image" >}}).
* Create a Kubernetes Namespace for the domain unless you intend to use the default namespace.
* In the same Kubernetes Namespace, create the Kubernetes PersistentVolume (PV) where the domain
Expand All @@ -37,7 +37,7 @@ The following prerequisites must be met prior to running the create domain scrip
* Unless you are creating a Restricted-JRF domain, you also need to:
* Configure access to your database. For details, see [here]({{< relref "/userguide/managing-fmw-domains/fmw-infra/_index.md#configuring-access-to-your-database" >}}).
* Create a Kubernetes Secret with the RCU credentials. For details, refer to this [document](https://github.com/oracle/weblogic-kubernetes-operator/blob/main/kubernetes/samples/scripts/create-rcu-credentials/README.md).

#### Use the script to create a domain

The sample for creating domains is in this directory:
Expand All @@ -54,6 +54,9 @@ $ ./create-domain.sh \
-o /<path to output-directory>
```

{{% notice note %}} The `create-domain.sh` script and its inputs file are for demonstration purposes _only_; its contents and the domain resource file that it generates for you might change without notice. In production, we strongly recommend that you use the WebLogic Image Tool and WebLogic Deploy Tooling (when applicable), and directly work with domain resource files instead.
{{% /notice%}}

The script will perform the following steps:

* Create a directory for the generated Kubernetes YAML files for this domain if it does not
Expand Down

0 comments on commit 9f237cd

Please sign in to comment.