Tag Archives: JCS

Oracle Java Cloud Service Make a MultiVM DataGrid with One Call – Run this from your Firefox REST Client or cURL

We have all read about AWS instance creation and saving steps….;-)
This single REST call makes a scale out datagrid in one call. (Well you do need a DB instance and storage container in place…ok. three calls and some patience).

REST POST: 

https://jaas.oraclecloud.com/paas/service/jcs/api/v1.1/instances/YOUR_IDENTITY_DOMAIN

HEADER:

Authorization:  {hash of username and password}
X-ID-TENANT-NAME: YOUR_IDENTITY_DOMAIN
Content-Type:application/vnd.com.oracle.oracloud.provisioning.Service+json

BODY (You can also put this in a create.json file):
{
"serviceName" : "fmw02",
"level" : "PAAS",
"subscriptionType" : "MONTHLY",
"description" : "DevOps and Coherence Demo",
"provisionOTD" : false,
"cloudStorageContainer" : "Storage-YOUR_IDENTITY_DOMAIN/YOUR_STORAGE_CONTAINER",
"cloudStorageUser" : “YOUR_USER_ID",
"cloudStoragePassword" : “YOUR_IDENTITY_DOMAIN_PASSWORD",
"sampleAppDeploymentRequests" : false,
"parameters" : [
{
"type" : "weblogic",
"version" : "12.1.3.0.4",
"edition" : "SUITE",
"domainMode" : "PRODUCTION",
"managedServerCount" : "2",
"adminPort" : "7001",
"deploymentChannelPort" : "9001",
"securedAdminPort" : "7002",
"contentPort" : "8001",
"securedContentPort" : "8002",
"domainName" : "fmw02",
"clusterName" : "FMW02_Cluster",
"adminUserName" : "weblogic",
"adminPassword" : "Welcome_111",
"nodeManagerPort" : "6555",
"nodeManagerUserName" : "nodeMangerAdmin",
"nodeManagerPassword" : "Welcome_111",
"dbServiceName" : “YOUR_DBSERVICE",
"dbaName" : "SYS",
"dbaPassword" : “YOUR_DBPASSWORD",
"shape" : "oc3",
"VMsPublicKey" : "ssh-rsa YOUR SSH KEY"
},
{
"type" : "datagrid",
"scalingUnitCount" : "1",
"clusterName" : "CoherenceDGCluster",
"scalingUnit" :
{
"shape" : "oc3",
"vmCount" : "1",
"heapSize" : "4G",
"jvmCount" : "1"
}
}
]
}

If you want to avoid the REST Client then do this:

curl -i -X POST -u YOU@ORACLE.COM:YOUR_ACCOUNT_PASSWORD -d @create.json -H "Content-Type:application/vnd.com.oracle.oracloud.provisioning.Service+json" -H "X-ID-TENANT-NAME:YOUR_IDENITY_DOMAIN" https://jaas.oraclecloud.com/paas/service/jcs/api/v1.1/instances/YOUR_IDENTITY_DOMAIN
Have fun..
Advertisements
Tagged ,