psm jcs create-service

Use this command to create an Oracle Java Cloud Service instance.

Tutorial icon A Tutorial is also available.

Syntax

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

psm jcs create-service -c|-–config-payload pathToConfig-Payload 
  [-wc|--wait-until-complete true|false]
  [-of|--output-format json|html|short]

Parameters

All parameters are required unless otherwise specified.

Parameter Description
—c|-–config-payload pathToConfig-Payload Specifies the path to a JSON file containing the instance-creation information necessary to create an Oracle Java Cloud Service instance. The format of this file, as shown in Sample Payloads, is the same as the request body you provide when creating a service instance by using the REST API. For information about this format, go to the Request/Body (create-postrequestm) of Create a Service Instance in the REST API for Oracle Java Cloud Service.

-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

-of|--output-format json|html|short

(Optional) Specifies the output format of the command’s response:

  • json—output is formatted as a JSON array.

  • html—output is formatted as HTML

  • short—output is formatted as a brief summary.

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

Sample Payloads

Note:

You can find parameter descriptions for the following sample payloads in the Request/Body (create-postrequestm) section of Create a Service Instance in the REST API for Oracle Java Cloud Service.
The following payloads are used to create Oracle Java Cloud Service instances. This first example shows an example of the request body in JSON format. It uses the clusters array to define one application tier cluster and one Oracle Coherence data tier cluster.

Note:

enableAdminConsole and cloudStorageContainerAutoGenerate are not available on Oracle Cloud Infrastructure.
{
    "cloudStorageContainer" : "yourObjectStorageContainerOrBucket",
    "cloudStorageUser" : "yourObjectStorageUser",
    "cloudStoragePassword" : "yourObjectStoragePassword",
    "cloudStorageContainerAutoGenerate" : true,
    "serviceDescription" : "My service instance using the new path and parameters",
    "serviceLevel" : "PAAS",
    "serviceName" : "MyFirstInstance",
    "edition" : "SUITE",
    "serviceVersion" : "12cR3",
    "meteringFrequency" : "HOURLY",
    "provisionOTD" : true,
    "enableAdminConsole" : true,
    "vmPublicKeyText" : "yourSSHPublicKeyString",
    "components" : {
        "WLS" : {
            "shape" : "oc3",
            "managedServerCount": 0,
            "clusters" : [
                {
                    "clusterName" : "yourClusterName",
                    "type": "APPLICATION_CLUSTER",
                    "serverCount" : 2
                },
                {
                    "clusterName" : "yourCoherenceClusterName",
                    "type": "CACHING_CLUSTER",
                    "serverCount" : 3,
                    "serversPerNode" : 4,
                    "shape" : "oc3"
                }
            ],
            "adminUserName" : "yourWLSAdminUserName",
            "adminPassword" : "yourWLSAdminPassword",
            "sampleAppDeploymentRequested" : true,
            "domainMode" : "PRODUCTION",
            "dbServiceName" : "yourDBCSName",
            "dbaName" : "yourDBUserName",
            "dbaPassword" : "yourDBCSPassword",
            "appDBs" : [
                {
                    "dbServiceName" : "yourAppDBService",
                    "dbaName" : "yourAppDBUserName",
                    "dbaPassword" : "yourAppDBPassword"
                }
            ]
        },
        "OTD": {
            "adminUserName" : "yourOTDUserName",
            "adminPassword" : "yourOTDPassword",
            "listenerPortEnabled" : true,
            "listenerPort" : "8080",
            "securedListenerPort" : "8081",
            "loadBalancingPolicy" : "LEAST_CONNECTION_COUNT",
            "haEnabled" : false,
            "adminPort" : "8989",
            "shape" : "oc3"
        }
    }
}
This payload sample shows a request document that uses a region and IP reservations for the Oracle WebLogic Server (WLS) and Oracle Traffic Director (OTD) nodes. Note that IP reservations are applicable only when creating service instances in Oracle Cloud Infrastructure Classic regions. The number of names in ipReservations must correspond to the number of Managed Server nodes to provision in the cluster. For OTD, the number of names in ipReservations must correspond to the number of load balancer nodes you want to provision.

