Skip to content

Commit f30de0b

Browse files
author
Tom Barnes
authored
Convert MII sample to use aux images... (#3751)
* Convert MII sample instructions to use aux images, supply 'old way' non-aux instructions in the WL images doc, plus some other aux image related doc/explain tweaks and fixes.
1 parent e3b2da3 commit f30de0b

File tree

19 files changed

+543
-602
lines changed

19 files changed

+543
-602
lines changed

documentation/4.0/content/base-images/custom-images.md

Lines changed: 99 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -506,10 +506,103 @@ to create the domain home in Domain in Image.
506506
507507
#### Create a custom image with your model inside the image
508508
509-
In the [Model in Image]({{< relref "/managing-domains/model-in-image/_index.md" >}})
510-
documentation, you will see a reference to a "base" or `--fromImage` image. You should use an image with
511-
the recommended security patches installed as this base image, where this image could be an OCR image or a custom image.
509+
{{% notice tip %}}
510+
This section describes an option for layering Model in Image model files on a WebLogic image.
511+
The preferred approach for supplying Model in Image files
512+
is to use [Auxiliary images]({{< relref "/managing-domains/model-in-image/auxiliary-images.md" >}}) instead.
513+
{{% /notice %}}
512514
513-
See [Obtain images from the Oracle Container Registry]({{< relref "/base-images/ocr-images#obtain-images-from-the-oracle-container-registry" >}})
514-
or
515-
[Create a custom image with patches applied](#create-a-custom-image-with-patches-applied).
515+
{{% notice warning %}}
516+
The example in this section references a base image,
517+
`container-registry.oracle.com/middleware/weblogic:12.2.1.4`.
518+
This is an OCR General Availability (GA) image
519+
which **does not include** the latest security patches for WebLogic Server.
520+
GA images are intended for single desktop demonstration and development purposes _only_.
521+
For all other purposes, Oracle strongly recommends using only images with the latest set of recommended patches applied,
522+
such as OCR Critical Patch Updates (CPU) images or custom generated images.
523+
See [Ensure you are using recently patched images]({{< relref "/base-images/ocr-images#ensure-you-are-using-recently-patched-images" >}}).
524+
{{% /notice %}}
525+
526+
Example steps for creating a custom WebLogic image with a Model in Image file layer
527+
(using files from the Model in Image sample):
528+
529+
1. To gain an overall understanding of Model in Image domains,
530+
read the [Model in Image User Guide]({{< relref "/managing-domains/model-in-image/_index.md" >}})
531+
and the [Model in Image Sample]({{< relref "/managing-domains/samples/domains/model-in-image/_index.md" >}}).
532+
Note that the sample uses the recommended best approach,
533+
auxiliary images, instead of the alternative approach, which is used in this example.
534+
535+
1. Follow the prerequisite steps in the
536+
[Model in Image Sample]({{< relref "/samples/domains/model-in-image/prerequisites.md" >}})
537+
that describe how to:
538+
539+
- Download the operator source and its Model in Image sample
540+
(including copying the sample to the suggested location, `/tmp/mii-sample`).
541+
- Download the latest [WebLogic Deploy Tooling](https://github.com/oracle/weblogic-deploy-tooling/releases) (WDT)
542+
and [WebLogic Image Tool](https://github.com/oracle/weblogic-image-tool/releases) (WIT) installer ZIP files
543+
to your `/tmp/mii-sample/model-images` directory.
544+
Both WDT and WIT are required to create your Model in Image container images.
545+
- Install (unzip) the WebLogic Image Tool and configure its cache to reference your WebLogic Deploy Tooling download.
546+
547+
1. Locate or create a base WebLogic image.
548+
549+
See [Obtain images from the Oracle Container Registry]({{< relref "/base-images/ocr-images#obtain-images-from-the-oracle-container-registry" >}})
550+
or [Create a custom image with patches applied](#create-a-custom-image-with-patches-applied).
551+
552+
In the following step, you will use the `container-registry.oracle.com/middleware/weblogic:12.2.1.4` GA image.
553+
554+
1. Build the final image using WIT while specifying the base image, target image tag, WDT installation location,
555+
and WDT model file locations. For example:
556+
557+
First, create a model ZIP file application archive and place it in the same directory
558+
where the sample model YAML file and model properties files are already staged:
559+
560+
```shell
561+
$ rm -f /tmp/mii-sample/model-images/model-in-image__WLS-v1/archive.zip
562+
$ cd /tmp/mii-sample/archives/archive-v1
563+
$ zip -r /tmp/mii-sample/model-images/model-in-image__WLS-v1/archive.zip wlsdeploy
564+
```
565+
566+
(The `rm -f` command is included in case there's an
567+
old version of the archive ZIP file from a
568+
previous run of this sample.)
569+
570+
Second, run the following WIT command:
571+
572+
```shell
573+
$ cd /tmp/mii-sample/model-images
574+
```
575+
```shell
576+
$ ./imagetool/bin/imagetool.sh update \
577+
--tag model-in-image:WLS-v1 \
578+
--fromImage container-registry.oracle.com/middleware/weblogic:12.2.1.4 \
579+
--wdtModel ./model-in-image__WLS-v1/model.10.yaml \
580+
--wdtVariables ./model-in-image__WLS-v1/model.10.properties \
581+
--wdtArchive ./model-in-image__WLS-v1/archive.zip \
582+
--wdtModelOnly \
583+
--wdtDomainType WLS \
584+
--chown oracle:root
585+
```
586+
587+
__Note__: If using a Fusion Middleware Infrastructure base image,
588+
then specify a `--wdtDomainType` of `JRF` or `RestrictedJRF`,
589+
`JRF-v1` instead of `WLS-v1` for the image tag,
590+
and substitute each occurrence of `model-in-image__WLS-v1` with `model-in-image__JRF-v1`.
591+
592+
1. For an example Domain YAML file that sets up Model in Image to reference the image,
593+
see `/tmp/mii-sample/domain-resources/WLS/mii-initial-d1-WLS-v1.yaml`
594+
(or `./JRF/mii-initial-d1-JRF-v1.yaml` if using Fusion Middleware Infrastructure `JRF` mode).
595+
596+
__Notes__:
597+
598+
- The default values for `domain.spec.configuration.model.wdtInstallHome` and `.modelHome`
599+
reference the location of the WDT installation and model files that WIT copied into the image.
600+
601+
- The domain type specified in `domain.spec.configuration.model.domainType`
602+
must correspond with the `--wdtDomainType` specified on the WIT command line when creating the image.
603+
604+
- To compare this example with an equivalent auxiliary image domain:
605+
```
606+
$ diff /tmp/mii-sample/domain-resources/WLS-AI/mii-initial-d1-WLS-AI-v1.yaml \
607+
/tmp/mii-sample/domain-resources/WLS/mii-initial-d1-WLS-v1.yaml
608+
```

documentation/4.0/content/managing-domains/accessing-the-domain/status-conditions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Status:
143143

144144
#### `ConfigChangesPendingRestart`
145145
- This condition tracks the progress of [runtime updates]({{< relref "managing-domains/model-in-image/runtime-updates">}})
146-
to the WebLogic Deploy Tool model of a Model in Image domain home source type.
146+
to the WebLogic Deploy Tooling model of a Model in Image domain home source type.
147147
- The `status` attribute is `True` if all of the following are true:
148148
* The Domain resource attribute
149149
`domain.spec.configuration.model.onlineUpdate.onNonDynamicChanges` is `CommitUpdateOnly`.

documentation/4.0/content/managing-domains/choosing-a-model/_index.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,36 @@ This document describes the domain home source types for deploying a domain, and
1313

1414
When using the operator to start WebLogic Server instances from a domain, you have the choice of the following WebLogic domain home source types:
1515

16-
- **[Domain in PV]({{< relref "/samples/domains/domain-home-on-pv/_index.md" >}})**:
17-
- Set the domain resource `domain.spec.domainHomeSourceType` attribute to `PersistentVolume`.
18-
- Supply a WebLogic installation in an image and supply WebLogic configuration as a domain home in a persistent volume.
19-
- Supply WebLogic applications in the persistent volume.
20-
- Mutate WebLogic configuration using WLST, the WebLogic Server Administration Console, or [configuration overrides]({{< relref "/managing-domains/configoverrides/_index.md" >}}) supplied in a Kubernetes ConfigMap.
21-
22-
- **[Domain in Image]({{< relref "/samples/domains/domain-home-in-image/_index.md" >}})**:
23-
- Set the domain resource `domain.spec.domainHomeSourceType` attribute to `Image`.
24-
- Supply a WebLogic installation in an image and supply WebLogic configuration as a domain home layered on this image.
25-
- Supply WebLogic applications layered on the installation image.
26-
- Mutate WebLogic configuration by supplying a new image and rolling, or by configuration overrides supplied in a Kubernetes ConfigMap.
27-
2816
- **[Model in Image]({{< relref "/samples/domains/model-in-image/_index.md" >}})**:
2917
- Set the domain resource `domain.spec.domainHomeSourceType` attribute to `FromModel`.
30-
- Supply a WebLogic installation in an image and supply WebLogic configuration in one of three ways:
18+
- Supply a WebLogic installation in an image and supply a WebLogic configuration in one of three ways:
19+
- As WDT model YAML file supplied in separate
20+
[auxiliary images]({{< relref "/managing-domains/model-in-image/auxiliary-images.md" >}}).
3121
- As WebLogic Deployment Tool (WDT) model YAML file layered on the WebLogic installation image.
32-
- As WDT model YAML file supplied in separate [auxiliary images]({{< relref "/managing-domains/model-in-image/auxiliary-images.md" >}}).
3322
- As WDT model YAML file in a Kubernetes ConfigMap.
3423
- Supply WebLogic applications in one of two ways:
35-
- Layered on the installation image.
3624
- In auxiliary images.
37-
- Mutate WebLogic configuration by supplying a new image and rolling, or [model updates]({{< relref "/managing-domains/model-in-image/runtime-updates.md" >}}) supplied in a Kubernetes ConfigMap.
25+
- Layered on the installation image.
26+
- Mutate the WebLogic configuration by supplying a new image and rolling,
27+
or [model updates]({{< relref "/managing-domains/model-in-image/runtime-updates.md" >}})
28+
supplied in a Kubernetes ConfigMap.
29+
30+
- **[Domain in Image]({{< relref "/samples/domains/domain-home-in-image/_index.md" >}})**:
31+
- Set the domain resource `domain.spec.domainHomeSourceType` attribute to `Image`.
32+
- Supply a WebLogic installation in an image and supply a WebLogic configuration as a domain home layered on this image.
33+
- Supply WebLogic applications layered on the installation image.
34+
- Mutate the WebLogic configuration by supplying a new image and rolling,
35+
or by [configuration overrides]({{< relref "/managing-domains/configoverrides/_index.md" >}})
36+
supplied in a Kubernetes ConfigMap.
37+
38+
- **[Domain in PV]({{< relref "/samples/domains/domain-home-on-pv/_index.md" >}})**:
39+
- Set the domain resource `domain.spec.domainHomeSourceType` attribute to `PersistentVolume`.
40+
- Supply a WebLogic installation in an image and supply a WebLogic configuration as a domain home in a persistent volume.
41+
- Supply WebLogic applications in the persistent volume.
42+
- Mutate the WebLogic configuration using WLST,
43+
the WebLogic Server Administration Console,
44+
or [configuration overrides]({{< relref "/managing-domains/configoverrides/_index.md" >}})
45+
supplied in a Kubernetes ConfigMap.
3846

3947
Note that you can use different domain home types for different domains; there's no restriction on having domains with different domain home types in the same Kubernetes cluster or namespace.
4048

0 commit comments

Comments
 (0)