Skip to content

Commit 4624720

Browse files
committed
Merge branch 'mii-auxiliary-image' into 'main'
Modify AKS mii sample to use auxiliary image. See merge request weblogic-cloud/weblogic-kubernetes-operator!4788 (cherry picked from commit 2c6a2d5) b7c8596 modify mii sample to use auxiliary image. 05784ac On branch edburns-msft-o-483
1 parent 19179cd commit 4624720

File tree

12 files changed

+328
-256
lines changed

12 files changed

+328
-256
lines changed

documentation/site/content/samples/azure-kubernetes-service/domain-on-pv.md

Lines changed: 6 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,7 @@ export ACR_NAME="${NAME_PREFIX}acr${TIMESTAMP}"
5757

5858
{{< readfile file="/samples/azure-kubernetes-service/includes/create-aks-cluster-body-01.txt" >}}
5959

60-
##### Sign in with Azure CLI
61-
62-
The steps in this section show you how to sign in to the Azure CLI.
63-
64-
1. Open a Bash shell.
65-
66-
1. Sign out and delete some authentication files to remove any lingering credentials.
67-
68-
```shell
69-
$ az logout
70-
$ rm ~/.azure/accessTokens.json
71-
$ rm ~/.azure/azureProfile.json
72-
```
73-
74-
1. Sign in to your Azure CLI.
75-
76-
```shell
77-
$ az login
78-
```
79-
80-
1. Set the subscription ID. Be sure to replace the placeholder with the appropriate value.
81-
82-
```shell
83-
$ export SUBSCRIPTION_ID=$(az account show --query id --output tsv)
84-
$ az account set -s $SUBSCRIPTION_ID
85-
```
60+
{{< readfile file="/samples/azure-kubernetes-service/includes/sign-in-azure.txt" >}}
8661

