|
| 1 | ++++ |
| 2 | +title = "Domain creation images" |
| 3 | +date = 2019-02-23T16:45:16-05:00 |
| 4 | +weight = 25 |
| 5 | +pre = "<b> </b>" |
| 6 | +description = "Domain creation images supply the WDT model for Domain on PV." |
| 7 | ++++ |
| 8 | + |
| 9 | +{{< table_of_contents >}} |
| 10 | + |
| 11 | +### Introduction |
| 12 | + |
| 13 | +Domain creation images are used for supplying WebLogic Deploy Tooling (WDT) model files, WDT variables files, |
| 14 | +WDT application archive files (collectively known as WDT model files), and the directory where the WebLogic Deploy Tooling software is installed (known as the WDT Home) |
| 15 | +when deploying a domain using a Domain on PV model. You distribute WDT model files and the |
| 16 | +WDT executable using these images, then the operator uses them to |
| 17 | +manage the domain. |
| 18 | + |
| 19 | +**Note:** These images are _only_ used for creating the domain and will not be used to update the domain. |
| 20 | + |
| 21 | +### Configuration |
| 22 | + |
| 23 | +You can configure one or more domain creation images in a domain resource. |
| 24 | + |
| 25 | +Optionally, you can set the `imagePullPolicy`, |
| 26 | +which defaults to `Always` if the `image` ends in `:latest` and `IfNotPresent`, |
| 27 | +otherwise. |
| 28 | +If image pull secrets are required for pulling the images, then the secrets must be referenced using `domain.spec.imagePullSecrets`. |
| 29 | + |
| 30 | +Also, optionally, you can configure the [source locations](#source-locations) of WDT model files and WDT Home |
| 31 | +using the `sourceModelHome` and `sourceWDTInstallHome` fields, as described in this |
| 32 | +[section](#source-locations). |
| 33 | + |
| 34 | +- For details about each field, see the [References](#references). |
| 35 | + |
| 36 | +- For a basic configuration example, see [Configuration example 1](#example-1-basic-configuration). |
| 37 | + |
| 38 | +### References |
| 39 | + |
| 40 | +- Run the ` kubectl explain domain.spec.configuration.initializeDomainOnPV.domain.domainCreationImages` command, or |
| 41 | + |
| 42 | +- See the `initializeDomainOnPV.domain.domainCreationImages` section |
| 43 | + in the domain resource |
| 44 | + [schema](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/documentation/domains/Domain.md). |
| 45 | + |
| 46 | + |
| 47 | +#### Source locations |
| 48 | + |
| 49 | +Use the optional attributes, `sourceModelHome` and |
| 50 | +`sourceWdtInstallHome`, to specify non-default locations for the |
| 51 | +WDT model files and WDT Home in your domain creation image(s). |
| 52 | +Allowed values for `sourceModelHome` and `sourceWdtInstallHome`: |
| 53 | +- Unset - Defaults to `/auxiliary/models` and `/auxiliary/weblogic-deploy`, respectively. |
| 54 | +- Set to a path - Must point to an existing location containing the WDT model files and WDT Home, respectively. |
| 55 | +- `None` - Indicates that the image has no WDT model files or WDT Home, respectively. |
| 56 | + |
| 57 | +If you set the `sourceModelHome` or `sourceWDTInstallHome` to `None` or, |
| 58 | +the source attributes are left unset and there are no files at the default locations, |
| 59 | +then the operator will ignore the source directories. Otherwise, |
| 60 | +note that if you set a source directory attribute to a specific value |
| 61 | +and there are no files in the specified directory in the domain creation image, |
| 62 | +then the domain deployment will fail. |
| 63 | + |
| 64 | +The files in `sourceModelHome` and `sourceWDTInstallHome` directories will be made available in `/aux/models` |
| 65 | +and `/aux/weblogic-deploy` directories of the WebLogic Server container in all pods, respectively. |
| 66 | + |
| 67 | +For example source locations, see [Configuration example 2](#example-2-source-locations). |
| 68 | + |
| 69 | +#### Multiple images |
| 70 | + |
| 71 | +If specifying multiple images with WDT model files in their respective `sourceModelHome` |
| 72 | +directories, then WDT model files are merged. Files from later images take precedence over files from earlier images. |
| 73 | + |
| 74 | +When specifying multiple images, ensure that only one of the images supplies a WDT Home using |
| 75 | +`sourceWDTInstallHome`. |
| 76 | +{{% notice warning %}} |
| 77 | +If you provide more than one WDT Home among multiple images, |
| 78 | +then the domain deployment will fail. |
| 79 | +Set `sourceWDTInstallHome` to `None`, or make sure there are no files in `/auxiliary/weblogic-deploy`, |
| 80 | +for all but one of your specified domain creation images. |
| 81 | +{{% /notice %}} |
| 82 | + |
| 83 | +For an example of configuring multiple images, see [Configuration example 3](#example-3-multiple-images). |
| 84 | + |
| 85 | +### Configuration examples |
| 86 | + |
| 87 | +The following configuration examples illustrate each of the previously described sections. |
| 88 | + |
| 89 | +#### Example 1: Basic configuration |
| 90 | + |
| 91 | +This example specifies the image location; all other fields are at default values. |
| 92 | + |
| 93 | +``` |
| 94 | +spec: |
| 95 | + configuration: |
| 96 | + initializeDomainOnPV: |
| 97 | + domainCreationImages: |
| 98 | + - image: wdt-model-image:v1 |
| 99 | +``` |
| 100 | + |
| 101 | +#### Example 2: Source locations |
| 102 | + |
| 103 | +This example is the same as Example 1, except that it specifies the source locations for the WDT model files and WDT Home. |
| 104 | + |
| 105 | +``` |
| 106 | +spec: |
| 107 | + configuration: |
| 108 | + configuration: |
| 109 | + initializeDomainOnPV: |
| 110 | + domainCreationImages: |
| 111 | + - image: wdt-model-image:v1 |
| 112 | + sourceModelHome: /foo/models |
| 113 | + sourceWDTInstallHome: /bar/weblogic-deploy |
| 114 | +``` |
| 115 | + |
| 116 | +#### Example 3: Multiple images |
| 117 | + |
| 118 | +This example is the same as Example 1, except it configures multiple images and sets the `sourceWDTInstallHome` |
| 119 | +for the second image to `None`. |
| 120 | +In this case, the source location of the WDT installation from the second image `wdt-model-image2:v1` will be ignored. |
| 121 | + |
| 122 | +``` |
| 123 | +spec: |
| 124 | + configuration: |
| 125 | + initializeDomainOnPV: |
| 126 | + domainCreationImages: |
| 127 | + - image: wdt-model-image:v1 |
| 128 | + - image: wdt-model-image2:v1 |
| 129 | + sourceWDTInstallHome: None |
| 130 | +``` |
0 commit comments