Skip to content

Commit

Permalink
edit sample docs (#2226)
Browse files Browse the repository at this point in the history
* edit sample docs

* remove x-refs
  • Loading branch information
rosemarymarano authored Feb 25, 2021
1 parent b6de65c commit c4c59ff
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ description: "Sample for using the operator to set up a WLS cluster on the Azure

### Introduction

This sample demonstrates how to use the [Oracle WebLogic Server 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 "/userguide/managing-domains/choosing-a-model/_index.md" >}}) you choose. With Domain in 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.
This sample demonstrates how to use the [Oracle WebLogic Server 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 "/userguide/managing-domains/choosing-a-model/_index.md" >}}) you choose. With Domain in 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.

#### Azure Kubernetes Service cluster

Azure Kubernetes Service makes it simple to deploy a managed Kubernetes cluster in Azure. AKS reduces the complexity and operational overhead of managing Kubernetes by offloading much of that responsibility to Azure. As a hosted Kubernetes service, Azure handles critical tasks like health monitoring and maintenance for you. The Kubernetes masters are managed by Azure. You only manage and maintain the agent nodes. As a managed Kubernetes service, AKS is free - you only pay for the agent nodes within your clusters, not for the masters.

To learn more, please see the [What is Azure Kubernetes Service?](https://docs.microsoft.com/en-us/azure/aks/intro-kubernetes).
To learn more, see the [What is Azure Kubernetes Service?](https://docs.microsoft.com/en-us/azure/aks/intro-kubernetes).

#### Domain home source types

This sample demonstrates running the WebLogic cluster on AKS using two domain home types. The instructions for each are self contained and independent. This section lists the domain home source types recommended for use with AKS, along with some benefits of each. For complete details on domain home source types, see [Choose a domain home source type]({{< relref "/userguide/managing-domains/choosing-a-model/_index.md" >}}).
This sample demonstrates running the WebLogic cluster on AKS using two domain home types. The instructions for each are self-contained and independent. This section lists the domain home source types recommended for use with AKS, along with some benefits of each. For complete details on domain home source types, see [Choose a domain home source type]({{< relref "/userguide/managing-domains/choosing-a-model/_index.md" >}}).

- [Model in Image]({{< relref "/samples/simple/azure-kubernetes-service/model-in-image.md" >}}): running the WebLogic cluster on AKS with domain home in image offers the following benefits.
- [Model in Image]({{< relref "/samples/simple/azure-kubernetes-service/model-in-image.md" >}}): running the WebLogic cluster on AKS with domain home in image offers the following benefits:

- Reuse image to create different domains with different `domainUID` and different configurations.
- Mutate the domain home configuration with additional model files supplied in a `ConfigMap`. Many such changes do not need to restart the entire domain for the change to take effect.
- The model file syntax is far simpler and less error prone than the configuration override syntax, and, unlike configuration overrides, allows you to directly add data sources and JMS modules.

- [Domain in PV]({{< relref "/samples/simple/azure-kubernetes-service/domain-on-pv.md" >}}): running the WebLogic cluster on AKS with domain home in PV offers the following benefits.
- [Domain in PV]({{< relref "/samples/simple/azure-kubernetes-service/domain-on-pv.md" >}}): running the WebLogic cluster on AKS with domain home in PV offers the following benefits:

- Use standard Oracle-provided images with patches installed.
- No docker environment required. You are able to run your business quickly without building knowledge of docker.
- No Docker environment required. You are able to run your business quickly without building knowledge of Docker.
- Mutate the live domain configuration with Administration Console from a browser or WLST.

### References
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This sample demonstrates how to use the [Oracle WebLogic Server Kubernetes Opera
- [Deploy sample application](#deploy-sample-application)
- [Access WebLogic Server logs](#access-weblogic-server-logs)
- [Clean up resources](#clean-up-resources)
- [Troubleshooting](#troubleshooting)
- [Troubleshooting](#troubleshooting)
- [Useful links](#useful-links)

{{< readfile file="/samples/simple/azure-kubernetes-service/includes/prerequisites-01.txt" >}}
Expand All @@ -37,7 +37,7 @@ $ git clone https://github.com/oracle/weblogic-kubernetes-operator.git

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

> **Note**: If you run into VM size failure, see [Troubleshooting - Virtual Machine size is not supported]({{< relref "/samples/simple/azure-kubernetes-service/troubleshooting#virtual-machine-size-is-not-supported" >}}).
**Note**: If you run into VM size failure, see [Troubleshooting - Virtual Machine size is not supported]({{< relref "/samples/simple/azure-kubernetes-service/troubleshooting#virtual-machine-size-is-not-supported" >}}).

{{< readfile file="/samples/simple/azure-kubernetes-service/includes/create-aks-cluster-storage.txt" >}}

Expand Down Expand Up @@ -121,18 +121,18 @@ sh.helm.release.v1.weblogic-operator.v1 helm.sh/release.v1
weblogic-operator-secrets Opaque 1 5m41s
```

> **Note**: If the `NAME` column in your output is missing any of the values shown above, please reexamine your execution of the preceding steps in this sample to ensure that you correctly followed all of them. The `default-token-mwdj8` shown above will have a different ending in your output.
**Note**: If the `NAME` column in your output is missing any of the values shown above, please reexamine your execution of the preceding steps in this sample to ensure that you correctly followed all of them. The `default-token-mwdj8` shown above will have a different ending in your output.

##### Create WebLogic Domain
We will use the `kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain.sh` script to create the WLS domain in the persistent volume we created previously.

We need to set up the domain configuration for the WebLogic domain.

1. Check if resources are ready
1. Check if resources are ready.

If you used the automation script to create the AKS cluster, skip this step and go to step 2.

If you create Azure resources step by step according to the steps above, validate all the resources created above using the script `kubernetes/samples/scripts/create-weblogic-domain-on-azure-kubernetes-service/validate.sh`.
If you created Azure resources, step-by-step, according to the previous steps, then validate that all the resources above were created by using the script `kubernetes/samples/scripts/create-weblogic-domain-on-azure-kubernetes-service/validate.sh`.

Use the following commands to check if the resources are ready:

Expand Down Expand Up @@ -165,7 +165,7 @@ We need to set up the domain configuration for the WebLogic domain.
Persistent Volume Claim: wls-azurefile-1612795811
```

2. Now let's ask the operator to create a WebLogic Server domain within the AKS cluster.
2. Now let's ask the operator to create a WebLogic Server domain within the AKS cluster.

For complete details on domain creation, see [Domain home on a PV - Use the script to create a domain]({{< relref "/samples/simple/domains/domain-home-on-pv#use-the-script-to-create-a-domain" >}}). If you do not want the complete details and just want to continue with the domain creation for AKS, invoke the `create-domain.sh` script as shown next.

Expand All @@ -191,11 +191,11 @@ We need to set up the domain configuration for the WebLogic domain.
Failed to pull image "container-registry.oracle.com/middleware/weblogic:12.2.1.4": rpc error: code = Unknown desc = Error response from daemon: Get https://container-registry-phx.oracle.com/v2/middleware/weblogic/manifests/12.2.1.4: unauthorized: authentication required
```

Ensure the arguments you passed to the script `create-docker-credentials-secret.sh` are correct with respect to your Oracle SSO credentials.
Ensure that the arguments you passed to the script `create-docker-credentials-secret.sh` are correct with respect to your Oracle SSO credentials.

The following example output shows the WebLogic domain was created successfully.

{{%expand "Click here to view the example output." %}}
{{%expand "Click here to view the example output." %}}
```bash
$ ./create-domain.sh -i ~/azure/weblogic-on-aks/my-create-domain-inputs.yaml -o ~/azure -e -v
Input parameters being used
Expand Down Expand Up @@ -270,7 +270,7 @@ We need to set up the domain configuration for the WebLogic domain.
```
{{% /expand %}}
> **Note**: If your output does not show a successful completion, you must
**Note**: If your output does not show a successful completion, you must
troubleshoot the reason and resolve it before proceeding to the next
step.
Expand All @@ -297,7 +297,7 @@ We need to set up the domain configuration for the WebLogic domain.
type: LoadBalancer
```
Use the sample configuration file `kubernetes/samples/scripts/create-weblogic-domain-on-azure-kubernetes-service/domain-on-pv/cluster-lb.yaml` to create a load balancer service for the managed servers. If you are choosing not to use the predefined YAML file and instead created new one with customized values, then substitute the following content with you domain values.
Use the sample configuration file `kubernetes/samples/scripts/create-weblogic-domain-on-azure-kubernetes-service/domain-on-pv/cluster-lb.yaml` to create a load balancer service for the Managed Servers. If you are choosing not to use the predefined YAML file and instead created new one with customized values, then substitute the following content with you domain values.
```yaml
apiVersion: v1
Expand Down Expand Up @@ -356,7 +356,7 @@ We need to set up the domain configuration for the WebLogic domain.
weblogic-operator-56654bcdb7-qww7f 1/1 Running 0 25m
```
{{% notice tip %}} If Kubernetes advertises the WebLogic pod as `Running` you can be assured the WebLogic Server actually is running because the operator ensures the Kubernetes health checks are actually polling the WebLogic health check mechanism.
{{% notice tip %}} If Kubernetes advertises the WebLogic pod as `Running` you can be assured the WebLogic Server actually is running because the operator ensures that the Kubernetes health checks are actually polling the WebLogic health check mechanism.
{{% /notice %}}
Get the addresses of the Administration Server and Managed Servers (please wait for the external IP addresses to be assigned):
Expand Down Expand Up @@ -439,7 +439,7 @@ To deploy a sample application on WLS, you may skip to the section [Deploy sampl
If you want to automate the above steps of creating AKS cluster and WLS domain, you can use the script `kubernetes/samples/scripts/create-weblogic-domain-on-azure-kubernetes-service/create-domain-on-aks.sh`.
The sample script will create a WLS domain home on the AKS cluster, including
The sample script will create a WLS domain home on the AKS cluster, including:
- 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.
- Creating WLS domain home.
- Generating the domain resource YAML files, which can be used to restart the Kubernetes artifacts of the corresponding domain.
Expand All @@ -452,7 +452,7 @@ For input values, you can edit `kubernetes/samples/scripts/create-weblogic-domai
| `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/simple/azure-kubernetes-service/domain-on-pv#create-a-service-principal-for-aks" >}}) section. |
| `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/simple/azure-kubernetes-service/domain-on-pv#create-a-service-principal-for-aks" >}}) section. |
| `dockerEmail` | `yourDockerEmail` | Oracle Single Sign-On (SSO) account email, used to pull the WebLogic Server Docker image. |
| `dockerPassword` | `yourDockerPassword`| Password for Oracle SSO account, used to pull the WebLogic Server Docker image. In clear text. |
| `dockerPassword` | `yourDockerPassword`| Password for Oracle SSO account, used to pull the WebLogic Server Docker image, in clear text. |
| `dockerUserName` | `yourDockerId` | The same value as `dockerEmail`. |
| `namePrefix` | `0730` | Alphanumeric value used as a disambiguation prefix for several Kubernetes resources. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Found an existing application instance of "5pn2s201-nq4q-43n1-z942-p9r9571qr3rp"
Insufficient privileges to complete the operation.
```

The problem may be a pre-existing service principal with the same name. Either delete the other Service Principal or pick a different name.
The problem may be a pre-existing service principal with the same name. Either delete the other service principal or pick a different name.

Successful output will look like the following:

Expand Down Expand Up @@ -74,9 +74,9 @@ You will need an Oracle account. The following steps will direct you to accept t

- 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.
- The Oracle Container Registry provides a WebLogic Server 12.2.1.4.0 Docker image, which already has the necessary patches applied, and the Oracle WebLogic Server 12.2.1.4.0 and 14.1.1.0.0 images, which do not require any patches.
- Ensure Docker desktop is running. Find and then pull the WebLogic 12.2.1.4 install image:
- Ensure that Docker desktop is running. Find and then pull the WebLogic 12.2.1.4 install image:
```bash
$ docker pull container-registry.oracle.com/middleware/weblogic:12.2.1.4
```

If you have problems accessing the Oracle Container Registry, you can build your own docker images from the [Oracle GitHub repository](https://github.com/oracle/docker-images/tree/main/OracleWebLogic/dockerfiles).
If you have problems accessing the Oracle Container Registry, you can build your own Docker images from the [Oracle GitHub repository](https://github.com/oracle/docker-images/tree/main/OracleWebLogic/dockerfiles).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#### Create the AKS cluster

This sample requires that you disable the AKS addon `http_application_routing` by default. If you want to enable `http_application_routing`, please follow [HTTP application routing](https://docs.microsoft.com/azure/aks/http-application-routing).
This sample requires that you disable the AKS addon `http_application_routing` by default. If you want to enable `http_application_routing`, then follow [HTTP application routing](https://docs.microsoft.com/azure/aks/http-application-routing).

Run the following commands to create the AKS cluster instance.

Expand Down Expand Up @@ -43,12 +43,11 @@ Successful output will look similar to:
Merged "wlsaks1596087429" as current context in /home/username/.kube/config
```

After your Kubernetes cluster is up and running, run the following commands to make sure kubectl can access the Kubernetes cluster:
After your Kubernetes cluster is up and running, run the following commands to make sure `kubectl` can access the Kubernetes cluster:

```shell
$ kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
aks-pool1haiche-33688868-vmss000000 Ready agent 4m25s v1.17.13 10.240.0.4 <none> Ubuntu 16.04.7 LTS 4.15.0-1098-azure docker://19.3.12
aks-pool1haiche-33688868-vmss000001 Ready agent 4m12s v1.17.13 10.240.0.5 <none> Ubuntu 16.04.7 LTS 4.15.0-1098-azure docker://19.3.12
```

Loading

0 comments on commit c4c59ff

Please sign in to comment.