Scale a Service Instance

You can use the REST API to scale an Oracle Java Cloud Service instance on-demand, as described in the following procedures.

Note:

  • On accounts that are integrated with Oracle Identity Cloud Service, the identity domain ID is the Identity Cloud Service tenant name. This tenant name begins with the characters idcs-followed by a string of number and letters (for example, idcs-98888f7964454b658ac6d2f625b29030). Access the Oracle Identity Cloud Service Console in a browser to find the tenant name in the URL. You can also find the name when you sign in to your Oracle Cloud account, navigate to Identity and then select Federation.

  • The cURL command examples use the URL structure https://rest_server_url/resource-path, where rest_server_url is the REST server to contact for your identity domain. See Send Requests.

Specifically, you can scale the following resources in your Oracle Java Cloud Service instance:
  • Add a node to an existing WebLogic (WLS) Application or Caching (data grid) cluster, as described in the section Scaling Out a Cluster

  • Remove a node from a WLS Application or Caching cluster, as described in the section Scaling In a Cluster

  • Change the compute shape of a WLS Application cluster node, as described in the section Scaling Up or Down a Node

    Note: On Oracle Cloud Infrastructure Classic, you can also change the shape of an Oracle Traffic Director load balancer node.

  • Add block storage, as described in the section Adding Storage to a Service Instance

Consider the following before scaling:

  • Scaling is not supported by Oracle Java Cloud Service - Virtual Image instances (BASIC service level). For Oracle Java Cloud Service instances based on WebLogic Server Standard Edition, scaling a node is supported; however, scaling a cluster is not supported.

  • Scaling down a node might be blocked when scaling down a service instance that has a large memory shape and a very high value set for the initial Java heap size for a Managed Server JVM. See the ignoreManagedServerHeapError request parameter in Scale Up or Scale Down before you scale down such a service instance.

  • Before scaling out or scaling up a BYOL service instance (a service instance that was created with isBYOL set to true), verify that you have the required Oracle WebLogic Server licenses for the OCPUS of the new node or the additional OCPUs provided by the new shape. For the processor conversion ratios and license requirements, see the document titled Oracle PaaS and IaaS Universal Credits Service Descriptions that is available from Frequently Asked Questions: Oracle BYOL to PaaS.

  • (Not applicable to Oracle Cloud Infrastructure) When scaling out the WLS Application cluster on a service instance that uses IP reservations, you must use the request parameter ipReservations to assign a reserved IP address to the new node.

  • If you are scaling out a service instance provisioned in an account where regions are not supported and your instance uses an Oracle Exadata database, 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 one or more IP reservations. You must obtain IP reservations for the Managed Servers you are going to add to the WLS Application cluster; you will not be able to scale out the instance without IP reservations. The number of IP reservations you need corresponds to the number of Managed Server nodes you want to add.

Scaling Out a Cluster

You need the Oracle Java Cloud Service instance name and the name of the existing cluster to scale out.

