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
Clone the [WebLogic Kubernetes Operator repository](https://github.com/oracle/weblogic-kubernetes-operator) to your machine. You will use several scripts in this repository to create a WebLogic domain. This sample was tested with v3.3.7, but should work with the latest release.
29
+
Clone the [WebLogic Kubernetes Operator repository](https://github.com/oracle/weblogic-kubernetes-operator) to your machine. You will use several scripts in this repository to create a WebLogic domain. This sample was tested with v3.4.2, but should work with the latest release.
The steps in this section show you how to sign in to the Azure CLI.
38
+
39
+
1. Open a Bash shell.
40
+
41
+
1. Sign out and delete some authentication files to remove any lingering credentials.
42
+
43
+
```shell
44
+
$ az logout
45
+
$ rm ~/.azure/accessTokens.json
46
+
$ rm ~/.azure/azureProfile.json
47
+
```
48
+
49
+
1. Sign in to your Azure CLI.
50
+
51
+
```shell
52
+
$ az login
53
+
```
54
+
55
+
1. Set the subscription ID. Be sure to replace the placeholder with the appropriate value.
56
+
57
+
```shell
58
+
$ export SUBSCRIPTION_ID=<your-subscription-id>
59
+
$ az account set -s $SUBSCRIPTION_ID
60
+
```
61
+
35
62
{{% 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.
36
63
{{% /notice %}}
37
64
@@ -495,9 +522,6 @@ For input values, you can edit `kubernetes/samples/scripts/create-weblogic-domai
495
522
496
523
| Name in YAML file | Example value | Notes |
497
524
|-------------------|---------------|-------|
498
-
| `azureServicePrincipalAppId` | `nr086o75-pn59-4782-no5n-nq2op0rsr1q6` | Application ID of your service principal; refer to the application ID in the [Create Service Principal]({{< relref "/samples/azure-kubernetes-service/domain-on-pv#create-a-service-principal-for-aks" >}}) section. |
499
-
| `azureServicePrincipalClientSecret` | `8693089o-q190-45ps-9319-or36252s3s90` | A client secret of your service principal; refer to the client secret in the [Create Service Principal]({{< relref "/samples/azure-kubernetes-service/domain-on-pv#create-a-service-principal-for-aks" >}}) section. |
500
-
| `azureServicePrincipalTenantId` | `72s988os-86s1-cafe-babe-2q7pq011qo47` | Tenant (Directory ) ID of your service principal; refer to the client secret in the [Create Service Principal]({{< relref "/samples/azure-kubernetes-service/domain-on-pv#create-a-service-principal-for-aks" >}}) section. |
501
525
| `dockerEmail` | `yourDockerEmail` | Oracle Single Sign-On (SSO) account email, used to pull the WebLogic Server Docker image. |
502
526
| `dockerPassword` | `yourDockerPassword`| Password for Oracle SSO account, used to pull the WebLogic Server Docker image, in clear text. |
503
527
| `dockerUserName` | `yourDockerId` | The same value as `dockerEmail`. |
@@ -524,46 +548,140 @@ The script will print the Administration Server address after a successful deplo
524
548
525
549
#### Deploy sample application
526
550
527
-
Now that you have WLS running in AKS, you can test the cluster by deploying the simple sample application included in the repository:
528
-
529
-
1. Go to the WebLogic Server Administration Console, Select "Lock & Edit".
530
-
1. Select Deployments.
531
-
1. Select Install.
532
-
1. Select Upload your file(s).
533
-
1. For the Deployment Archive, Select "Choose File".
534
-
1. Select the file `kubernetes/samples/charts/application/testwebapp.war`.
535
-
1. Select Next. Choose 'Install this deployment as an application'.
536
-
1. Select Next. Select cluster-1 and All servers in the cluster. Select Next.
537
-
1. Accept the defaults in the next screen and select Next
538
-
1. Select Finish.
539
-
1. Select Activate Changes.
540
-
541
-
{{%expand "Click here to view the application deployment screenshot." %}}
-rw-r--r-- 1 user user 3528 Jul 5 14:25 /tmp/testwebapp/testwebapp.war
578
+
```
555
579
556
-
```shell
557
-
$ kubectl get svc domain1-cluster-1-external-lb
580
+
Now, you are able to deploy the sample application in `/tmp/testwebapp/testwebapp.war` to the cluster. This sample uses WLS RESTful API [/management/weblogic/latest/edit/appDeployments](https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/wlrer/op-management-weblogic-version-edit-appdeployments-x-operations-1.html) to deploy the sample application. The WLS administration account and password in this sample are `weblogic:welcome1`, replace them with your value created in [Create WebLogic domain secrets](#create-secrets):
581
+
582
+
```bash
583
+
$ ADMIN_SERVER_IP=$(kubectl get svc domain1-admin-server-external-lb -o=jsonpath='{.status.loadBalancer.ingress[0].ip}')
Copy file name to clipboardExpand all lines: documentation/3.4/content/samples/azure-kubernetes-service/includes/create-aks-cluster-body-01.txt
-70Lines changed: 0 additions & 70 deletions
Original file line number
Diff line number
Diff line change
@@ -1,73 +1,3 @@
1
-
##### Create a Service Principal for AKS
2
-
3
-
An AKS cluster requires either an [Azure Active Directory (AD) service principal](https://docs.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals) or a [managed identity](https://docs.microsoft.com/azure/aks/use-managed-identity) to interact with Azure resources.
4
-
5
-
We will use a service principal to create an AKS cluster. Follow the commands below to create a new service principal.
6
-
7
-
Please run `az login` first. Do set the subscription you want to work with. You can get a list of your subscriptions by running `az account list`.
8
-
9
-
```shell
10
-
# Login
11
-
$ az login
12
-
13
-
# Set your working subscription
14
-
$ export SUBSCRIPTION_ID=<your-subscription-id>
15
-
$ az account set -s $SUBSCRIPTION_ID
16
-
```
17
-
18
-
Create the new service principal with the following commands:
19
-
20
-
```shell
21
-
# Create Service Principal
22
-
$ export SP_NAME=myAKSClusterServicePrincipal
23
-
$ az ad sp create-for-rbac --skip-assignment --name $SP_NAME
24
-
25
-
# Copy the output to a file, we will use it later.
26
-
```
27
-
28
-
If you see an error similar to the following:
29
-
30
-
```shell
31
-
Found an existing application instance of "5pn2s201-nq4q-43n1-z942-p9r9571qr3rp". We will patch it
32
-
Insufficient privileges to complete the operation.
33
-
```
34
-
35
-
The problem may be a pre-existing service principal with the same name. Either delete the other service principal or pick a different name.
36
-
37
-
Successful output will look like the following:
38
-
39
-
```json
40
-
{
41
-
"appId": "r3qnq743-61s9-4758-8163-4qpo87s72s54",
42
-
"displayName": "myAKSClusterServicePrincipal",
43
-
"name": "http://myAKSClusterServicePrincipal",
44
-
"password": "TfhR~uOJ1C1ftD5NS_LzJJj6UOjS2OwXfz",
45
-
"tenant": "82sr215n-0ns5-404e-9161-206r0oqyq999"
46
-
}
47
-
```
48
-
49
-
Grant your service principal with a contributor role to create AKS resources.
50
-
51
-
```shell
52
-
# Use the <appId> from the output of the last command
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.
Now, you are able to create a role assignment to grant the AKS cluster **Contributor** in the scope of the storage account. Then, the AKS cluster is able to access the file share.
78
+
79
+
```shell
80
+
$ az role assignment create --assignee "${AKS_OBJECT_ID}" \
81
+
--role "Contributor" \
82
+
--scope "${STORAGE_ACCOUNT_ID}"
83
+
```
84
+
85
+
4. Configure network security.
86
+
87
+
You must configure the network security allowing access from AKS cluster to the file share.
64
88
65
89
First, you must get the virtual network name and the subnet name of the AKS cluster.
66
90
@@ -72,7 +96,10 @@ You will dynamically create and use a persistent volume with Azure Files NFS sha
Copy file name to clipboardExpand all lines: documentation/3.4/content/samples/azure-kubernetes-service/includes/prerequisites-01.txt
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,9 @@
3
3
This sample assumes the following prerequisite environment.
4
4
5
5
* Operating System: GNU/Linux, macOS or [WSL2 for Windows 10](https://docs.microsoft.com/windows/wsl/install-win10).
6
-
* [Git](https://git-scm.com/downloads); use `git --version` to test if `git` works. This document was tested with version 2.17.1.
7
-
* [Azure CLI](https://docs.microsoft.com/cli/azure); use `az --version` to test if `az` works. This document was tested with version 2.9.1.
8
-
* [Docker for Desktop](https://www.docker.com/products/docker-desktop). This document was tested with `Docker version 20.10.2, build 2291f61`
9
-
* [kubectl](https://kubernetes-io-vnext-staging.netlify.com/docs/tasks/tools/install-kubectl/); use `kubectl version` to test if `kubectl` works. This document was tested with version v1.16.3.
10
-
* [Helm](https://helm.sh/docs/intro/install/), version 3.1 and later; use `helm version` to check the `helm` version. This document was tested with version v3.2.5.
6
+
* [Git](https://git-scm.com/downloads); use `git --version` to test if `git` works. This document was tested with version 2.25.1.
7
+
* [Azure CLI](https://docs.microsoft.com/cli/azure); use `az --version` to test if `az` works. This document was tested with version 2.39.0.
8
+
* [Docker for Desktop](https://www.docker.com/products/docker-desktop). This document was tested with `Docker version 20.10.7`
9
+
* [kubectl](https://kubernetes-io-vnext-staging.netlify.com/docs/tasks/tools/install-kubectl/); use `kubectl version` to test if `kubectl` works. This document was tested with version v1.21.2.
10
+
* [Helm](https://helm.sh/docs/intro/install/), version 3.1 and later; use `helm version` to check the `helm` version. This document was tested with version v3.6.2.
11
+
* A Java JDK, Version 8 or 11. Azure recommends [Microsoft Build of OpenJDK](https://docs.microsoft.com/java/openjdk/download). Ensure that your `JAVA_HOME` environment variable is set correctly in the shells in which you run the commands.
0 commit comments