Provisioning JCS service in Private Subnet (Part-2)

Author: | Posted in Uncategorized No comments

Hi Guys,

In today’s post we will continue the series with part-2.

For previous session or part-1 post you can check in below link.

https://blog.hussaindba.com/provisioning-jcs-service-in-private-subnet-part-1

So, now after creating a DB system, we will spin a JCS instance through JSON file in private subnet of OCI.

Activities to do:

  1. Create a policy where PSM services can access all resources in DEMO-COMP.
  2. Create a bucket in object storage for the backups of JCS.
  3. Create an Auth token of the backup username.
  4. Note the region name, Availability domain, OCID of subnet.
  5. Create a JSON file for provisioning JCS instance.
  6. Execute the JSON file using CURL command.

Create a policy and add the below statements to the policy.

Allow service PSM to inspect vcns in compartment DEMO-COMP
Allow service PSM to use subnets in compartment DEMO-COMP
Allow service PSM to use vnics in compartment DEMO-COMP
Allow service PSM to manage security-lists in compartment DEMO-COMP
Allow service PSM to inspect autonomous-database in compartment DEMO-COMP
Allow service PSM to inspect database-family in compartment DEMO-COMP

Create a bucket in the object storage for the backup of JCS.

Create Auth token of the backup username and note it.

Copy the token, backup username and make a note of it will use in the JSON file for the backups of JCI.

So, now before creating a JSON file we require below information, take look at it and provide the same in JSON file.

Region name : eu-frankfurt-1
Availability Domain : DZXO:EU-FRANKFURT-1-AD-3
OCID of private subnet : ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaabi25e6xyuqvmopbgrls2emmpjxriiuyddgtxmu4cupqmn4suq3ta
IDCS id : idcs-0d3fdde0d77c4c5d944acb7a714f6362

Below is the JSON file:

Go the bastion host and create a file create-jcs-instance-on-oci.json and paste the below content.

{
"serviceName" : "DEVJCS",
"region" : "eu-frankfurt-1",
"availabilityDomain" : " DZXO:EU-FRANKFURT-1-AD-3",
"subnet" : " ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaager2brlyiqej5haz5fvrl7srbqh2fwlypyc3qzql5xmhs2wdk37a ",
"vmPublicKeyText" : "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAmRXuV2JbfJRsdP/63CByKwH0Mt5pC2Cvy3BLiW1xYJxzwdJNtqaTfTgvbOnvuSM9gEn5izrcMDUCvJVMpVPhTi6EsFQBhG9Qnvi9GyQQl+fsWPOCWuxjcyJFaZIhsaMU29GCE8mJaZC3FrdFfm/ZA49/gryQdPx3b6GIMRN5DOhdzhRzFgFVKpCxsj0qp+UrQVSqYwpyLEt+hJQJY3hxp/L8bp1hCDZtBmKBSL6GDGhDSbfOOWjaigEYr2OOKHPYMQdPQXIg/wzQLJe5ZirsDDee6uPq62t9L+p6YVGhDTmG1O0YXeO/vF2Ay4x1mLP3ONVuZy2oDLPpkRnCgpXKgw== rsa-key-20190911",
"components": {
"WLS": {
"adminUserName" : "weblogic",
"adminPassword" : "WElcome_#123",
"sampleAppDeploymentRequested": "true",
"clusters": [
{
"clusterName" : "DEVJCS_CLUSTER",
"serverCount" : "1",
"shape" : "VM.Standard2.1",
"type" : "APPLICATION_CLUSTER"
}
],
"connectString" : " devdemo01. privsubnet1.demovcn.oraclevcn.com:1521/ miscpdb.privsubnet1.demovcn.oraclevcn.com ",
"dbaName" : "SYS",
"dbaPassword" : "WElcome_#123"
}
},
"loadBalancerOption":"NONE",
"cloudStorageContainer": "https://swiftobjectstorage.eu-frankfurt-1.oraclecloud.com/v1/frmor0qpdyvy/DEVJCSBKP",
"cloudStorageUser" : "hussain.rac@gmail.com",
"cloudStoragePassword" : "61g0i]r.Or-1Klk{<Le3"
}

Execute the below command to provision JCS instance:

curl -X POST https://psm.europe.oraclecloud.com/paas/api/v1.1/instancemgmt/idcs-0d3fdde0d77c4c5d944acb7a714f6362/services/jaas/instances \
-u shafiya130592@gmail.com:xxxxxxx \
-H 'X-ID-TENANT-NAME: idcs-0d3fdde0d77c4c5d944acb7a714f6362' \
-H 'Content-Type: application/json' \
-d @create-jcs-instance-on-oci.json

Instance created successfully.

Will see you in part-3 of this series, where we will see how to access the same application through Public Load balancer.

Happy learning,

Firoz K. Hussain

Add Your Comment