To scale out an existing cluster:
  1. Retrieve the service instance details to confirm the name of the cluster you want to scale out.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
    

    The following shows an example of the clusters portion of the response body in JSON format. The cluster name is ExampleCluster1. In the cluster, there is one server by the name ExampleI_server_1.

          "clusters":
          {
             "ExampleCluster1":
             {
                "clusterId":115634,
                "clusterName":"ExampleCluster1",
                "clusterType":"PAAS",
                "profile":"{\"type\":\"APPLICATION_CLUSTER\",\"default\":\"true\",\"external\":\"true\"}",
                "creationDate":"2017-10-20T19:31:11.888+0000",
                "paasServers":
                {
                   "ExampleI_server_1":
                   {
                      "serverId":45034,
                      "serverName":"ExampleI_server_1",
                      "serverType":"MS",
                      "serverRole":"JAAS_ROLE",
                      "state":"READY",
                      "serverStateDisplayName":"Ready",
                      "creationDate":"2017-10-20T19:31:11.000+0000",
                      "attributes":{...}
                   }
                }
             }
          }
  2. Create a JSON document, scaleout.json, that defines the WebLogic (WLS) component details for scaling out.

    The following shows an example of the JSON request document using the clusters array.

    {
       "components": {
          "WLS": {
             "clusters": [
             {
                "clusterName": "ExampleCluster1",
                "type": "APPLICATION_CLUSTER",
                "serverCount": 1
             }],
             "createClusterIfMissing": false
          }
       }
    }
  3. Scale out the cluster by passing the JSON document defined in step 2.

    curl -i -X POST -u username:password -d @scaleout.json -H "Content-Type:application/json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance/servers

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (POST).

    • -u option to specify the user name and password for the Oracle Java Cloud Service account for authentication.

    • -H to define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    For more information about scaling out, see Scale Out a Service Instance.

    The following shows an example of the response document returned in JSON format.

    HTTP/1.1 202 Accepted
    Date: Fri, 20 Oct 2017 20:49:59 GMT
    Server: Oracle-HTTP-Server-11g
    Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/6995928
    Content-Length: 123
    Content-Language: en
    Access-Control-Allow-Origin: *
    Access-Control-Allow-Headers: Content-Type, api_key, Authorization, X-ID-TENANT-NAME, X-USER-IDENTITY-DOMAIN-NAME
    Retry-After: 60
    Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
    X-ORACLE-DMS-ECID: 005N02TkDIQE^M85RjO5yd000QEz00006j
    X-ORACLE-DMS-ECID: 005N02TkDIQE^M85RjO5yd000QEz00006j
    Service-URI: https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/myJCS
    instance
    X-Frame-Options: DENY
    Content-Type: application/vnd.com.oracle.oracloud.provisioning.Service+json
    
    {
       "details":
       {
          "message":"Submitted job to scale out service [ExampleInstance] in domain [ExampleIdentityDomain].",
          "jobId":"6995928"
       }
    }
  4. Check the status of the scaling operation using the job ID returned in the Location header in step 3. For more information, see View the Status of an Operation by Job Id.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/6995928

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (GET).

    • -u option to specify the user name and password for the Oracle Java Cloud Service account for authentication.

    • -H to define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    The following shows an example of the response body. The status is RUNNING, which means the scale out operation is still in progress. The status will change to SUCCEED upon a successful scale out.

    {
       "activityLogId":4404188,
       "serviceName":"ExampleInstance",
       "serviceType":"jaas",
       "identityDomain":"ExampleIdentityDomain",
       "serviceId":115634,
       "jobId":6995928,
       "startDate":"2017-10-20T20:50:12.390+0000",
       "status":"RUNNING",
       "operationId":115634,
       "operationType":"SCALE_OUT",
       "summaryMessage":"SCALE_OUT",
       "authDomain":"ExampleIdentityDomain",
       "authUser":"username",
       "initiatedBy":"USER",
       "messages":[
          {"activityDate":"2017-10-20T20:50:12.390+0000","message":"Activity Submitted"},
          {"activityDate":"2017-10-20T20:50:12.426+0000","message":"Activity Started"},
          {"activityDate":"2017-10-20T20:50:12.437+0000","message":"Started scaling operation on service [ExampleInstance] in identity domain [ExampleIdentityDomain]."}
       ]
    }
  5. After the scaling out operation is completed, retrieve the service instance details to confirm the new Managed Server has been added to the cluster.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
    

    The new node can be seen in clusters and hosts.

    The following shows an example of the clusters portion of the response body in JSON format. The new node is ExampleI_server_2 .

    Note: By default, the name of the Managed Server is generated from the first eight characters of the domain name ("domainName"), using the following format: first8charsOfDomainName_server_n, where n starts with 1 and is incremented to ensure each server name is unique.

          "clusters":
          {
             "ExampleCluster1":
             {
                "clusterId":115634,
                "clusterName":"ExampleCluster1",
                "clusterType":"PAAS",
                "profile":"{\"type\":\"APPLICATION_CLUSTER\",\"default\":\"true\",\"external\":\"true\"}",
                "creationDate":"2017-10-20T19:31:11.888+0000",
                "paasServers":
                {
                   "ExampleI_server_1":
                   {
                      "serverId":45034,
                      "serverName":"ExampleI_server_1",
                      "serverType":"MS",
                      "serverRole":"JAAS_ROLE",
                      "state":"READY",
                      "serverStateDisplayName":"Ready",
                      "creationDate":"2017-10-20T19:31:11.000+0000",
                      "attributes":{...}
                   },
                   "ExampleI_server_2":
                   {
                      "serverId":45045,
                      "serverName":"ExampleI_server_2",
                      "serverType":"MS",
                      "serverRole":"JAAS_ROLE",
                      "state":"READY",
                      "serverStateDisplayName":"Ready",
                      "creationDate":"2017-10-20T20:51:21.000+0000",
                      "attributes":{...}
                   }
                }
             }
          }

