|
| 1 | ++++ |
| 2 | +title = "Apply patched binary images to a running domain" |
| 3 | +date = 2019-02-23T16:43:45-05:00 |
| 4 | +weight = 9 |
| 5 | +pre = "<b> </b>" |
| 6 | ++++ |
| 7 | + |
| 8 | + |
| 9 | +When updating WebLogic binaries of a running domain in Kubernetes with a patched container image, |
| 10 | +the operator applies the update in a Zero Downtime (ZDT) fashion. The procedure for the operator |
| 11 | +to update the running domain differs depending on the [domain home source type]({{< relref "/userguide/managing-domains/choosing-a-model/_index.md" >}}). |
| 12 | + |
| 13 | +For Domain in PV, the operator can apply the update to the running domain without modifying the patched container image. For Model in Image (MII) and Domain in Image, |
| 14 | +before the operator can apply the update, the patched container images need to be modified to add the domain home or a |
| 15 | +WebLogic Deploy Tooling (WDT) model and archive. You use the WebLogic Image Tool (WIT) to update or rebase a patched |
| 16 | +container image with a WDT model or with a domain inside of the image. |
| 17 | + |
| 18 | +In all three domain home source types, you edit the [Domain Resource]({{< relref "/userguide/managing-domains/domain-resource#domain-resource-attribute-references" >}}) |
| 19 | +to inform the operator of the name of the new patched image so that it can manage the update of the WebLogic domain. |
| 20 | + |
| 21 | +##### Domain in PV |
| 22 | + |
| 23 | +Edit the Domain Resource image reference with the new image name/tag (for example, `oracle/weblogic:12.2.1.4-patched`). |
| 24 | +Then, the operator performs a rolling restart of the WebLogic domain to update the Oracle Home of the servers. |
| 25 | + |
| 26 | +##### Model in Image |
| 27 | +Use WIT [Update Image](https://github.com/oracle/weblogic-image-tool/blob/master/site/update-image.md) to extend patched container images with a WDT model and application archive file. |
| 28 | +Then, the operator performs a rolling update of the domain, updating the ORACLE HOME of each server pod in a ZDT fashion. |
| 29 | + |
| 30 | +For example: |
| 31 | + |
| 32 | +Update an image, `oracle/weblogic:12.2.1.4-patched`, to create an MII image tagged `mydomain:v2`, |
| 33 | +which includes a WDT model file, `./wdt/my_domain.yaml`, and a WDT archive, `./wdt/my_domain.zip`. |
| 34 | + |
| 35 | +```shell |
| 36 | +$imagetool update --fromImage oracle/weblogic:12.2.1.4-patched --wdtModelOnly |
| 37 | +--tag mydomain:v2 --wdtArchive ./wdt/my_domain.zip --wdtModel ./wdt/my_domain.yaml --wdtVersion latest |
| 38 | +``` |
| 39 | + |
| 40 | +Then, edit the Domain Resource image reference with the new image name/tag (`mydomain:2`). |
| 41 | + |
| 42 | +##### Domain in Image |
| 43 | +Use WIT [Rebase Image](https://github.com/oracle/weblogic-image-tool/blob/master/site/rebase-image.md) to update the Oracle Home |
| 44 | +for an existing domain image using the patched Oracle Home from a patched container image. Then, the operator performs a rolling update |
| 45 | +of the domain, updating the Oracle Home of each server pod in a ZDT fashion. |
| 46 | + |
| 47 | +For example: |
| 48 | + |
| 49 | +WIT copies the domain from the source image, `mydomain:v1`, to a new image, `mydomain:v2`, based on a target |
| 50 | +image named `oracle/weblogic:12.2.1.4-patched`. |
| 51 | + |
| 52 | +**Note**: On each image, Oracle Home and the JDK must be installed in the same directories. |
| 53 | + |
| 54 | +```shell |
| 55 | +$imagetool rebase --tag mydomain:v2 --sourceImage mydomain:v1 --targetImage oracle/weblogic:12.2.1.4-patched |
| 56 | +``` |
| 57 | + |
| 58 | +Then, edit the Domain Resource image reference with the new image name/tag (`mydomain:2`). |
0 commit comments