Skip to content

Commit

Permalink
Sync documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeberhard committed Feb 18, 2022
1 parent 4586bc1 commit 063fd38
Show file tree
Hide file tree
Showing 25 changed files with 260 additions and 280 deletions.
2 changes: 1 addition & 1 deletion documentation/staging/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ See [Get help]({{< relref "userguide/introduction/get-help.md" >}}).
* [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/)
* [WebLogic Monitoring Exporter](https://github.com/oracle/weblogic-monitoring-exporter)
* [WebLogic Logging Exporter](https://github.com/oracle/weblogic-logging-exporter)
* [WebLogic Remote Console](https://github.com/oracle/weblogic-remote-console)
* [WebLogic Remote Console](https://oracle.github.io/weblogic-remote-console/)
* [WebLogic Kubernetes Toolkit UI](https://oracle.github.io/weblogic-toolkit-ui/)
4 changes: 2 additions & 2 deletions documentation/staging/content/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ Updated several dependencies, including the Oracle Linux base for the container
##### Features

* The operator's container image is based on Oracle Linux 8.
* WebLogic Server container images based on Oracle Linux 8 are supported.
* WebLogic Server container images based on Oracle Linux 8 are supported.
* [Online updates]({{<relref "/userguide/managing-domains/model-in-image/runtime-updates/_index.md#online-updates">}}) of dynamic configuration changes for Model in Image.
* Automatic injection of the [WebLogic Monitoring Exporter](https://github.com/oracle/weblogic-monitoring-exporter) as a sidecar container.
* Automatic injection of the [WebLogic Monitoring Exporter](https://github.com/oracle/weblogic-monitoring-exporter) as a sidecar container.
* [Events]({{< relref "/userguide/managing-domains/domain-events.md" >}}) are generated at important moments in the life cycle of the operator or a domain.
* [PodDisruptionBudgets]({{<relref "/userguide/managing-domains/domain-lifecycle/startup.md#draining-a-node-and-poddisruptionbudget">}}) are generated for clusters improving the ability to maintain cluster availability during planned node shutdowns and Kubernetes upgrade.
* Additional scripts to assist with common tasks, such as the `scaleCluster.sh` script.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This sample demonstrates how to use the [WebLogic Kubernetes Operator](/weblogic
- [Create WebLogic domain](#create-weblogic-domain)
- [Automation](#automation)
- [Deploy sample application](#deploy-sample-application)
- [Access WebLogic Server logs](#access-weblogic-server-logs)
- [Validate NFS volume](#validate-nfs-volume)
- [Clean up resources](#clean-up-resources)
- [Troubleshooting](#troubleshooting)
- [Useful links](#useful-links)
Expand All @@ -26,7 +26,7 @@ This sample demonstrates how to use the [WebLogic Kubernetes Operator](/weblogic

##### Clone WebLogic Kubernetes Operator repository

Clone the [WebLogic Kubernetes Operator repository](https://github.com/oracle/weblogic-kubernetes-operator) to your machine. We will use several scripts in this repository to create a WebLogic domain. This sample was tested with v3.1.1, but should work with the latest release.
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.

```shell
$ git clone --branch v{{< latestVersion >}} https://github.com/oracle/weblogic-kubernetes-operator.git
Expand All @@ -52,17 +52,15 @@ Kubernetes Operators use [Helm](https://helm.sh/) to manage Kubernetes applicati
$ helm repo add weblogic-operator https://oracle.github.io/weblogic-kubernetes-operator/charts --force-update
```
```shell
$ helm install weblogic-operator weblogic-operator/weblogic-operator --version "3.1.1"
$ helm install weblogic-operator weblogic-operator/weblogic-operator --version "3.3.7"
```

The output will show something similar to the following:

```shell
$ helm install weblogic-operator weblogic-operator/weblogic-operator --version "3.1.1"
```
```
$ helm install weblogic-operator weblogic-operator/weblogic-operator --version "3.3.7"
NAME: weblogic-operator
LAST DEPLOYED: Wed Jul 1 23:47:44 2020
LAST DEPLOYED: Tue Jan 18 17:07:56 2022
NAMESPACE: default
STATUS: deployed
REVISION: 1
Expand All @@ -87,11 +85,11 @@ weblogic-operator-56654bcdb7-qww7f 1/1 Running 0
- [Create secrets](#create-secrets)
- [Create WebLogic Domain](#create-weblogic-domain-1)

Now that we have created the AKS cluster, installed the operator, and verified that the operator is ready to go, we can have the operator create a WLS domain.
Now that You have created the AKS cluster, installed the operator, and verified that the operator is ready to go, you can have the operator create a WLS domain.

##### Create secrets

We will use the `kubernetes/samples/scripts/create-weblogic-domain-credentials/create-weblogic-credentials.sh` script to create the domain credentials as a Kubernetes secret. Please run:
You will use the `kubernetes/samples/scripts/create-weblogic-domain-credentials/create-weblogic-credentials.sh` script to create the domain credentials as a Kubernetes secret. Please run:

```
# cd kubernetes/samples/scripts/create-weblogic-domain-credentials
Expand All @@ -104,8 +102,7 @@ secret/domain1-weblogic-credentials created
secret/domain1-weblogic-credentials labeled
The secret domain1-weblogic-credentials has been successfully created in the default namespace.
```

We 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:
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:

```shell
# Please change imagePullSecretNameSuffix if you change pre-defined value "regcred" before generating the configuration files.
Expand All @@ -116,7 +113,7 @@ $ export SECRET_NAME_DOCKER="${NAME_PREFIX}regcred"
```
# cd kubernetes/samples/scripts/create-kubernetes-secrets
```
```sehll
```shell
$ ./create-docker-credentials-secret.sh -s ${SECRET_NAME_DOCKER} -e oracleSsoEmail@bar.com -p oracleSsoPassword -u oracleSsoEmail@bar.com
```
```
Expand All @@ -131,7 +128,6 @@ $ kubectl get secret
```
```
NAME TYPE DATA AGE
wlsazure-secret Opaque 2 17m
regcred kubernetes.io/dockerconfigjson 1 2m25s
default-token-csdvd kubernetes.io/service-account-token 3 25m
domain1-weblogic-credentials Opaque 2 3m42s
Expand All @@ -142,12 +138,12 @@ weblogic-operator-secrets Opaque
**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.
You 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 you created previously.

{{% notice note %}} The `create-domain.sh` script and its inputs file are for demonstration purposes _only_; its contents and the domain resource file that it generates for you might change without notice. In production, we strongly recommend that you use the WebLogic Image Tool and WebLogic Deploy Tooling (when applicable), and directly work with domain resource files instead.
{{% /notice%}}

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

1. Check if resources are ready.

Expand All @@ -166,10 +162,8 @@ We need to set up the domain configuration for the WebLogic domain.
--file-share ${AKS_PERS_SHARE_NAME} \
--storage-account ${AKS_PERS_STORAGE_ACCOUNT_NAME} \
--domain-uid domain1 \
--pv-name ${NAME_PREFIX}-azurefile-${TIMESTAMP} \
--pvc-name ${NAME_PREFIX}-azurefile-${TIMESTAMP} \
--secret-docker ${SECRET_NAME_DOCKER} \
--secret-storage ${SECRET_NAME_AZURE_FILE}
--secret-docker ${SECRET_NAME_DOCKER}
```

You will see output with `PASS` if all the resources are ready. The following is an example of output:
Expand All @@ -181,10 +175,8 @@ We need to set up the domain configuration for the WebLogic domain.
Azure Kubenetes Service instacne: wlsaks1612795811
Azure storage account: wlsstorage1612795811
Azure file share: wls-weblogic-1612795811
Kubenetes secret for Azure storage: wlsazure-secret
Kubenetes secret for Docker Account: regcred
Kubenetes secret for Weblogic domain: domain1-weblogic-credentials
Persistent Volume: wls-azurefile-1612795811
Persistent Volume Claim: wls-azurefile-1612795811
```

Expand Down Expand Up @@ -301,7 +293,7 @@ We need to set up the domain configuration for the WebLogic domain.
troubleshoot the reason and resolve it before proceeding to the next
step.

{{% notice note %}} This sample creates WebLogic Server pods with reasonable values for memory, CPU, and JVM heap size (as a percentage of memory). You can supply different values. Edit `~/azure/weblogic-on-aks/domain1.yaml` and set the desired values for `serverPodMemoryRequest`, `serverPodMemoryLimit`, `serverPodCpuRequest`, `serverPodCpuLimit` and `javaOptions` before running `./create-domain.sh -i ~/azure/weblogic-on-aks/domain1.yaml -o ~/azure -e -v`.
{{% notice note %}} This sample creates WebLogic Server pods with reasonable values for memory, CPU, and JVM heap size (as a percentage of memory). These settings were determined by running a skeleton WebLogic domain with minimal or no deployed services and applications on potentially limited or heavily shared container environments. For advice about tuning CPU and memory requests and limits for broader use cases or in a production environment, see the [Pod memory and CPU resources](https://oracle.github.io/weblogic-kubernetes-operator/faq/resource-settings/) FAQ. You can supply different values. Edit `~/azure/weblogic-on-aks/domain1.yaml` and set the desired values for `serverPodMemoryRequest`, `serverPodMemoryLimit`, `serverPodCpuRequest`, `serverPodCpuLimit` and `javaOptions` before running `./create-domain.sh -i ~/azure/weblogic-on-aks/domain1.yaml -o ~/azure -e -v`.
{{% /notice%}}

Here is an excerpt showing reasonable values:
Expand Down Expand Up @@ -344,7 +336,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 your domain values.

```yaml
apiVersion: v1
Expand Down Expand Up @@ -510,7 +502,7 @@ For input values, you can edit `kubernetes/samples/scripts/create-weblogic-domai
| `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. |
| `dockerUserName` | `yourDockerId` | The same value as `dockerEmail`. |
| `namePrefix` | `0730` | Alphanumeric value used as a disambiguation prefix for several Kubernetes resources. |
| `namePrefix` | `wls` | Alphanumeric value used as a disambiguation prefix for several Kubernetes resources. |

If you don't want to change the other parameters, you can use the default values. Please make sure no extra whitespaces are added!

Expand All @@ -528,7 +520,7 @@ $ ./create-domain-on-aks.sh -i my-create-domain-on-aks-inputs.yaml -o ~/azure -e

The script will print the Administration Server address after a successful deployment. The default user name for the Administration Console is `weblogic` and the default password is `welcome1`. Please change this for production deployments. To interact with the cluster using `kubectl`, use `az aks get-credentials` as shown in the script output.

{{% notice info %}} You now have created an AKS cluster with `PersistentVolumeClaim` and `PersistentVolume` to contain the WLS domain configuration files. Using those artifacts, you have used the operator to create a WLS domain.
{{% 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.
{{% /notice %}}

#### Deploy sample application
Expand Down Expand Up @@ -574,22 +566,27 @@ In the example, the application address is: `http://52.224.248.40:8001/testwebap

The test application will list the server host and server IP on the page.

#### Access WebLogic Server logs
#### Validate NFS volume

The logs are stored in the Azure file share. Follow these steps to access the log:
There are several approaches to validate the NFS volume:

1. Go to the [Azure Portal](https://ms.portal.azure.com).
2. Go to your resource group.
3. Open the storage account.
4. In the "File service" section of the left panel, select File shares.
5. Select the file share name (e.g. weblogic in this example).
6. Select logs.
7. Select domain1.
8. WebLogic Server logs are listed in the folder.
- Use Azure Storage browser. Make sure you have permission to access the NFS server, see [Azure Storage firewalls and virtual networks document](https://docs.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-portal)
- Mount the same NFS share in an existing virtual machine from Azure. Access files from the mounted path, see [Mount Azure NFS file share to Linux](https://docs.microsoft.com/en-us/azure/storage/files/storage-files-how-to-mount-nfs-shares).

{{%expand "Click here to view the WebLogic Server logs screenshot." %}}
![WebLogic Server Logs](../screenshot-logs.png)
{{% /expand %}}
Use `kubectl exec` to enter the admin server pod to check file system status:

```shell
kubectl exec -it domain1-admin-server -- df -h
```

You will find output like the following, with filesystem `${AKS_PERS_STORAGE_ACCOUNT_NAME}.file.core.windows.net:/${AKS_PERS_STORAGE_ACCOUNT_NAME}/${AKS_PERS_SHARE_NAME}`, size `100G`, and mounted on `/shared`:

```text
Filesystem Size Used Avail Use% Mounted on
...
wlsstorage1612795811.file.core.windows.net:/wlsstorage1612795811/wls-weblogic-1612795811 100G 76M 100G 1% /shared
...
```

#### Clean up resources

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
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 manage and maintain only the agent nodes. As a managed Kubernetes service, AKS is free - you pay for only the agent nodes within your clusters, not for the masters.
Azure Kubernetes Service (AKS) 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 manage and maintain only the agent nodes. As a managed Kubernetes service, AKS is free - you pay for only the agent nodes within your clusters, not for the masters.

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

0 comments on commit 063fd38

Please sign in to comment.