Scaling In a Cluster

You need the Oracle Java Cloud Service instance name and the host name you want to scale in.

  1. Retrieve the service instance details to confirm the name of the host that has the Managed Server you want to remove by scaling in.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
    

    The following shows an example of the hosts and userHosts portion of the response body in JSON format. The name of the host to scale in is exampleinstance-wls-2, where the server name is ExampleI_server_2.

          "hosts":
          {
             "userHosts":
             {
                "exampleinstance-wls-2":
                {
                   "vmId":108636,
                   "id":108636,
                   "uuid":"8B09691AFAEC4DAE8232796B8663FB2A",
                   "hostName":"exampleinstance-wls-2",
                   "label":"ExampleInstance wls 2",
                   "ipAddress":"10.89.109.136",
                   "publicIpAddress":"10.89.109.136",
                   "usageType":"MANAGED_SERVER",
                   "role":"MANAGED_SERVER",
                   "componentType":"WLS",
                   "state":"READY",
                   "vmStateDisplayName":"Ready",
                   "shapeId":"oc3",
                   "totalStorage":58368,
                   "creationDate":"2017-10-20T20:51:21.000+0000",
                   "isAdminNode":false,
                   "servers":
                   {
                      "ExampleI_server_2":
                      {
                         "serverId":45045,
                         "serverName":"ExampleI_server_2",
                         "serverType":"MS",
                         "serverRole":"JAAS_ROLE",
                         "state":"READY",
                         "serverStateDisplayName":"Ready",
                         "creationDate":"2017-10-20T20:51:21.000+0000",
                         "attributes":{...}
                      }
                   },
                   ...
                },
                "exampleinstance-wls-1":
                {
                   "vmId":108625,
                   "id":108625,
                   "uuid":"0868270FC7F645BF995C407524625264",
                   "hostName":"exampleinstance-wls-1",
                   "label":"ExampleInstance wls 1",
                   "ipAddress":"10.89.108.222",
                   "publicIpAddress":"10.89.108.222",
                   "usageType":"ADMIN_SERVER",
                   "role":"ADMIN_SERVER",
                   "componentType":"WLS",
                   "state":"READY",
                   "vmStateDisplayName":"Ready",
                   "shapeId":"oc3",
                   "totalStorage":78848,
                   "creationDate":"2017-10-20T19:31:11.000+0000",
                   "isAdminNode":true,
                   "servers":
                   {
                      "ExampleI_adminserver":
                      {
                         "serverId":45033,
                         "serverName":"ExampleI_adminserver",
                         "serverType":"ADMIN",
                         "serverRole":"JAAS_ROLE",
                         "state":"READY",
                         "serverStateDisplayName":"Ready",
                         "creationDate":"2017-10-20T19:31:11.000+0000",
                         "attributes":{...}
                      },
                      "ExampleI_server_1":
                      {
                         "serverId":45034,
                         "serverName":"ExampleI_server_1",
                         "serverType":"MS",
                         "serverRole":"JAAS_ROLE",
                         "state":"READY",
                         "serverStateDisplayName":"Ready",
                         "creationDate":"2017-10-20T19:31:11.000+0000",
                         "attributes":{...}
                      }
                   },
                   ...
                }
             }
          }
  2. Create a JSON document, scalein.json, that defines the WebLogic (WLS) component details for scaling in.

    The following shows an example of the JSON request document.

    {
       "components": {
          "WLS": {
             "hosts": ["exampleinstance-wls-2"]
          }
       }
    }
  3. Scale in the service instance by passing the JSON document defined in step 2.

    curl -i -X PUT -u username:password -d @scalein.json -H "Content-Type:application/json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance/servers

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (PUT).

    • -u option to specify the user name and password for the Oracle Java Cloud Service account for authentication.

    • -H to define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    See Scale In a Service Instance for more information about scaling in.

    If you are scaling in a service instance that uses IP reservations, when the Managed Server node is removed, the IP reservation associated with the node is released but not deleted.

    The following shows an example of the response document returned in JSON format.

    HTTP/1.1 202 Accepted
    Date: Fri, 20 Oct 2017 21:09:13 GMT
    Server: Oracle-HTTP-Server-11g
    Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/6995942
    Content-Length: 122
    Content-Language: en
    Access-Control-Allow-Origin: *
    Access-Control-Allow-Headers: Content-Type, api_key, Authorization, X-ID-TENANT-NAME, X-USER-IDENTITY-DOMAIN-NAME
    Retry-After: 60
    Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
    X-ORACLE-DMS-ECID: 005N03YXnWW5Qd85RjP5id000DPB00004b
    X-ORACLE-DMS-ECID: 005N03YXnWW5Qd85RjP5id000DPB00004b
    Service-URI: https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
    X-Frame-Options: DENY
    Content-Type: application/vnd.com.oracle.oracloud.provisioning.Service+json
    
    {
       "details":
       {
          "message":"Submitted job to scale in service [ExampleInstance] in domain [ExampleIdentityDomain].",
          "jobId":"6995942"
       }
    }
  4. Check the status of the scaling operation using the job ID returned in the Location header in step 3. For more information, see View the Status of an Operation by Job Id.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/6995942

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (GET).

    • -u option to specify the user name and password for the Oracle Java Cloud Service account for authentication.

    • -H to define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    The following shows an example of the response body. The status is RUNNING, which means the scale in operation is still in progress. The status will change to SUCCEED upon a successful scale out.

    {
       "activityLogId":4404189,
       "serviceName":"ExampleInstance",
       "serviceType":"jaas",
       "identityDomain":"ExampleIdentityDomain",
       "serviceId":115634,
       "jobId":6995942,
       "startDate":"2017-10-20T21:09:14.765+0000",
       "status":"RUNNING",
       "operationId":115634,
       "operationType":"SCALE_IN",
       "summaryMessage":"SCALE_IN",
       "authDomain":"ExampleIdentityDomain",
       "authUser":"username",
       "initiatedBy":"USER",
       "messages":[
          {"activityDate":"2017-10-20T21:09:14.765+0000","message":"Activity Submitted"},
          {"activityDate":"2017-10-20T21:09:14.789+0000","message":"Activity Started"},
          {"activityDate":"2017-10-20T21:09:14.817+0000","message":"Started operation to scale in service [ExampleInstance] in identity domain [ExampleIdentityDomain]."}
       ]
    }
  5. After the scaling in operation is completed, review the service instance details to confirm the host with the Managed Server has been removed.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
    

    The following shows an example of the clusters portion of the response body in JSON format. Notice ExampleI_server_2 has been removed.

          "clusters":
          {
             "ExampleCluster1":
             {
                "clusterId":115634,
                "clusterName":"ExampleCluster1",
                "clusterType":"PAAS",
                "profile":"{\"type\":\"APPLICATION_CLUSTER\",\"default\":\"true\",\"external\":\"true\"}",
                "creationDate":"2017-10-20T19:31:11.888+0000",
                "paasServers":
                {
                   "ExampleI_server_1":
                   {
                      "serverId":45034,
                      "serverName":"ExampleI_server_1",
                      "serverType":"MS",
                      "serverRole":"JAAS_ROLE",
                      "state":"READY",
                      "serverStateDisplayName":"Ready",
                      "creationDate":"2017-10-20T19:31:11.000+0000",
                      "attributes":{...}
                   }
                }
             }
          }

    Similarly, the hosts and userHosts portion of the response body no longer show exampleinstance-wls-2 and ExampleI_server_2.

          "hosts":
          {
             "userHosts":
             {
                "exampleinstance-wls-1":
                {
                   "vmId":108625,
                   "id":108625,
                   "uuid":"0868270FC7F645BF995C407524625264",
                   "hostName":"exampleinstance-wls-1",
                   "label":"ExampleInstance wls 1",
                   "ipAddress":"10.89.108.222",
                   "publicIpAddress":"10.89.108.222",
                   "usageType":"ADMIN_SERVER",
                   "role":"ADMIN_SERVER",
                   "componentType":"WLS",
                   "state":"READY",
                   "vmStateDisplayName":"Ready",
                   "shapeId":"oc3",
                   "totalStorage":78848,
                   "creationDate":"2017-10-20T19:31:11.000+0000",
                   "isAdminNode":true,
                   "servers":
                   {
                      "ExampleI_adminserver":
                      {
                         "serverId":45033,
                         "serverName":"ExampleI_adminserver",
                         "serverType":"ADMIN",
                         "serverRole":"JAAS_ROLE",
                         "state":"READY",
                         "serverStateDisplayName":"Ready",
                         "creationDate":"2017-10-20T19:31:11.000+0000",
                         "attributes":{...}
                      },
                      "ExampleI_server_1":
                      {
                         "serverId":45034,
                         "serverName":"ExampleI_server_1",
                         "serverType":"MS",
                         "serverRole":"JAAS_ROLE",
                         "state":"READY",
                         "serverStateDisplayName":"Ready",
                         "creationDate":"2017-10-20T19:31:11.000+0000",
                         "attributes":{...}
                      }
                   },
                   ...
                }
             }
          }

