Deleting the Coherence Data Tier Cluster of a Service Instance

You can delete the entire Coherence data tier or storage-enabled WebLogic Server cluster of an Oracle Java Cloud Service instance using the REST API, as described in the following procedure.

Note:

  • This topic is applicable only to Oracle Cloud Machine.

  • 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.

To delete the Coherence data tier cluster from an Oracle Java Cloud Service instance:

  1. Before deleting the Coherence data tier cluster, review the service instance to confirm the name of the storage-enabled WebLogic Server cluster you want to delete.
    curl -i -X GET -u username:userPassword1! -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_urlm/paas/service/jcs/api/v1.1/instances/ExampleIdentityDomain/ExampleInstance
    

    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.

    For more information, see View a Service Instance.

    When you view a service instance that has a Coherence data tier, you will see detailed information about the instance, including data tier details in the option "type": "datagrid". The following shows an example of the "type": "datagrid" option in the response body. In this example, there is one capacity unit (with three Managed Servers) in the Coherence data tier cluster that has the name ExampleDGCluster.

        "options": [{
          "type": "datagrid",
          "clusters": [{
            "clusterName": "ExampleDGCluster",
            "scalingUnitCount": 1,
            "scalingUnitName": "SMALL",
            "shape": "oc3",
            "vmCount": 3,
            "jvmCount": 1,
            "heapSize": "4608M",
            "maxScalingUnit": 10,
            "heapIncrements": "13824M",
            "primaryIncrements": "4608M",
            "totalHeap": "13824M",
            "totalPrimary": "4608M",
            "maxHeap": "138240M",
            "maxPrimary": "46080M",
            "scalingUnitInstances": [{
              "servers": [
                {"name": "ExampleI_server_5_DG"},
                {"name": "ExampleI_server_4_DG"},
                {"name": "ExampleI_server_3_DG"}
              ],
              "scalingUnitInstanceId": 296,
              "status": "Ready"
            }]
          }]
        }],
    
  2. Remove the storage-enabled WebLogic Server cluster by specifying the name ExampleDGCluster.
    curl -i -X DELETE -u username:userPassword1! -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/service/jcs/api/v1.1/instances/ExampleIdentityDomain/ExampleInstance/clusters/ExampleDGCluster
    

    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 (DELETE).

    • -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, see Delete a Coherence Data Tier Cluster.

    The following shows an example of the response header.

    HTTP/1.1 202 Accepted
    Date: Tue, 06 Oct 2015 21:15:16 GMT
    Location: https://rest_server_url/paas/service/jcs/api/v1.1/instances/ExampleIdentityDomain/status/scale/job/735
    Content-Length: 0
    Content-Type: application/vnd.com.oracle.oracloud.datagrid.Service+json
    Service-URI: https://rest_server_url/paas/service/jcs/api/v1.1/instances/ExampleIdentityDomain/ExampleInstance/clusters/ExampleDGCluster
    Retry-After: 60
    
  3. Check the status of the delete request using the resource URI returned in the Location header.
    curl -i -X GET -u username:userPassword1! -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/service/jcs/api/v1.1/instances/ExampleIdentityDomain/status/scale/job/735
    

    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.

    For more information, see View the Status of a Service Instance Lifecycle Operation.

    The following shows an example of the job status response body returned in JSON format.

    {
      "service_name": "ExampleInstance",
      "version": "12cR3",
      "wlsVersion": "12.1.3.0.xxxxxx",
      "status": "Running",
      "error_status_desc": "",
      "compliance_status": "",
      "compliance_status_desc": "",
      "auto_update": "true",
      "description": "ExampleInstance",
      "identity_domain": "ExampleIdentityDomain",
      "creation_time": "Tue Oct 6 16:24:8 UTC 2015",
      "last_modified_time": "Tue Oct 6 21:20:6 UTC 2015",
      "created_by": "username",
      "service_uri": "https:\/\/rest_server_url\/paas\/service\/jcs\/api\/v1.1\/instances\/ExampleIdentityDomain\/ExampleInstance"
    ,
      "message": [
        "Successfully deleted DataGrid option",
        "    Successfully removed [1] capacity unit(s) used by DataGrid WebLogic Cluster [ExampleDGCluster]",
        "        Deleting capacity unit(s) containing [3] virtual machines...",
        "        Started shutting down and removing managed servers from Admin.",
        "        Started shutting down and removing managed servers from Admin.",
        "        Completed removing managed servers from Admin.",
        "        Stopping and removing resources for capacity unit(s) containing [3] virtual machines...",
        "        Successfully deleted capacity unit(s) and [3] virtual machines",
        "    Successfully deleted WebLogic Cluster [ExampleDGCluster] used by DataGrid option"
      ]
    }
  4. When the operation completes and the service instance is running, review the service instance details to confirm the Coherence data tier cluster has been removed.
    curl -i -X GET -u username:userPassword1! -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/service/jcs/api/v1.1/instances/ExampleIdentityDomain/ExampleInstance
    

    You should no longer see the "type": "datagrid" option in the response body.

    The following shows an example of the response body.

    {
        "service_name": "ExampleInstance",
        "version": "12cR3",
        "wlsVersion": "12.1.3.0.xxxxxx",
        "status": "Running",
        "error_status_desc": "",
        "compliance_status": "",
        "compliance_status_desc": "",
        "auto_update": "true",
        "description": "ExampleInstance",
        "identity_domain": "ExampleIdentityDomain",
        "creation_time": "Tue Oct 6 16:24:8 UTC 2015",
        "last_modified_time": "Tue Oct 6 21:20:6 UTC 2015",
        "created_by": "username",
        "service_uri": "https:\/\/rest_server_url\/paas\/service\/jcs\/api\/v1.1\/instances\/ExampleIdentityDomain\/ExampleInstance",
        "domain_name": "ExampleI_domain",
        "domain_mode": "PRODUCTION",
        "cluster_name": "ExampleI_cluster",
        "num_nodes": 3,
        "level": "PAAS",
        "subscription_type": "MONTHLY",
        "edition": "SUITE",
        "shape": "oc3",
        "otd_provisioned": "yes",
        "otd_shape": "oc3",
        "otd_storage_size": 40960,
        "service_components": [
        {
          "type": "JDK",
          "version": "1.7.0_xxx"
        },
        {
          "type": "OTD",
          "version": "11.1.1.9.x"
        },
        {
          "type": "OTD_JDK",
          "version": "1.7.0_xxx"
        },
        {
          "type": "WLS",
          "version": "12.1.3.0.xxxxxx"
        }
        ],
        "creation_job_id": "231638",
        "deletion_job_id": 0,
        "db_info": "DBExample2:1521\/PDB1.ExampleIdentityDomain.oraclecloud.example",
        "db_service_name": "DBExample2",
        "num_ip_reservations": 3,
        "wls_admin_url": "https:\/\/192.0.2.0:7002\/console",
        "fmw_control_url": "https:\/\/192.0.2.0:7002\/em",
        "otd_admin_url": "https:\/\/192.0.1.23:8989",
        "sample_app_url": "https:\/\/192.0.1.23\/sample-app\/",
        "content_url" : "http:\/\/192.0.1.23",
        "secure_content_url": "https:\/\/192.0.1.23",
        "wls_deployment_channel_port": 9001,
        "psm_plugin_version": "16.3.5-x-xxx",
        "compute_site_name": "US000_Z00",
        "db_associations": [    
        {
            "db_service_name": "myDBService",
            "db_infra": true,
            "db_connect_string": "myDBService:1521\/PDB1.exampleidentitydomain.oraclecloud.internal",
            "pdb_service_name": "PDB1",
            "db_version": "12.1.0.2"
        }]
    }