psm jcs create-service
Use this command to create an Oracle Java Cloud Service instance.
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. |
|
(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: Default: false |
|
(Optional) Specifies the output format of the command’s response:
The default output format is the one you specified when using the |
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.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"
}
}
}
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"