Scaling Up or Down a Node

You can scale up or scale down a node by changing the compute shape. You need the Oracle Java Cloud Service instance name and the host name to scale.

For service instances in Oracle Cloud Infrastructure, scaling a node is only allowed within the same shape series and family. For example, you cannot scale up from VM.Standard1.1 to VM.Standard2.2. However, you can scale up from VM.Standard1.1 to VM.Standard1.2.

To scale a node by changing the shape:
  1. Retrieve the service instance details to confirm the name of the host that has the node you want to scale up or down.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
    

    The following shows an example of the hosts and userHosts portion of the response body in JSON format. The name of the host to scale is exampleinstance-wls-1. The current node shape is oc3.

          "hosts":
          {
             "userHosts":
             {
                "exampleinstance-wls-1":
                {
                   "vmId":108625,
                   "id":108625,
                   "uuid":"0868270FC7F645BF995C407524625264",
                   "hostName":"exampleinstance-wls-1",
                   "label":"ExampleInstance wls 1",
                   "ipAddress":"10.89.108.222",
                   "publicIpAddress":"10.89.108.222",
                   "usageType":"ADMIN_SERVER",
                   "role":"ADMIN_SERVER",
                   "componentType":"WLS",
                   "state":"READY",
                   "vmStateDisplayName":"Ready",
                   "shapeId":"oc3",
                   "totalStorage":78848,
                   "creationDate":"2017-10-20T19:31:11.000+0000",
                   "isAdminNode":true,
                   "servers":
                   {
                      "ExampleI_adminserver":
                      {
                         "serverId":45033,
                         "serverName":"ExampleI_adminserver",
                         "serverType":"ADMIN",
                         "serverRole":"JAAS_ROLE",
                         "state":"READY",
                         "serverStateDisplayName":"Ready",
                         "creationDate":"2017-10-20T19:31:11.000+0000",
                         "attributes":{...}
                      },
                      "ExampleI_server_1":
                      {
                         "serverId":45034,
                         "serverName":"ExampleI_server_1",
                         "serverType":"MS",
                         "serverRole":"JAAS_ROLE",
                         "state":"READY",
                         "serverStateDisplayName":"Ready",
                         "creationDate":"2017-10-20T19:31:11.000+0000",
                         "attributes":{...}
                      }
                   },
                   ...
                }
             }
          }
  2. Create a JSON document, scaleupdown.json, that defines the WebLogic (WLS) component details for scaling.

    The following shows an example of the JSON request document. In this example, the node shape is being scaled up to oc4.

    {
       "components": {
          "WLS": {
             "hosts": ["exampleinstance-wls-1"],
             "shape": "oc4",
             "ignoreManagedServerHeapError": true
          }
       }
    } 

    Note: If you are scaling an Oracle Traffic Director load balancer node, then you would define the OTD component in the request payload.

  3. Scale up the service instance by passing the JSON document defined in step 2.

    curl -i -X POST -u username:password -d @scaleupdown.json -H "Content-Type:application/json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance/hosts/scale

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (POST).

    • -u option to specify the user name and password for the Oracle Java Cloud Service account for authentication.

    • -H to define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    See Scale Up or Scale Down a Service Instance for more information about scaling a node by changing the node shape.

    The following shows an example of the response document returned in JSON format.

    HTTP/1.1 202 Accepted
    Date: Tue, 24 Oct 2017 22:14:43 GMT
    Server: Oracle-HTTP-Server-11g
    Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/7057455
    Content-Length: 128
    Content-Language: en
    Access-Control-Allow-Origin: *
    Access-Control-Allow-Headers: Content-Type, api_key, Authorization, X-ID-TENANT-NAME, X-USER-IDENTITY-DOMAIN-NAME
    Retry-After: 60
    Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
    X-ORACLE-DMS-ECID: 005N5948MLHE^M85RjO5yd000QEz00009o
    X-ORACLE-DMS-ECID: 005N5948MLHE^M85RjO5yd000QEz00009o
    Service-URI: https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/ExampleInstance
    X-Frame-Options: DENY
    Content-Type: application/vnd.com.oracle.oracloud.provisioning.Service+json
    
    {
       "details":
       {
          "message":"Submitted job to scaling job in service [ExampleInstance] in domain [ExampleIdentityDomain].",
          "jobId":"7057455"
       }
    }
  4. Check the status of the scaling operation using the job ID returned in the Location header in step 3. For more information, see View the Status of an Operation by Job Id.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/7057455

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (GET).

    • -u option to specify the user name and password for the Oracle Java Cloud Service account for authentication.

    • -H to define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    The following shows an example of the response body. The status is RUNNING, which means the scale in operation is still in progress. The status will change to SUCCEED upon a successful scale operation.

    {
       "activityLogId":4472702,
       "serviceName":"ExampleInstance",
       "serviceType":"jaas",
       "identityDomain":"ExampleIdentityDomain",
       "serviceId":116023,
       "jobId":7057455,
       "startDate":"2017-10-24T22:14:53.733+0000",
       "status":"RUNNING",
       "operationId":116023,
       "operationType":"SCALE",
       "summaryMessage":"SCALE",
       "authDomain":"ExampleIdentityDomain",
       "authUser":"username",
       "initiatedBy":"USER",
       "messages":[
          {"activityDate":"2017-10-24T22:14:53.733+0000","message":"Activity Submitted"},
          {"activityDate":"2017-10-24T22:14:53.765+0000","message":"Activity Started"},
          {"activityDate":"2017-10-24T22:14:53.777+0000","message":"Started operation scale up\/down VMs for service [ExampleInstance] in identity domain [ExampleIdentityDomain]."},
          {"activityDate":"2017-10-24T22:14:54.028+0000","message":"Started operation to scale host [exampleinstance-wls-1] to shape [oc4]"}
       ]
    }
  5. After the scaling up (or down) operation is completed, review the service details to confirm that the node shape has been changed on the host you scaled.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
    

    The following shows an example of the hosts and userHosts portion of the response body in JSON format. The name of the host that was scaled up is exampleinstance-wls-1. The node shape is now oc4.

          "hosts":
          {
             "userHosts":
             {
                "exampleinstance-wls-1":
                {
                   "vmId":108625,
                   "id":108625,
                   "uuid":"0868270FC7F645BF995C407524625264",
                   "hostName":"exampleinstance-wls-1",
                   "label":"ExampleInstance wls 1",
                   "ipAddress":"10.89.108.222",
                   "publicIpAddress":"10.89.108.222",
                   "usageType":"ADMIN_SERVER",
                   "role":"ADMIN_SERVER",
                   "componentType":"WLS",
                   "state":"READY",
                   "vmStateDisplayName":"Ready",
                   "shapeId":"oc4",
                   "totalStorage":78848,
                   "creationDate":"2017-10-20T19:31:11.000+0000",
                   "isAdminNode":true,
                   "servers":
                   {
                      "ExampleI_adminserver":
                      {
                         "serverId":45033,
                         "serverName":"ExampleI_adminserver",
                         "serverType":"ADMIN",
                         "serverRole":"JAAS_ROLE",
                         "state":"READY",
                         "serverStateDisplayName":"Ready",
                         "creationDate":"2017-10-20T19:31:11.000+0000",
                         "attributes":{...}
                      },
                      "ExampleI_server_1":
                      {
                         "serverId":45034,
                         "serverName":"ExampleI_server_1",
                         "serverType":"MS",
                         "serverRole":"JAAS_ROLE",
                         "state":"READY",
                         "serverStateDisplayName":"Ready",
                         "creationDate":"2017-10-20T19:31:11.000+0000",
                         "attributes":{...}
                      }
                   },
                   ...
                }
             }
          }
  6. You may need to scale up (or down) the other nodes in the same WebLogic application cluster and ensure that they are all equivalent.

