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
Merge branch 'edburns-msft-em-6234-reza-fixes' into 'main'
Fixes from m_reza_rahman
See merge request weblogic-cloud/weblogic-kubernetes-operator!4854
(cherry picked from commit 591f2b1)
1678873 Bug fixes, simplifications, and updates
c7349d9 improve scripts
e97b9d0 update content of domain on PV sample automation.
951ed56 clarify editing create-domain-on-aks-inputs.sh is optional
eb5599f Merge remote-tracking branch 'oracle/main' into edburns-msft-em-6234-reza-fixes
c805927 improve script comments
49d2a7a increase the max wait time
Copy file name to clipboardExpand all lines: documentation/site/content/samples/azure-kubernetes-service/_index.md
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,10 @@ description: "Sample for using the operator to set up a WLS cluster on the Azure
11
11
12
12
This sample demonstrates how to use the [WebLogic Kubernetes Operator]({{< relref "/_index.md" >}}) (hereafter "the operator") to set up a WebLogic Server (WLS) cluster on the Azure Kubernetes Service (AKS). After going through the steps, your WLS domain runs on an AKS cluster. You have several options for managing the cluster, depending on which [domain home source type]({{< relref "/managing-domains/choosing-a-model/_index.md" >}}) you choose. With Domain on PV, you can manage your WLS domain by accessing the WebLogic Server Administration Console or WLST. With Model in Image, you use the operator to perform WLS administrative operations.
13
13
14
-
**NOTE**: For an alternative approach to this sample,
15
-
see the [Oracle WebLogic Server on AKS from the Azure Marketplace]({{<relref "/managing-domains/aks/_index.md">}})
16
-
offering which automates the provisioning of
17
-
AKS cluster, AKS resources, the Azure Container Registry (ACR),
18
-
WebLogic Kubernetes Operator, and WebLogic Server images.
14
+
{{% notice note %}}
15
+
For an alternative approach to this sample, see the [Oracle WebLogic Server on AKS Azure Marketplace offering]({{<relref "/managing-domains/aks/_index.md">}}), which automates the provisioning of
16
+
the AKS cluster, AKS resources, Azure Container Registry (ACR), load-balancer, WebLogic Kubernetes Operator, and WebLogic Server images.
Copy file name to clipboardExpand all lines: documentation/site/content/samples/azure-kubernetes-service/domain-on-pv.md
+33-22Lines changed: 33 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ weight: 2
5
5
description: "Sample for creating a WebLogic domain home on an existing PV or PVC on the Azure Kubernetes Service."
6
6
---
7
7
8
-
This sample demonstrates how to use the [WebLogic Kubernetes Operator](https://oracle.github.io/weblogic-kubernetes-operator) (hereafter "the operator") to set up a WebLogic Server (WLS) cluster on the Azure Kubernetes Service (AKS) using the domain on PV approach. After going through the steps, your WLS domain runs on an AKS cluster instance and you can manage your WLS domain by accessing the WebLogic Server Administration Console.
8
+
This sample demonstrates how to use the [WebLogic Kubernetes Operator](https://oracle.github.io/weblogic-kubernetes-operator) (hereafter "the operator") to set up a WebLogic Server (WLS) cluster on the Azure Kubernetes Service (AKS) using the domain on PV approach. After going through the steps, your WLS domain runs on an AKS cluster and you can manage your WLS domain by accessing the WebLogic Server Administration Console.
9
9
10
10
#### Contents
11
11
@@ -32,6 +32,8 @@ This sample demonstrates how to use the [WebLogic Kubernetes Operator](https://o
32
32
33
33
##### Prepare parameters
34
34
35
+
Set required parameters by running the following commands.
36
+
35
37
```shell
36
38
# Change these parameters as needed for your own environment
37
39
export ORACLE_SSO_EMAIL=<replace with your oracle account email>
{{% 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.
@@ -215,27 +217,32 @@ Now that you have created the AKS cluster, installed the operator, and verified
215
217
216
218
##### Create secrets
217
219
218
-
You will use the `$BASE_DIR/sample-scripts/create-weblogic-domain-credentials/create-weblogic-credentials.sh` script to create the domain WebLogic administrator credentials as a Kubernetes secret. Please run:
220
+
You will use the `$BASE_DIR/sample-scripts/create-weblogic-domain-credentials/create-weblogic-credentials.sh` script to create the domain WebLogic administrator credentials as a Kubernetes secret. Please run the following commands:
219
221
220
222
```
221
223
cd $BASE_DIR/sample-scripts/create-weblogic-domain-credentials
The output will show something similar to the following:
230
+
226
231
```
227
232
secret/domain1-weblogic-credentials created
228
233
secret/domain1-weblogic-credentials labeled
229
234
The secret domain1-weblogic-credentials has been successfully created in the default namespace.
230
235
```
231
236
232
-
233
-
You will use the `kubernetes/samples/scripts/create-kubernetes-secrets/create-docker-credentials-secret.sh` script to create the Docker credentials as a Kubernetes secret. Please run:
237
+
You will use the `kubernetes/samples/scripts/create-kubernetes-secrets/create-docker-credentials-secret.sh` script to create the Docker credentials as a Kubernetes secret. Please run the following commands:
Now, you deploy a `sample-domain1` domain resource and an associated `sample-domain1-cluster-1` cluster resource using a single YAML resource file which defines both resources. The domain resource and cluster resource tells the operator how to deploy a WebLogic domain. They do not replace the traditional WebLogic configuration files, but instead cooperate with those files to describe the Kubernetes artifacts of the corresponding domain.
270
280
271
-
- Run the following command to generate resource files.
281
+
- Run the following commands to generate resource files.
272
282
273
283
Export `Domain_Creation_Image_tag`, which will be referred in `create-domain-on-aks-generate-yaml.sh`.
274
284
@@ -296,12 +306,19 @@ The domain resource references the cluster resource, a WebLogic Server installat
296
306
```shell
297
307
$ kubectl apply -f admin-lb.yaml
298
308
```
309
+
310
+
The output will show something similar to the following:
311
+
299
312
```
300
313
service/domain1-admin-server-external-lb created
301
314
```
315
+
302
316
```shell
303
317
$ kubectl apply -f cluster-lb.yaml
304
318
```
319
+
320
+
The output will show something similar to the following:
321
+
305
322
```
306
323
service/domain1-cluster-1-external-lb created
307
324
```
@@ -363,7 +380,7 @@ The domain resource references the cluster resource, a WebLogic Server installat
363
380
364
381
```
365
382
366
-
In the example, the URL to access the Administration Server is: `http://4.157.147.131/console`.
383
+
In the example, the URL to access the Administration Server is: `http://4.157.147.131:7001/console`.
367
384
The user name and password that you enter for the Administration Console must match the ones you specified for the `domain1-weblogic-credentials` secret in the [Create secrets](#create-secrets) step.
368
385
369
386
If the WLS Administration Console is still not available, use `kubectl get events --sort-by='.metadata.creationTimestamp' ` to troubleshoot.
@@ -372,25 +389,20 @@ The domain resource references the cluster resource, a WebLogic Server installat
372
389
$ kubectl get events --sort-by='.metadata.creationTimestamp'
373
390
```
374
391
375
-
To access the sample application on WLS, you may skip to the section [Access sample application](#access-sample-application). The next section includes a script that automates all of the preceding steps.
392
+
To access the sample application on WLS, skip to the section [Access sample application](#access-sample-application). The next section includes a script that automates all of the preceding steps.
376
393
377
394
#### Automation
378
395
379
-
If you want to automate the above steps of creating AKS cluster and WLS domain, you can use the script `${BASE_DIR}/sample-scripts/create-weblogic-domain-on-azure-kubernetes-service/create-domain-on-aks.sh`.
396
+
If you want to automate the above steps of creating the AKS cluster and WLS domain, you can use the script `${BASE_DIR}/sample-scripts/create-weblogic-domain-on-azure-kubernetes-service/create-domain-on-aks.sh`.
380
397
381
398
The sample script will create a WLS domain home on the AKS cluster, including:
382
399
- Creating a new Azure resource group, with a new Azure Storage Account and Azure File Share to allow WebLogic to persist its configuration and data separately from the Kubernetes pods that run WLS workloads.
383
400
- Creating WLS domain home.
384
401
- Generating the domain resource YAML files, which can be used to restart the Kubernetes artifacts of the corresponding domain.
385
402
386
-
For input values, you can edit `${BASE_DIR}/sample-scripts/create-weblogic-domain-on-azure-kubernetes-service/create-domain-on-aks-inputs.sh` directly. The following values must be specified:
403
+
To customize the WLS domain, you can optionally edit `${BASE_DIR}/sample-scripts/create-weblogic-domain-on-azure-kubernetes-service/create-domain-on-aks-inputs.sh`.
@@ -400,7 +412,7 @@ $ cd ${BASE_DIR}/sample-scripts/create-weblogic-domain-on-azure-kubernetes-servi
400
412
$ ./create-domain-on-aks.sh
401
413
```
402
414
403
-
The script will print the Administration Server address after a successful deployment.
415
+
The script will take some time to run. The script will print the Administration Server address after a successful deployment.
404
416
To interact with the cluster using `kubectl`, use `az aks get-credentials` as shown in the script output.
405
417
406
418
{{% notice info %}} You now have created an AKS cluster with Azure Files NFS share to contain the WLS domain configuration files. Using those artifacts, you have used the operator to create a WLS domain.
@@ -421,12 +433,11 @@ Access the sample application using the cluster load balancer IP address.
421
433
$ CLUSTER_IP=$(kubectl get svc domain1-cluster-1-lb -o=jsonpath='{.status.loadBalancer.ingress[0].ip}')
Copy file name to clipboardExpand all lines: documentation/site/content/samples/azure-kubernetes-service/includes/aks-connect-acr.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
Finally, connect AKS to the ACR. For more details on connecting ACR to an existing AKS, see [Configure ACR integration for existing AKS clusters](https://learn.microsoft.com/en-us/azure/aks/cluster-container-registry-integration?tabs=azure-cli#configure-acr-integration-for-an-existing-aks-cluster).
1
+
Finally, connect the AKS cluster to the ACR. For more details on connecting ACR to an existing AKS, see [Configure ACR integration for existing AKS clusters](https://learn.microsoft.com/en-us/azure/aks/cluster-container-registry-integration?tabs=azure-cli#configure-acr-integration-for-an-existing-aks-cluster).
Copy file name to clipboardExpand all lines: documentation/site/content/samples/azure-kubernetes-service/includes/clean-up-resources-body-01.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
The output from the `create-domain-on-aks.sh` script includes a statement about the Azure resources created by the script. To delete the cluster and free all related resources, simply delete the resource groups. The output will list the resource groups, such as.
1
+
If you used the automation script, the output from the `create-domain-on-aks.sh` script includes a statement about the Azure resources created by the script. To delete the cluster and free all related resources, simply delete the resource groups. The output will list the resource groups, such as:
Use this value to sign in to the ACR instance. Note that because you are signing in with the `az` cli, you do not need a password because your identity is already conveyed by having done `az login` previously.
15
+
Use this value to sign in to the ACR instance. Note that because you are signing in with the `az` CLI, you do not need a password because your identity is already conveyed by having done `az login` previously.
Copy file name to clipboardExpand all lines: documentation/site/content/samples/azure-kubernetes-service/includes/create-aks-cluster-body-01.txt
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,19 @@
1
1
##### Oracle Container Registry
2
2
3
-
You will need an Oracle account. The following steps will direct you to accept the license agreement for WebLogic Server. Make note of your Oracle Account password and email. This sample pertains to 12.2.1.4, but other versions may work as well.
3
+
The following steps will direct you to accept the license agreement for WebLogic Server. Make note of your Oracle Account password and email. This sample pertains to 12.2.1.4, but other versions may work as well.
4
4
5
5
- In a web browser, navigate to https://container-registry.oracle.com and log in using the Oracle Single Sign-On authentication service. If you do not already have SSO credentials, at the top of the page, click the **Sign In** link to create them.
6
6
- The Oracle Container Registry provides a WebLogic 12.2.1.4 General Availability (GA) installation image that is used in this sample.
7
+
- In the Oracle Container Registry, navigate to **Middleware**, then **weblogic**.
8
+
- On the left, choose a language and accept the license agreement. You will then see a message such as: "You last accepted the Oracle Standard Terms and Restrictions on 08/10/2020 at 06:12 AM Coordinated Universal Time (UTC)."
7
9
- **NOTE**: General Availability (GA) images are suitable for demonstration and development purposes _only_ where the environments are not available from the public Internet; they are **not
8
10
acceptable for production use**. In production, you should always use CPU (patched) images
9
11
from the OCR
10
12
or create your images using the [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/userguide/tools/create-image/)
11
13
(WIT) with the `--recommendedPatches` option. For more guidance,
12
14
see [Apply the Latest Patches and Updates](https://www.oracle.com/pls/topic/lookup?ctx=en/middleware/standalone/weblogic-server/14.1.1.0&id=LOCKD-GUID-2DA84185-46BA-4D7A-80D2-9D577A4E8DE2)
13
15
in _Securing a Production Environment for Oracle WebLogic Server_.
14
-
- Ensure that Docker is running. Find and then pull the WebLogic 12.2.1.4 installation image:
16
+
- Ensure that Docker is running. Find and pull the WebLogic 12.2.1.4 installation image:
Copy file name to clipboardExpand all lines: documentation/site/content/samples/azure-kubernetes-service/includes/create-aks-cluster-body-02.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
4
4
This sample doesn't enable application routing. If you want to enable application routing, follow [Managed nginx Ingress with the application routing add-on in AKS](https://learn.microsoft.com/azure/aks/app-routing?tabs=default%2Cdeploy-app-default).
5
5
6
-
Run the following commands to create the AKS cluster instance.
6
+
Run the following command to create the AKS cluster.
0 commit comments