8762
{{% notice info %}} The following sections of the sample instructions will guide you, step-by-step, through the process of setting up a WebLogic cluster on AKS - remaining as close as possible to a native Kubernetes experience. This lets you understand and customize each step. If you wish to have a more automated experience that abstracts some lower level details, you can skip to the [Automation](#automation) section.
8863
{{% /notice %}}
@@ -138,10 +113,7 @@ This sample requires [Domain creation images]({{< relref "/managing-domains/doma
138113

139114
##### Image creation - Introduction
140115

141-
The goal of image creation is to demonstrate using the WebLogic Image Tool to create an image tagged as `wdt-domain-image:WLS-v1` from files that you will stage to `${WDT_MODEL_FILES_PATH}/WLS-v1`.
142-
143-
- The directory where the WebLogic Deploy Tooling software is installed (also known as WDT Home), expected in an image’s `/auxiliary/weblogic-deploy` directory, by default.
144-
- WDT model YAML (model), WDT variable (property), and WDT archive ZIP (archive) files, expected in directory `/auxiliary/models`, by default.
116+
{{< readfile file="/samples/azure-kubernetes-service/includes/auxiliary-image-directory.txt" >}}
145117

146118
##### Understanding your first archive
147119

@@ -170,46 +142,11 @@ An image can contain multiple properties files, archive ZIP files, and model YAM
170142

171143
##### Creating the image with WIT
172144

173-
At this point, you have all of the files needed for `image wdt-domain-image:WLS-v1` staged; they include:
174-
175-
- `/tmp/sample/wdt-artifacts/wdt-model-files/WLS-v1/model.10.yaml`
176-
- `/tmp/sample/wdt-artifacts/wdt-model-files/WLS-v1/model.10.properties`
177-
- `/tmp/sample/wdt-artifacts/wdt-model-files/WLS-v1/archive.zip`
178-
179-
Now, you use the Image Tool to create an image named `wdt-domain-image:WLS-v1`. You’ve already set up this tool during the prerequisite steps.
145+
{{< readfile file="/samples/azure-kubernetes-service/includes/run-mii-to-create-auxiliary-image.txt" >}}
180146

181-
Run the following commands to create the image and verify that it worked. Note that `amagetool.sh` is not supported on macOS with Apple Silicon. See [Troubleshooting - exec format error]({{< relref "/samples/azure-kubernetes-service/troubleshooting#exec-weblogic-operatorscriptsintrospectdomainsh-exec-format-error" >}}).
182-
183-
```shell
184-
$ ${WDT_MODEL_FILES_PATH}/imagetool/bin/imagetool.sh createAuxImage \
185-
--tag wdt-domain-image:WLS-v1 \
186-
--wdtModel ${WDT_MODEL_FILES_PATH}/WLS-v1/model.10.yaml \
187-
--wdtVariables ${WDT_MODEL_FILES_PATH}/WLS-v1/model.10.properties \
188-
--wdtArchive ${WDT_MODEL_FILES_PATH}/WLS-v1/archive.zip
189-
```
190-
191-
This command runs the WebLogic Image Tool to create the domain creation image and does the following:
192-
193-
- Builds the final container image as a layer on a small `busybox` base image.
194-
- Copies the WDT ZIP file that's referenced in the WIT cache into the image.
195-
- Note that you cached WDT in WIT using the keyword `latest` when you set up the cache during the sample prerequisites steps.
196-
- This lets WIT implicitly assume it's the desired WDT version and removes the need to pass a `-wdtVersion` flag.
197-
- Copies the specified WDT model, properties, and application archives to image location `/auxiliary/models`.
198-
199-
When the command succeeds, it should end with output like the following:
200-
201-
```
202-
[INFO ] Build successful. Build time=70s. Image tag=wdt-domain-image:WLS-v1
203-
```
204-
205-
Verify the image is available in the local Docker server with the following command.
206-
207-
```shell
208-
$ docker images | grep WLS-v1
209-
```
210-
```
211-
wdt-domain-image WLS-v1 012d3bfa3536 5 days ago 1.13GB
212-
```
147+
{{% notice note %}}
148+
The `imagetool.sh` is not supported on macOS with Apple Silicon. See [Troubleshooting - exec format error]({{< relref "/samples/azure-kubernetes-service/troubleshooting#exec-weblogic-operatorscriptsintrospectdomainsh-exec-format-error" >}}).
149+
{{% /notice %}}
213150

214151
{{% notice note %}}
215152
You may run into a `Dockerfile` parsing error if your Docker buildkit is enabled, see [Troubleshooting - WebLogic Image Tool failure]({{< relref "/samples/azure-kubernetes-service/troubleshooting#weblogic-image-tool-failure" >}}).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The goal of image creation is to demonstrate using the WebLogic Image Tool to create an image tagged as `wdt-domain-image:WLS-v1` from files that you will stage to `${WDT_MODEL_FILES_PATH}/WLS-v1/`.
2+
3+
- The directory where the WebLogic Deploy Tooling software is installed (also known as WDT Home) is expected in an image’s `/auxiliary/weblogic-deploy` directory.
4+
- WDT model YAML (model), WDT variable (property), and WDT archive ZIP (archive) files are expected in directory `/auxiliary/models`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
At this point, you have all of the files needed for `image wdt-domain-image:WLS-v1` staged; they include:
2+
3+
- `/tmp/sample/wdt-artifacts/wdt-model-files/WLS-v1/model.10.yaml`
4+
- `/tmp/sample/wdt-artifacts/wdt-model-files/WLS-v1/model.10.properties`
5+
- `/tmp/sample/wdt-artifacts/wdt-model-files/WLS-v1/archive.zip`
6+
7+
Now, you use the Image Tool to create an image named `wdt-domain-image:WLS-v1`. You’ve already set up this tool during the prerequisite steps.
8+
9+
Run the following commands to create the image and verify that it worked.
10+
11+
```shell
12+
$ ${WDT_MODEL_FILES_PATH}/imagetool/bin/imagetool.sh createAuxImage \
13+
--tag wdt-domain-image:WLS-v1 \
14+
--wdtModel ${WDT_MODEL_FILES_PATH}/WLS-v1/model.10.yaml \
15+
--wdtVariables ${WDT_MODEL_FILES_PATH}/WLS-v1/model.10.properties \
16+
--wdtArchive ${WDT_MODEL_FILES_PATH}/WLS-v1/archive.zip
17+
```
18+
19+
This command runs the WebLogic Image Tool to create the domain creation image and does the following:
20+
21+
- Builds the final container image as a layer on a small `busybox` base image.
22+
- Copies the WDT ZIP file that's referenced in the WIT cache into the image.
23+
- Note that you cached WDT in WIT using the keyword `latest` when you set up the cache during the sample prerequisites steps.
24+
- This lets WIT implicitly assume it's the desired WDT version and removes the need to pass a `-wdtVersion` flag.
25+
- Copies the specified WDT model, properties, and application archives to image location `/auxiliary/models`.
26+
27+
When the command succeeds, it should end with output like the following:
28+
29+
```
30+
[INFO ] Build successful. Build time=70s. Image tag=wdt-domain-image:WLS-v1
31+
```
32+
33+
Verify the image is available in the local Docker server with the following command.
34+
35+
```shell
36+
$ docker images | grep WLS-v1
37+
```
38+
```
39+
wdt-domain-image WLS-v1 012d3bfa3536 5 days ago 1.13GB
40+
```
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
##### Sign in with Azure CLI
2+
3+
The steps in this section show you how to sign in to the Azure CLI.
4+
5+
1. Open a Bash shell.
6+
7+
1. Sign out and delete some authentication files to remove any lingering credentials.
8+
9+
```shell
10+
$ az logout
11+
$ rm ~/.azure/accessTokens.json
12+
$ rm ~/.azure/azureProfile.json
13+
```
14+
15+
1. Sign in to your Azure CLI.
16+
17+
```shell
18+
$ az login
19+
```
20+
21+
1. Set the subscription ID. Be sure to replace the placeholder with the appropriate value.
22+
23+
```shell
24+
$ export SUBSCRIPTION_ID="<your-sub-id>"
25+
$ az account set -s $SUBSCRIPTION_ID
26+
```

0 commit comments

Comments
 (0)