psm jcs scale-out

This command adds a new Managed Server to the specified cluster to scale-out an Oracle Java Cloud Service instance by one node.

With this command, you can:
  • Add one node to an existing WLS application cluster

  • Add a new WLS application cluster

  • Add one or more nodes to an existing WLS caching (data grid) cluster

  • Add a secondary OTD node (if Oracle Traffic Director is provisioned as the local load balancer)

  • Add a WLS caching (data grid) cluster, only if a caching cluster was not created in the initial provisioning of the service instance

Scaling a cluster is not supported by Oracle Java Cloud Service instances based on WebLogic Server Standard Edition.

For service instances that were created with isBYOL set to true: You are responsible for ensuring that you have the required licenses for the node you are adding.

If you are scaling out a service instance that uses IP reservations (application cluster nodes only), make sure you use only reserved IPs that are created in the same region. See IP Reservations REST Endpoints for information about how to find unused IP reservations and, if needed, create new IP reservations.

(Not supported on Oracle Cloud Infrastructure and Oracle Cloud at Customer) Before scaling out a service instance that uses an Exadata database deployment in an account where regions are not supported, you must obtain IP reservations for the Managed Servers you are going to add; you will not be able to scale out the cluster without IP reservations. See the My Oracle Support document titled How to Request Authorized IPs for Provisioning a Java Cloud Service with Database Exadata Cloud Service (MOS Note 2163568.1) to submit a request for IP reservations.

Syntax

In the following syntax, line breaks have been added for clarity. Do not include them when entering the command.

psm jcs scale-out -s|--service-name serviceName 
  -c|--config-payload pathToJson 
      [-c|--create-cluster-if-missing true|false]
      [-of|-–output-format json|html|short]
      [-wc|--wait-until-complete true|false] 

Parameters

All parameters are required unless otherwise noted.

Parameter Description
-s|--service-name serviceName Name of the Oracle Java Cloud Service instance.
-c|--config-payload pathToJson Specifies the path to the JSON file containing the information necessary to scale-out a Java Cloud Service instance. The format of this file, as shown in Sample Payloads, is the same as the request body you provide when scaling out a Java Cloud Service instance by using the REST API. For information about this format, see the Request/Body (scaleout-postrequestm) section of Scale Out a Service Instance in the REST API for Oracle Java Cloud Service.
-of|-–output-format json|html|short (Optional) Output format of the command’s response:

Accepted values: json, html, short

The default output format is the one you specified when using the psm setup command to configure the psm CLI.

-wc|--wait-until-complete true|false

(Optional) A boolean value that, when set to true, makes the command behave synchronously; that is, it does not return until the submitted job is complete. The following message is displayed until the job is complete:
Waiting for the job to complete... (it cannot be cancelled)
Default: false

Sample Payloads

Note:

For descriptions of the parameters in the following samples, see the Request/Body (scaleout-postrequestm) section of Scale Out a Service Instance in the REST API for Oracle Java Cloud Service

This payload scales out an instance by adding a new application tier cluster.

{
   "components": {
      "WLS": {
         "clusters": [
         {
            "clusterName": "ExampleCluster2",
            "type": "APPLICATION_CLUSTER",
            "serverCount": 1
         }],
         "createClusterIfMissing": true
      }
   }
} 
This payload scales out an instance by adding a new server to an existing application tier cluster.
{
   "components": {
      "WLS": {
         "clusters": [
         {
            "clusterName": "ExampleCluster1",
            "type": "APPLICATION_CLUSTER",
            "serverCount": 1
         }],
         "createClusterIfMissing": false
      }
   }
} 
This payload scales out an existing Coherence caching cluster.
{
   "components": {
      "WLS": {
         "clusters": [
         {
            "clusterName": "ExampleDGCluster",
            "type": "CACHING_CLUSTER",
            "serverCount": 3
         }],
         "createClusterIfMissing": false
      }
   }
} 
This payload scales out the OTD component.
{
   "components": {
      "OTD": {
            "otdServerCount": 1      
      }
   }
} 
This payload scales out a WLS component and specifies an IP reservation name.
{
   "components": {
      "WLS": {
         "ipReservations": ["ipres03"],
         "clusters": [
         {
            "clusterName": "ExampleCluster1",
            "type": "APPLICATION_CLUSTER",
            "serverCount": 1
         },
         "createClusterIfMissing": false
      }
   }
} 
This payload scales out an existing service instance by adding a Coherence caching cluster.
{
   "components": {
      "WLS": {
         "clusters": [
         {
            "clusterName": "ExampleClusterDG",
            "type": "CACHING_CLUSTER",
            "serverCount": 3,
            "serversPerNode": 1
         }],
         "createClusterIfMissing": true
      }
   }
} 

Example

psm jcs scale-out -s ExampleInstance -c c://home/templates/scale-out-payload.json  -of json
{
    "details":{
        "jobId":"34196",
        "message":"JAAS-SCALING-037: Scale out Job (ID: 34196) for service [Example1Instance] in cluster [Examp_cluster] submitted"
    },
    "status":"New"
}
Job ID : 34196

Note that this command returned a job ID. To see the status of your scale-out operation, use this ID with the psm jcs operation-status command:

$ psm jcs operation-status -j 34196 -of json

When you see the message:

    "operationId":364,
    "operationType":"SCALE_OUT",
    "resourceId":1073,
    "resourceName":"example1instance-wls-2",
    "resourceType":"VM",
    "serverType":"WLS",
    "serviceId":364,
    "serviceName":"Example1Instance",
    "serviceType":"jaas",
    "startDate":"2016-04-28T18:00:44.297+0000",
    "status":"SUCCEED",
    "summaryMessage":"Examp_server_2"
}

the service was successfully scaled-out.