Adding Storage to a Service Instance

You can extend a service instance by adding block storage to an existing volume or create one new volume.

To add block storage:
  1. Retrieve the service instance details to confirm the name of the host to extend.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
    

    The following shows an example of the hosts and userHosts portion of the response body in JSON format. The name of the host to extend is exampleinstance-wls-1. Note that totalStorage is 78848 and the middleware size is 10GB.

          "hosts":
          {
             "userHosts":
             {
                "exampleinstance-wls-1":
                {
                   "vmId":108625,
                   "id":108625,
                   "uuid":"0868270FC7F645BF995C407524625264",
                   "hostName":"exampleinstance-wls-1",
                   "label":"ExampleInstance wls 1",
                   "ipAddress":"10.89.108.222",
                   "publicIpAddress":"10.89.108.222",
                   "usageType":"ADMIN_SERVER",
                   "role":"ADMIN_SERVER",
                   "componentType":"WLS",
                   "state":"READY",
                   "vmStateDisplayName":"Ready",
                   "shapeId":"oc4",
                   "totalStorage":78848,
                   "creationDate":"2017-10-20T19:31:11.000+0000",
                   "isAdminNode":true,
                   "servers":
                   {
                      "ExampleI_adminserver":
                      {
                         "serverId":45033,
                         "serverName":"ExampleI_adminserver",
                         "serverType":"ADMIN",
                         "serverRole":"JAAS_ROLE",
                         "state":"READY",
                         "serverStateDisplayName":"Ready",
                         "creationDate":"2017-10-20T19:31:11.000+0000",
                         "attributes":{...}
                      },
                      "ExampleI_server_1":
                      {
                         "serverId":45034,
                         "serverName":"ExampleI_server_1",
                         "serverType":"MS",
                         "serverRole":"JAAS_ROLE",
                         "state":"READY",
                         "serverStateDisplayName":"Ready",
                         "creationDate":"2017-10-20T19:31:11.000+0000",
                         "attributes":{...}
                      }
                   },
                   "storageVolumes":{
                      "domain":{"name":"domain","size":"10GB","partitions":"1"},
                      "tools":{"name":"tools","size":"10GB","partitions":"1"},
                      "jdk":{"name":"jdk","size":"2GB","partitions":"0"},
                      "boot":{"name":"boot","size":"25GB","partitions":"1"},
                      "middleware":{"name":"middleware","size":"10GB","partitions":"0"},
                      "backup":{"name":"backup","size":"20GB","partitions":"1"}
                   }
                }
             }
          }
  2. Create a JSON document, addstorage.json, that defines the WebLogic (WLS) component details for extending.

    The following shows an example of the JSON request document. In this example, 2 GB of storage is to be added to the middleware volume on the host exampleinstance-wls-1.

    {
       "components": {
          "WLS": {
             "hosts": ["exampleinstance-wls-1"],
             "middleware": 2
          }
       }
    } 

    The next example shows how to add block storage to a new volume. In this example, 1 GB is to be added to a new volume on the host exampleinstance-wls-1.

    {
       "components": {
          "WLS": {
             "hosts": ["exampleinstance-wls-1"],
             "user_defined_partitions": 1
          }
       }
    } 
  3. Extend the service instance by passing the JSON document defined in step 2.

    curl -i -X POST -u username:password -d @addstorage.json -H "Content-Type:application/json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance/storage/add

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (POST).

    • -u option to specify the user name and password for the Oracle Java Cloud Service account for authentication.

    • -H to define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    See Add Storage to an Existing or New Volume for information about block storage volume limits when extending a service instance.

    The following shows an example of the response document returned in JSON format.

    HTTP/1.1 202 Accepted
    Date: Wed, 25 Oct 2017 18:59:36 GMT
    Server: Oracle-HTTP-Server-11g
    Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/7120339
    Content-Length: 129
    Content-Language: en
    Access-Control-Allow-Origin: *
    Access-Control-Allow-Headers: Content-Type, api_key, Authorization, X-ID-TENANT-NAME, X-USER-IDENTITY-DOMAIN-NAME
    Retry-After: 60
    Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
    X-ORACLE-DMS-ECID: 005N6EcBr1w5Qd85RjP5id000DPB00001G
    X-ORACLE-DMS-ECID: 005N6EcBr1w5Qd85RjP5id000DPB00001G
    Service-URI: https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/ExampleInstance
    X-Frame-Options: DENY
    Content-Type: application/vnd.com.oracle.oracloud.provisioning.Service+json
    
    {
       "details":
       {
          "message":"Submitted job to add storage for service [ExampleInstance] in domain [ExampleIdentityDomain].",
          "jobId":"7120339"
       }
    }
  4. Check the status of the operation using the job ID returned in the Location header in step 3. For more information, see View the Status of an Operation by Job Id.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/7120339

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (GET).

    • -u option to specify the user name and password for the Oracle Java Cloud Service account for authentication.

    • -H to define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    The following shows an example of the response body. The status is RUNNING, which means the operation is still in progress. The status will change to SUCCEED upon a successful operation.

    {
       "activityLogId":4684109,
       "serviceName":"ExampleInstance",
       "serviceType":"jaas",
       "identityDomain":"ExampleIdentityDomain",
       "serviceId":116023,
       "jobId":7120339,
       "startDate":"2017-10-25T18:59:41.798+0000",
       "status":"RUNNING",
       "operationId":116023,
       "operationType":"ADD_STORAGE",
       "summaryMessage":"ADD_STORAGE",
       "authDomain":"ExampleIdentityDomain",
       "authUser":"username",
       "initiatedBy":"USER",
       "messages":[
          {"activityDate":"2017-10-25T18:59:41.798+0000","message":"Activity Submitted"},
          {"activityDate":"2017-10-25T18:59:41.822+0000","message":"Activity Started"},
          {"activityDate":"2017-10-25T18:59:41.835+0000","message":"Start operation to add block storage to existing volumes."},
          {"activityDate":"2017-10-25T18:59:42.090+0000","message":"Started operation to to update storage volume(s) for host [exampleinstance-wls-1] with volume specification [middleware=2G]"}
       ]
    }
  5. After the operation is completed, review the service details to confirm that storage has been added to the host you extended.

    curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance
    

    The following shows an example of the storageVolumes portion of the exampleinstance-wls-1 host in the response body in JSON format. The size of middleware is now 12GB.

                   "storageVolumes":
                   {
                      "domain":{"name":"domain","size":"10GB","partitions":"1"},
                      "tools":{"name":"tools","size":"10GB","partitions":"1"},
                      "jdk":{"name":"jdk","size":"2GB","partitions":"0"},
                      "boot":{"name":"boot","size":"25GB","partitions":"1"},
                      "middleware":{"name":"middleware","size":"12GB","partitions":"1"},
                      "backup":{"name":"backup","size":"20GB","partitions":"1"}
                   }

    In the hosts portion of exampleinstance-wls-1, the totalStorage value should have increased by 2048 to 80896.