Skip to content

Commit 452d052

Browse files
committed
Merge branch 'develop' into readhealthstep_logging
2 parents 7263c61 + 818477b commit 452d052

File tree

5 files changed

+37
-10
lines changed

5 files changed

+37
-10
lines changed

docs-source/content/userguide/managing-domains/domain-lifecycle/scaling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ The scalingAction.sh script accepts a number of customizable parameters:
163163
* `kubernetes_master` - Kubernetes master URL, default=https://kubernetes
164164

165165
{{% notice note %}}
166-
Set this to https://kubernetes.default.svc when invoking `scalingAction.sh` from the Administration Server pod.
166+
Set this to https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT} when invoking `scalingAction.sh` from the Administration Server pod.
167167
{{% /notice %}}
168168

169169
* `access_token` - Service Account Bearer token for authentication and authorization for access to REST Resources

docs-source/content/userguide/managing-domains/persistent-storage/_index.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,41 @@ Persistent volumes can point to different storage locations, for example NFS ser
2222

2323
The persistent volume for the domain must be created using the appropriate tools before running the script to create the domain. In the simplest case, namely the `HOST_PATH` provider, this means creating a directory on the Kubernetes master and ensuring that it has the correct permissions:
2424

25-
```
25+
```bash
2626
$ mkdir -m 777 -p /path/to/domain1PersistentVolume
2727
```
2828

2929
**Note regarding NFS**: In the current GA version, the OCI Container Engine for Kubernetes supports network block storage that can be shared across nodes with access permission RWOnce (meaning that only one can write, others can read only). At this time, the WebLogic on Kubernetes domain created by the WebLogic Server Kubernetes Operator, requires a shared file system to store the WebLogic domain configuration, which MUST be accessible from all the pods across the nodes. As a workaround, you need to install an NFS server on one node and share the file system across all the nodes.
3030

3131
Currently, we recommend that you use NFS version 3.0 for running WebLogic Server on OCI Container Engine for Kubernetes. During certification, we found that when using NFS 4.0, the servers in the WebLogic domain went into a failed state intermittently. Because multiple threads use NFS (default store, diagnostics store, Node Manager, logging, and `domain_home`), there are issues when accessing the file store. These issues are removed by changing the NFS to version 3.0.
3232

33+
#### Persistent volume GID annotation
34+
35+
The `HOST_PATH` directory permissions can be made more secure by using a Kubernetes annotation on the
36+
persistent volume that provides the group identifier (GID) which will be added to pods using the persistent volume.
37+
38+
For example, if the GID of the directory is `6789`, then the directory can be updated to remove permissions
39+
other than for the user and group along with the persistent volume being annotated with the specified GID:
40+
41+
```bash
42+
$ chmod 770 /path/to/domain1PersistentVolume
43+
$ kubectl annotate pv domain1-weblogic-sample-pv pv.beta.kubernetes.io/gid=6789
44+
```
45+
46+
Typically, after the domain is created and servers are running, the group ownership of the persistent volume files
47+
can be updated to the specified GID which will provide read access to the group members. Normally
48+
files created from a pod onto the persistent volume will have UID `1000` and GID `1000` which is the
49+
`oracle` user from the WebLogic Docker image.
50+
51+
An example of updating the group ownership on the persistent volume would be as follows:
52+
53+
```bash
54+
$ cd /path/to/domain1PersistentVolume
55+
$ sudo chgrp 6789 applications domains logs stores
56+
$ sudo chgrp -R 6789 domains/
57+
$ sudo chgrp -R 6789 logs/
58+
```
59+
3360
### YAML files
3461

3562
Persistent volumes and claims are described in YAML files. For each persistent volume, you should create one persistent volume YAML file and one persistent volume claim YAML file. In the example below, you will find two YAML templates, one for the volume and one for the claim. As stated above, they either can be dedicated to a specific domain, or shared across multiple domains. For the use cases where a volume will be dedicated to a particular domain, it is a best practice to label it with `weblogic.domainUID=[domain name]`. This makes it easy to search for, and clean up resources associated with that particular domain.

src/scripts/initialize-external-operator-identity.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash
22
# Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
33
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
44

@@ -29,7 +29,7 @@ LEGACY_KEY_PEM=${OPERATOR_SECRETS_DIR}/${EXTERNAL_KEY}
2929

3030
CACERT='/var/run/secrets/kubernetes.io/serviceaccount/ca.crt'
3131
TOKEN=`cat /var/run/secrets/kubernetes.io/serviceaccount/token`
32-
KUBERNETES_MASTER="https://kubernetes.default.svc"
32+
KUBERNETES_MASTER="https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}"
3333

3434
function cleanup {
3535
if [[ $SUCCEEDED != "true" ]]; then

src/scripts/initialize-internal-operator-identity.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash
22
# Copyright 2018, Oracle Corporation and/or its affiliates. All rights reserved.
33
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
44

@@ -94,7 +94,7 @@ function generateInternalIdentity {
9494
function recordInternalIdentity {
9595
CACERT='/var/run/secrets/kubernetes.io/serviceaccount/ca.crt'
9696
TOKEN=`cat /var/run/secrets/kubernetes.io/serviceaccount/token`
97-
KUBERNETES_MASTER="https://kubernetes.default.svc"
97+
KUBERNETES_MASTER="https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}"
9898

9999
# the request body prints out the atz token
100100
# don't specify -v so that the token is not printed to the operator log

src/scripts/scaling/scalingAction.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Copyright 2017, 2019, Oracle Corporation and/or its affiliates. All rights reserved.
33
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
44

@@ -14,7 +14,7 @@ operator_namespace="weblogic-operator"
1414
operator_service_account="weblogic-operator"
1515
scaling_size=1
1616
access_token=""
17-
kubernetes_master="https://kubernetes"
17+
kubernetes_master="https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}"
1818

1919
# Parse arguments/parameters
2020
for arg in "$@"
@@ -69,12 +69,12 @@ done
6969
# Verify required parameters
7070
if [ -z "$scaling_action" ] || [ -z "$wls_domain_uid" ] || [ -z "$wls_cluster_name" ]
7171
then
72-
echo "Usage: scalingAction.sh --action=[scaleUp | scaleDown] --domain_uid=<domain uid> --cluster_name=<cluster name> [--kubernetes_master=https://kubernetes] [--access_token=<access_token>] [--wls_domain_namespace=default] [--operator_namespace=weblogic-operator] [--operator_service_name=weblogic-operator] [--scaling_size=1]"
72+
echo "Usage: scalingAction.sh --action=[scaleUp | scaleDown] --domain_uid=<domain uid> --cluster_name=<cluster name> [--kubernetes_master=https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}] [--access_token=<access_token>] [--wls_domain_namespace=default] [--operator_namespace=weblogic-operator] [--operator_service_name=weblogic-operator] [--scaling_size=1]"
7373
echo " where"
7474
echo " action - scaleUp or scaleDown"
7575
echo " domain_uid - WebLogic Domain Unique Identifier"
7676
echo " cluster_name - WebLogic Cluster Name"
77-
echo " kubernetes_master - Kubernetes master URL, default=https://kubernetes"
77+
echo " kubernetes_master - Kubernetes master URL, default=https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}"
7878
echo " access_token - Service Account Bearer token for authentication and authorization for access to REST Resources"
7979
echo " wls_domain_namespace - Kubernetes name space WebLogic Domain is defined in, default=default"
8080
echo " operator_service_name - WebLogic Operator Service name, default=internal-weblogic-operator-svc"

0 commit comments

Comments
 (0)