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
-[Understanding your first archive](#understanding-your-first-archive)
152
+
-[Staging a ZIP file of the archive](#staging-a-zip-file-of-the-archive)
153
+
-[Staging model files](#staging-model-files)
154
+
-[Creating the image with WIT](#creating-the-image-with-wit)
155
155
156
156
##### Image creation prerequisites
157
157
1. The `JAVA_HOME` environment variable must be set and must reference a valid JDK 8 or 11 installation.
@@ -217,9 +217,9 @@ The following sections contain the steps for creating the image `model-in-image:
217
217
The sample includes a predefined archive directory in `/tmp/mii-sample/archives/archive-v1` that you will use to create an archive ZIP file for the image.
218
218
219
219
The archive top directory, named `wlsdeploy`, contains a directory named `applications`, which includes an ‘exploded’ sample JSP web application in the directory, `myapp-v1`. Three useful aspects to remember about WDT archives are:
220
-
- A model image can contain multiple WDT archives.
221
-
- WDT archives can contain multiple applications, libraries, and other components.
222
-
- WDT archives have a [well defined directory structure](https://oracle.github.io/weblogic-deploy-tooling/concepts/archive/), which always has `wlsdeploy` as the top directory.
220
+
- A model image can contain multiple WDT archives.
221
+
- WDT archives can contain multiple applications, libraries, and other components.
222
+
- WDT archives have a [well defined directory structure](https://oracle.github.io/weblogic-deploy-tooling/concepts/archive/), which always has `wlsdeploy` as the top directory.
223
223
224
224
The application displays important details about the WebLogic Server instance that it’s running on: namely its domain name, cluster name, and server name, as well as the names of any data sources that are targeted to the server.
225
225
@@ -262,36 +262,36 @@ Here is the WLS `model.10.yaml`:
If you don’t see the `weblogic-deploy.zip` file, then you missed a step in the [prerequisites](#image-creation-prerequisites).
325
325
@@ -346,11 +346,11 @@ If you don’t see the `imagetool` directory, then you missed a step in the prer
346
346
347
347
This command runs the WebLogic Image Tool in its Model in Image mode, and does the following:
348
348
349
-
- Builds the final image as a layer on the `container-registry.oracle.com/middleware/weblogic:12.2.1.4` base image.
350
-
- Copies the WDT ZIP file that’s referenced in the WIT cache into the image.
351
-
- Note that you cached WDT in WIT using the keyword `latest` when you set up the cache during the sample prerequisites steps.
352
-
- This lets WIT implicitly assume it’s the desired WDT version and removes the need to pass a `-wdtVersion` flag.
353
-
- Copies the specified WDT model, properties, and application archives to image location `/u01/wdt/models`.
349
+
- Builds the final image as a layer on the `container-registry.oracle.com/middleware/weblogic:12.2.1.4` base image.
350
+
- Copies the WDT ZIP file that’s referenced in the WIT cache into the image.
351
+
- Note that you cached WDT in WIT using the keyword `latest` when you set up the cache during the sample prerequisites steps.
352
+
- This lets WIT implicitly assume it’s the desired WDT version and removes the need to pass a `-wdtVersion` flag.
353
+
- Copies the specified WDT model, properties, and application archives to image location `/u01/wdt/models`.
354
354
355
355
When the command succeeds, it should end with output like the following:
356
356
@@ -360,15 +360,15 @@ When the command succeeds, it should end with output like the following:
360
360
361
361
Also, if you run the `docker images` command, then you will see an image named `model-in-image:WLS-v1`.
362
362
363
-
> Note: If you have Kubernetes cluster worker nodes that are remote to your local machine, then you need to put the image in a location that these nodes can access. See [Ensuring your Kubernetes cluster can access images](#ensuring-your-kubernetes-cluster-can-access-images).
363
+
> Note: If you have Kubernetes cluster worker nodes that are remote to your local machine, then you need to put the image in a location that these nodes can access. See [Ensuring your Kubernetes cluster can access images]({{< relref "/samples/domains/model-in-image/_index.md#ensuring-your-kubernetes-cluster-can-access-images" >}}).
364
364
365
365
366
366
#### Create WebLogic domain
367
367
368
368
In this section, you will deploy the new image to namespace `sample-domain1-ns`, including the following steps:
369
369
370
370
- Create a namespace for the WebLogic domain.
371
-
- Upgrade the operator to manage the WebLogic domain namespace.
371
+
- Upgrade the operator to manage the WebLogic domain namespace.
372
372
- Create a Secret containing your WebLogic administrator user name and password.
373
373
- Create a Secret containing your Model in Image runtime encryption password:
374
374
- All Model in Image domains must supply a runtime encryption Secret with a `password` value.
- It is required and must contain `username` and `password` fields.
425
425
- It must be referenced by the `spec.webLogicCredentialsSecret` field in your Domain.
426
426
- It also must be referenced by macros in the `domainInfo.AdminUserName` and `domainInfo.AdminPassWord` fields in your model YAML file.
427
427
428
-
- The Model WDT runtime secret:
428
+
- The Model WDT runtime secret:
429
429
- This is a special secret required by Model in Image.
430
430
- It must contain a `password` field.
431
431
- It must be referenced using the `spec.model.runtimeEncryptionSecret` field in its Domain.
432
432
- It must remain the same for as long as the domain is deployed to Kubernetes but can be changed between deployments.
433
433
- It is used to encrypt data as it's internally passed using log files from the domain's introspector job and on to its WebLogic Server pods.
434
434
435
-
- Deleting and recreating the secrets:
435
+
- Deleting and recreating the secrets:
436
436
- You delete a secret before creating it, otherwise the create command will fail if the secret already exists.
437
437
- This allows you to change the secret when using the `kubectl create secret` command.
438
438
439
-
- You name and label secrets using their associated domain UID for two reasons:
439
+
- You name and label secrets using their associated domain UID for two reasons:
440
440
- To make it obvious which secrets belong to which domains.
441
441
- To make it easier to clean up a domain. Typical cleanup scripts use the `weblogic.domainUID` label as a convenience for finding all resources associated with a domain.
442
442
@@ -447,12 +447,12 @@ Now, you create a Domain YAML file. A Domain is the key resource that tells the
447
447
Copy the following to a file called `/tmp/mii-sample/mii-initial.yaml` or similar, or use the file `/tmp/mii-sample/domain-resources/WLS/mii-initial-d1-WLS-v1.yaml` that is included in the sample source.
448
448
449
449
450
-
{{%expand "Click here to view the WLS Domain YAML file." %}}
450
+
{{%expand "Click here to view the WLS Domain YAML file." %}}
451
451
```yaml
452
452
#
453
453
# This is an example of how to define a Domain resource.
454
454
#
455
-
apiVersion: "weblogic.oracle/v8"
455
+
apiVersion: "weblogic.oracle/v9"
456
456
kind: Domain
457
457
metadata:
458
458
name: sample-domain1
@@ -565,10 +565,10 @@ Copy the following to a file called `/tmp/mii-sample/mii-initial.yaml` or simila
565
565
#secrets:
566
566
#- sample-domain1-datasource-secret
567
567
```
568
-
{{% /expand %}}
568
+
{{% /expand %}}
569
569
570
570
571
-
> **Note**: Before you deploy the domain custom resource, determine if you have Kubernetes cluster worker nodes that are remote to your local machine. If so, you need to put the Domain's image in a location that these nodes can access and you may also need to modify your Domain YAML file to reference the new location. See [Ensuring your Kubernetes cluster can access images]({{< relref "/samples/domains/model-in-image/_index.md#ensuring-your-kubernetes-cluster-can-access-images" >}}).
571
+
> **Note**: Before you deploy the domain custom resource, determine if you have Kubernetes cluster worker nodes that are remote to your local machine. If so, you need to put the Domain's image in a location that these nodes can access and you may also need to modify your Domain YAML file to reference the new location. See [Ensuring your Kubernetes cluster can access images]({{< relref "/samples/domains/model-in-image/_index.md#ensuring-your-kubernetes-cluster-can-access-images" >}}).
572
572
573
573
Run the following command to create the domain custom resource:
574
574
@@ -682,26 +682,31 @@ Create ingress for accessing the application deployed in the cluster and to acce
0 commit comments