Note:

enableAdminConsole, cloudStorageContainerAutoGenerate, and ipReservations are supported only in Oracle Cloud Infrastructure Classic regions.

{
    "cloudStorageContainer" : "yourObjectStorageContainer",
    "cloudStorageUser" : "yourObjectStorageUser",
    "cloudStoragePassword" : "yourObjectStoragePassword",
    "cloudStorageContainerAutoGenerate" : true,
    "serviceDescription" : "My service instance using the new path and parameters",
    "serviceLevel" : "PAAS",
    "serviceName" : "MyFirstInstance",
    "edition" : "EE",
    "serviceVersion" : "12cR3",
    "meteringFrequency" : "HOURLY",
    "provisionOTD" : true,
    "enableAdminConsole" : true,
    "vmPublicKeyText" : "yourSSHPublicKeyString",
    "region" : "uscom-central-1",
    "components" : {
        "WLS" : {
            "adminUserName" : "yourWLSAdminUserName",
            "adminPassword" : "yourWLSAdminPassword",
            "sampleAppDeploymentRequested" : true,
            "domainMode" : "PRODUCTION",
            "dbServiceName" : "yourDBCSName",
            "dbaName" : "yourDBUserName",
            "dbaPassword" : "yourDBCSPassword",
            "clusterName" : "yourClusterName",
            "managedServerCount" : 2,
            "ipReservations": ["ipres01, ipres02"],
            "shape" : "oc3",
            "appDBs": [
            {
                "dbaPassword": "yourAppDBUserPassword",
                "dbServiceName": "yourAppDBCSName",
                "dbaName": "yourAppDBUserName"}]},
        "OTD": {
            "adminUserName" : "yourOTDUserName",
            "adminPassword" : "yourOTDPassword",
            "listenerPortEnabled" : true,
            "listenerPort" : "8080",
            "securedListenerPort" : "8081",
            "loadBalancingPolicy" : "LEAST_CONNECTION_COUNT",
            "haEnabled": "false",
            "ipReservations": ["ipres03"],
            "adminPort" : "8989",
            "shape" : "oc3"}}}

The following payload creates a single-node instance without a load balancer in an Oracle Cloud Infrastructure region.

{
  "serviceLevel": "PAAS",
  "serviceName": "JCS1onOCI",
  "edition": "EE",
  "serviceDescription": "My JCS instance on Oracle Cloud Infrastructure",
  "serviceVersion": "12cRelease212",
  "region": "us-phoenix-1",
  "availabilityDomain": "QnsC:PHX-AD-1",
  "subnet": "ocid1.subnet.oc1.iad.aaaaaaaasrksg2vpaaaaaa2biars2mxa6fiibx4tbhs2bbbbbblorxmbhbyq",
  "cloudStorageContainer": "https://swiftobjectstorage.us-phoenix-1.oraclecloud.com/v1/acme/mybucket",
  "cloudStorageUser": "yourObjectStorageUser",
  "cloudStoragePassword": "yourSwiftPasswordGeneratedInOracleCloudInfrastructure",
  "vmPublicKeyText": "yourSSHPublicKeyString",
  "components": {
    "WLS": {
      "adminUserName": "yourWLSAdminUserName",
      "adminPassword": "yourWLSAdminPassword",
      "managedServerCount": "1",
      "clusterName": "jcs1_cluster",
      "dbaName": "yourDBUserName",
      "dbaPassword": "yourDBCSPassword",
      "dbServiceName": "DBCS1",
      "shape": "VM.Standard1.1"
    }
  }
}

Example

$ psm jcs create-service -c /home/templates/create-jcs-service.json -of short 
"Accepted"
Job ID : 34148

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

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

When you see the message:

 "operationId":364,
 "operationType":"CREATE_SERVICE",
 "serviceId":364,
 "serviceName":"Example1Instance",
 "serviceType":"jaas",
 "startDate":"2016-04-28T17:04:41.931+0000",
 "status":"SUCCEED",
 "summaryMessage":"CREATE_SERVICE"