Pages

Wednesday, February 10, 2016

Accessing Oracle Storage Cloud Service Instance !!!


Oracle Storage cloud services is one of the mandatory service to have from Oracle Cloud Services Stack to provision any other Oracle cloud services e.g. Oracle SOA Cloud Services and Oracle Database Cloud Service. Unfortunately, Oracle does not provide any graphical tool to manage the Oracle Storage regular operation such as creating/updating/deleting containers and objects. In order to perform all these operations Oracle has recommended below three approaches -

1)      Using Rest API (cURL)
2)      Using Java Library
3)      Using Oracle Storage Cloud Software Appliance (oracle command based tool)

Fortunately, there is freeware tool “CloudBerry Explorer for OpenStack Stroage” from a company called ”CloudBerry Lab”, using which we can access Oracle Storage cloud service graphically, resulting ease of accessibility of storage and perform all sort of basic operation e.g. creating/deleting containers and objects

This post will walk through how to access of Oracle Storage Cloud Services via CloudBerry Explorer graphical tool as well as cURL command based tool.

Installing “CloudBerry Explorer for OpenStack Stroage” tool and accessing Oracle Storage cloud Service


Step1:

Download  “CloudBerry Explorer for Openstack storage” tool from below URL -



Step2:





Click on tool action from your desktop and Select “OracleCloud” storage option from new connection –






Step3:

Enter Details for your environment as describe below and click on OK button to make connection-
Connection Attributes
Example values
Display Name:
This is open string, give any name which you like for your connection e.g. “My Oracle Cloud Storage”
User Name:
Username  Syntax:- “<Oracle Storage cloud service instance id>-<IdentityDomainName>:<username>”
Example username: “Storage-jcsdemo0117:gse_cloud-admin@oracleads.com”
Password:
Your username password which we used to login into Oracle cloud service portal
Authentication Service:
Note: Check for “us6” or “us2” depending up on which data center your storage server location exists. 





Step4:

Above steps will launch tool in graphical mode wherein you can create, view and delete container and objects.




Accessing Oracle Storage Cloud Services using cURL tool


Accessing Oracle Storage Cloud service using cURL has two main steps-

Getting Authorization token

Oracle Storage Cloud Service requires authentication when executing operations against your storage service instance. Authentication is provided to the storage service instance in the form of an authentication token. You request an authentication token from the service by sending your user credentials to the service. Authentication tokens are temporary and expire in 30 minutes. This is a session time out and not an idle time out, which means that tokens expire even if they are in use. You must include your current authentication token with every operation against your service instance.

Step1:

Download curl tool from below site –






Note: Carefully select the cURL version as per your windows/ios environment. I was using win10 64 bit as result I have selected the above one.

Step2:

Change directory to the location where you have downloaded .cab file and unzipped it e.g.



Step3:

Run the below command to get the Authorization token and verify actual Storage Rest Endpoint URL –
Syntax:
curl -v -X GET \ -H "X-Storage-User: <my storage service instance name>-<my Identity  domain name>:<My Username>" \ -H "X-Storage-Pass: <my Password>" \ https://foo.storage.oraclecloud.com/auth/v1.0
Actual String:
curl -v -X GET \ -H "X-Storage-User: Storage-jcsdemo0117:gse_cloud-admin@oracleads.com" \ -H "X-Storage-Pass: XXXXXXX" \ https://jcsdemo0117.storage.oraclecloud.com/auth/v1.0
In above-
my storage service instance name  is “Storage”
my Identity  domain name is “jcsdemo0117”
my Username name is “gse_cloud-admin@oracleads.com




Step4:

Once you run the above command it will show you Authorization token, make a note of this token as while creating container or object you need to pass this token in your next request.


Create Container & Objects


Step5:

Once Authorization token is obtain then we need to replace authorization token value in below string and execute put command to create the container inside storage-
Syntax:

curl -v -X PUT \
-H "X-Auth-Token: AUTH_tk209f7f2ea1265a0d3f29d28a2dc8ced6" \
-d "Hello, World!" \
https://foo.storage.oraclecloud.com/v1/myService-myIdentity3/myContainer/
myObject
Actual String-
curl -v -X PUT \ -H "X-Auth-Token: AUTH_tk05196ebb22544e4fdcffc28aa20605e0" \ -d "Hello, World!" \ https://jcsdemo0117.storage.oraclecloud.com/v1/Storage-jcsdemo0117/fpsoadbbkp/testobj








No comments:

Post a Comment