In this blog post I will walk through the steps necessary to create a database instance within the Oracle Database Cloud Service. Using the credentials provided to you by Oracle when you purchased your subscription, login in to the My Services console for the Oracle Cloud. Then navigate to the Oracle Database Cloud Services Console.

dcs1

 

Click the Create Instance button.

dcs2

Click the Next button.

dcs3

I am interested in creating an instance of Oracle Standard Database, so currently my only option is 11g. Click the Next button.

dcs4

 

Select Standard Edition and click the Next button.

 

dcs5

Oracle does not provide the password to the users that are created on the VM host.  You must therefore generate public/private key pair using an SSH and provide the VM Public Key to the instance configuration as shown above.  

The Cloud Storage Container must be generated using REST APIs.  Open an SSH terminal (e.g. using PuTTy) and run the following command:

  • First you must generate an authentication token

curl -v -X GET      -H “X-Storage-User: Storage-<identity domain>:<username>”   \

         -H “X-Storage-Pass: <password>”  \

          https://storage.<data center code>.oraclecloud.com/auth/v1.0

Locate the authorization token in the output

* About to connect() to storage.us2.oraclecloud.com port 443 (#0)

*   Trying 160.34.0.51… connected

* Connected to storage.us2.oraclecloud.com (160.34.0.51) 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=*.us2.oraclecloud.com,O=Oracle Corporation,L=Redwood Shores,ST=California,C=US

*       start date: Oct 22 00:00:00 2014 GMT

*       expire date: Dec 21 23:59:59 2015 GMT

*       common name: *.us2.oraclecloud.com

*       issuer: CN=Symantec Class 3 Secure Server CA – G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US

> GET /auth/v1.0 HTTP/1.1

> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2

> Host: storage.us2.oraclecloud.com

> Accept: */*

> X-Storage-User: Storage-flexagon21:[email protected]

> X-Storage-Pass: xxxxxx

< HTTP/1.1 200 OK

< Date: Fri, 17 Apr 2015 17:16:22 GMT

< X-Storage-Url: https://storage.us2.oraclecloud.com/v1/Storage-flexagon21

< X-Storage-Token: AUTH_tk736991ce8c94e28989a79051869d7a94

< X-Auth-Token: AUTH_tk715991ce8c84e24989a79051869d7a94

< X-Trans-Id: tx86ef3ce067c94a669c803-0055313fe6

< Content-Length: 0

< Cache-Control: no-cache

< Pragma: no-cache

< Content-Type: text/plain

< Content-Language: en

* Connection #0 to host storage.us2.oraclecloud.com left intact

* Closing connection #0

*Note that the authorization token is only valid for 30 minutes.

  • Next locate the REST api from the Database Service Console and run the following command to create the storage container
curl -v -X PUT -H “X-Auth-Token: <authorization token>” <REST API URL>/<container name>

* You can pick any container name you like.  The name is used to identify the Cloud Storage Container on the screen above.  The format is:  Storage-<identity domain>/<container name>

* About to connect() to flexagon21.storage.oraclecloud.com port 443 (#0)

*   Trying 160.34.0.231… connected

* Connected to flexagon21.storage.oraclecloud.com (160.34.0.231) 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 30 00:00:00 2014 GMT

*       expire date: Aug 30 23:59:59 2015 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-flexagon21/backupContainer HTTP/1.1

> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2

> Host: flexagon21.storage.oraclecloud.com

> Accept: */*

> X-Auth-Token: AUTH_tk716991ce8c94e24389a79051869d7a74

< HTTP/1.1 201 Created

< Date: Fri, 17 Apr 2015 17:15:20 GMT

< Content-Length: 0

< Content-Type: text/html; charset=UTF-8

< X-Trans-Id: txd3c8c49d8bb24de3a4498-0055313fa8

< Cache-Control: no-cache

< Pragma: no-cache

< Content-Language: en

* Connection #0 to host flexagon21.storage.oraclecloud.com left intact

* Closing connection #0

 

Click the Next button to continue.

dcs6

 

Verify the information and click the Create button to create the instance.  Note that it takes about 35 minutes to complete the instance creation process.

dcs7

In my next blog article I will show how to create a WebLogic instance within the Java Cloud Service and attach it to the Database Cloud Service instance we created in this article.

Erick Jones

I have been working with Java EE technologies for 20 years, and have applied industry experience implementing IBM and Oracle solutions. Through my architecture and development experience I have implemented several homegrown and third party automation solutions to manage the software delivery lifecycle. At Flexagon I am a DevOps evangelist, with a passion for helping customers deliver software to their customers faster, cheaper, and with higher quality. My primary focus is on FlexDeploy product strategy, and pre-sales and post-sales implementations.

More posts by Erick Jones
    

Leave a Reply

Your email address will not be published. Required fields are marked *