venerdì 26 febbraio 2016

How to create an Oracle Cloud Storage Container

If you need to create an Oracle Cloud Storage Container, you need it for example if you are creating an Oracle Database Cloud Service with backup, you can do this in different ways:

- With Rest services
- With tools like CloudBerry
- With OEPE (Oracle Enterprise Pack for Eclipse) and the Cloud Plugin.

Suppose that you are working on the following Cloud Domain:

Identity Domain: gse00000410
Login UserName: cloud.admin
Login Password: FabryPWD

The target is to create a Storage Container named: MariniStorage


----------[ Rest Services ]----------

We need to execute 2 command, the first one is to obtain an Auth-Token and a Storage-Url, the second one will create the Storage Container.

Here you can see the detail of the command and of the response:

[weblogic@localhost ~]$ curl -v -s -X GET -H "X-Storage-User: Storage-gse00000410:cloud.admin" -H "X-Storage-Pass: FabryPWD" https://gse00000410.storage.oraclecloud.com/auth/v1.0

* About to connect() to gse00000410.storage.oraclecloud.com port 443 (#0)
*   Trying 160.34.16.106...
* Connected to gse00000410.storage.oraclecloud.com (160.34.16.106) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*     subject: CN=*.storage.oraclecloud.com,O=Oracle Corporation,L=Redwood Shores,ST=California,C=US
*     start date: Aug 07 00:00:00 2015 GMT
*     expire date: Oct 05 23:59:59 2016 GMT
*     common name: *.storage.oraclecloud.com
*     issuer: CN=VeriSign Class 3 Secure Server CA - G3,OU=Terms of use at https://www.verisign.com/rpa (c)10,OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US
> GET /auth/v1.0 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: gse00000410.storage.oraclecloud.com
> Accept: */*
> X-Storage-User: Storage-gse00000410:cloud.admin
> X-Storage-Pass: 
FabryPWD
>
< HTTP/1.1 200 OK
< Date: Thu, 25 Feb 2016 06:06:27 GMT
< X-Auth-Token: AUTH_tk68a22aa11a48e6846da268d9d2c808f7
< X-Storage-Token: AUTH_tk68a22aa11a48e6846da268d9d2c808f7
< X-Storage-Url: https://em2.storage.oraclecloud.com/v1/Storage-gse00000410
< Content-Length: 0
< Server: Oracle-Storage-Cloud-Service


[weblogic@localhost ~]$ curl -v -s -X PUT -H "X-Auth-Token: AUTH_tk68a22aa11a48e6846da268d9d2c808f7" https://em2.storage.oraclecloud.com/v1/Storage-gse00000410/MariniStorage
* About to connect() to em2.storage.oraclecloud.com port 443 (#0)
*   Trying 160.34.16.106...
* Connected to em2.storage.oraclecloud.com (160.34.16.106) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*     subject: CN=*.storage.oraclecloud.com,O=Oracle Corporation,L=Redwood Shores,ST=California,C=US
*     start date: Aug 07 00:00:00 2015 GMT
*     expire date: Oct 05 23:59:59 2016 GMT
*     common name: *.storage.oraclecloud.com
*     issuer: CN=VeriSign Class 3 Secure Server CA - G3,OU=Terms of use at https://www.verisign.com/rpa (c)10,OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US
> PUT /v1/Storage-gse00000410/MariniStorage HTTP/1.1
> User-Agent: curl/7.29.0
> Host: em2.storage.oraclecloud.com
> Accept: */*
> X-Auth-Token: AUTH_tk68a22aa11a48e6846da268d9d2c808f7
>
< HTTP/1.1 201 Created
< X-Trans-Id: tx69e0087526814f74a24fa-0056ce9b56ga
< Date: Thu, 25 Feb 2016 06:12:39 GMT
< Connection: keep-alive
< X-Last-Modified-Timestamp: 1456380759.12206
< Content-Type: text/html;charset=UTF-8
< Content-Length: 0
< Server: Oracle-Storage-Cloud-Service


----------[ CloudBerry ]----------

You need CloudBerry Explorer for OpenStack Freeware.
You can download it from:
http://www.cloudberrylab.com/free-openstack-storage-explorer.aspx

Install it and add a new Oracle Cloud Storage Account:


Now you can see your containers and create a new one using the blue cube icon "new container".


----------[ OEPE and the Cloud Plugin ]----------

You can download OEPE from:
http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/index.html

Install it and from Window->Show View->Other, select the Oracle Cloud Plugin.

Now under iassmb_Storage you can see your containers and with the right button of the mouse if you click on iassmb_Storage you can create a new container.  



Nessun commento:

Posta un commento