Skip to content

Commit 4411e31

Browse files
committed
Move scalingAction.sh
1 parent d6d048c commit 4411e31

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

documentation/site/content/managing-domains/domain-lifecycle/scaling.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ For more in-depth information on the Kubernetes Horizontal Pod Autoscaler, see [
225225
The WebLogic Diagnostics Framework (WLDF) is a suite of services and APIs that collect and surface metrics that provide visibility into server and application performance.
226226
To support automatic scaling of WebLogic clusters in Kubernetes, WLDF provides the Policies and Actions component, which lets you write policy expressions for automatically executing scaling
227227
operations on a cluster. These policies monitor one or more types of WebLogic Server metrics, such as memory, idle threads, and CPU load. When the configured threshold
228-
in a policy is met, the policy is triggered, and the corresponding scaling action is executed. The WebLogic Kubernetes Operator project provides a shell script, [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/operator/scripts/scaling/scalingAction.sh),
228+
in a policy is met, the policy is triggered, and the corresponding scaling action is executed. The WebLogic Kubernetes Operator project provides a shell script, [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/kubernetes/samples/scripts/scaling/scalingAction.sh),
229229
for use as a Script Action, which illustrates how to issue a request to the operator’s REST endpoint.
230230

231231
{{% notice note %}}
@@ -235,14 +235,14 @@ Beginning with operator version 4.0.5, the operator's REST endpoint is disabled
235235
##### Configure automatic scaling of WebLogic clusters in Kubernetes with WLDF
236236
The following steps are provided as a guideline on how to configure a WLDF Policy and Script Action component for issuing scaling requests to the operator's REST endpoint:
237237

238-
1. Copy the [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/operator/scripts/scaling/scalingAction.sh) script to `$DOMAIN_HOME/bin/scripts` so that it's accessible within the Administration Server pod. For more information, see [Configuring Script Actions](https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/wldfc/config_notifications.html#GUID-5CC52534-13CD-40D9-915D-3380C86580F1) in _Configuring and Using the Diagnostics Framework for Oracle WebLogic Server_.
238+
1. Copy the [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/kubernetes/samples/scripts/scaling/scalingAction.sh) script to `$DOMAIN_HOME/bin/scripts` so that it's accessible within the Administration Server pod. For more information, see [Configuring Script Actions](https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/wldfc/config_notifications.html#GUID-5CC52534-13CD-40D9-915D-3380C86580F1) in _Configuring and Using the Diagnostics Framework for Oracle WebLogic Server_.
239239

240240
1. Configure a WLDF policy and action as part of a diagnostic module targeted to the Administration Server. For information about configuring the WLDF Policies and Actions component,
241241
see [Configuring Policies and Actions](https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/wldfc/config_watch_notif.html#GUID-D3FA8301-AAF2-41CE-A6A5-AB4005849913) in _Configuring and Using the Diagnostics Framework for Oracle WebLogic Server_.
242242

243243
a. Configure a WLDF policy with a rule expression for monitoring WebLogic Server metrics, such as memory, idle threads, and CPU load for example.
244244

245-
b. Configure a WLDF script action and associate the [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/operator/scripts/scaling/scalingAction.sh) script.
245+
b. Configure a WLDF script action and associate the [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/kubernetes/samples/scripts/scaling/scalingAction.sh) script.
246246

247247
Important notes about the configuration properties for the Script Action:
248248

@@ -369,15 +369,15 @@ details about [Using Prometheus to Automatically Scale WebLogic Clusters on Kube
369369

370370
### Helpful tips
371371
#### Debugging scalingAction.sh
372-
The [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/operator/scripts/scaling/scalingAction.sh) script was designed to be executed within a container of the
372+
The [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/kubernetes/samples/scripts/scaling/scalingAction.sh) script was designed to be executed within a container of the
373373
Administration Server Pod because the associated diagnostic module is targeted to the Administration Server.
374374

375375
The easiest way to verify and debug the `scalingAction.sh` script is to open a shell on the running Administration Server pod and execute the script on the command line.
376376

377377
The following example illustrates how to open a bash shell on a running Administration Server pod named `domain1-admin-server` and execute the `scriptAction.sh` script. It assumes that:
378378

379379
* The domain home is in `/u01/oracle/user-projects/domains/domain1` (that is, the domain home is inside an image).
380-
* The Dockerfile copied [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/operator/scripts/scaling/scalingAction.sh) to `/u01/oracle/user-projects/domains/domain1/bin/scripts/scalingAction.sh`.
380+
* The Dockerfile copied [`scalingAction.sh`](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/kubernetes/samples/scripts/scaling/scalingAction.sh) to `/u01/oracle/user-projects/domains/domain1/bin/scripts/scalingAction.sh`.
381381

382382
```shell
383383
$ kubectl exec -it domain1-admin-server /bin/bash

integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/Domain.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ public static boolean scaleClusterWithWLDF(String clusterName,
694694
logger.info("Copying scalingAction.sh to admin server pod");
695695
testUntil(
696696
() -> copyFileToPod(domainNamespace, adminServerPodName, null,
697-
Paths.get(PROJECT_ROOT + "/../operator/scripts/scaling/scalingAction.sh"),
697+
Paths.get(PROJECT_ROOT + "/../kubernetes/samples/scripts/scaling/scalingAction.sh"),
698698
Paths.get(domainHomeLocation + "/bin/scripts/scalingAction.sh")),
699699
logger,
700700
"Copying scalingAction.sh to admin server pod");
@@ -849,7 +849,7 @@ public static boolean scaleClusterWithScalingActionScript(String clusterName,
849849
logger.info("Copying scalingAction.sh to admin server pod");
850850
testUntil(
851851
() -> copyFileToPod(domainNamespace, adminServerPodName, null,
852-
Paths.get(PROJECT_ROOT + "/../operator/scripts/scaling/scalingAction.sh"),
852+
Paths.get(PROJECT_ROOT + "/../kubernetes/samples/scripts/scaling/scalingAction.sh"),
853853
Paths.get("/u01/scalingAction.sh")),
854854
logger,
855855
"Copying scalingAction.sh to admin server pod");

operator/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
</goals>
206206
<configuration>
207207
<testSourceDirectory>src/test/sh/scaling</testSourceDirectory>
208-
<sourceDirectory>scripts/scaling</sourceDirectory>
208+
<sourceDirectory>../kubernetes/samples/scripts/scaling</sourceDirectory>
209209
</configuration>
210210
</execution>
211211
</executions>

0 commit comments

Comments
 (0)