Okcan Yasin Saygili's Blog

May 30, 2017

Oracle Storage Cloud First Configurations

Filed under: Uncategorized — yasinsaygili @ 3:35 pm

First of all , install curl on windows https://winampplugins.co.uk/curl/ .
1. Get an authentication token from Oracle Storage Cloud Service.
curl -v -s -X GET -H “X-Storage-User: Storage-usthetalen:yasin@thetalent.me” -H “X-Storage-Pass: Q1w2e3r4_” https://storage.us2.oraclecloud.com/auth/v1.0
Our Auth key below side .
AUTH_tkb24e42debe0154c71d19f69586f25967

2.Now , container is being created .

D:\curl_7_51_0_openssl_nghttp2_x64>curl -v -s -X PUT -H “X-Auth-Token: AUTH_tkb2
4e42debe0154c71d19f69586f25967” https://storage.us2.oraclecloud.com/v1/Storage-u
sthetalen/test
curl -v -s -X PUT -H “X-Auth-Token: AUTH_tkb24e42debe0154c71d19f69586f25967” https://storage.us2.oraclecloud.com/v1/Storage-usthetalen/test
* Trying 129.152.172.4…
* TCP_NODELAY set
* Connected to storage.us2.oraclecloud.com (129.152.172.4) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: D:\curl_7_51_0_openssl_nghttp2_x64\ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
Okcan Yasin Saygılı
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / AES128-SHA
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; ST=California; L=Redwood Shores; O=Oracle Corporation; CN=*.us
2.oraclecloud.com
* start date: Dec 8 00:00:00 2015 GMT
* expire date: Jan 6 23:59:59 2017 GMT
* subjectAltName: host “storage.us2.oraclecloud.com” matched cert’s “*.us2.orac
lecloud.com”
* issuer: C=US; O=Symantec Corporation; OU=Symantec Trust Network; CN=Symantec
Class 3 Secure Server CA – G4
* SSL certificate verify ok.
> PUT /v1/Storage-usthetalen/test HTTP/1.1
> Host: storage.us2.oraclecloud.com
> User-Agent: curl/7.51.0
> Accept: */*
Okcan Yasin Saygılı
> X-Auth-Token: AUTH_tkb24e42debe0154c71d19f69586f25967
>
< HTTP/1.1 201 Created
< X-Trans-Id: txde23c6110fb442cb9ec70-0058296fb9ga
< Date: Mon, 14 Nov 2016 08:03:05 GMT
< Connection: keep-alive
< X-Last-Modified-Timestamp: 1479110585.21201
< Content-Type: text/html;charset=UTF-8
< Content-Length: 0
< Server: Oracle-Storage-Cloud-Service
<
* Curl_http_done: called premature == 0
* Connection #0 to host storage.us2.oraclecloud.com left intact
To get some error from this step .Such as Replication Place issues.
<html><body>The operation was not performed because the replication policy has n
ot been set. Sign in to My Services as the service administrator and select a re
plication policy for your service instance.</body></html>* Curl_http_done: calle
d premature == 0
* Connection #0 to host storage.us2.oraclecloud.com left intact
To solve this problem with select replication place on Oracle Public Cloud Service Console .
*************************************************************************************
1.Please look service console screen and to find replication policy .
2.Please select city which you want .
3.Please confirm your selection and don’t forget this policy cannot be changed .
*************************************************************************************

3.Verify your service is ready or not .
curl -v -s -X GET -H “X-Auth-Token: AUTH_tkb24e42debe0154c71d19f69586f25967” https://storage.us2.oraclecloud.com/v1/Storage-usthetalen/test
D:\curl_7_51_0_openssl_nghttp2_x64>curl -v -s -X GET -H “X-Auth-Token: AUTH_tkb2
4e42debe0154c71d19f69586f25967” https://storage.us2.oraclecloud.com/v1/Storage-u
sthetalen/test
* Trying 129.152.172.3…
* TCP_NODELAY set
* Connected to storage.us2.oraclecloud.com (129.152.172.3) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: D:\curl_7_51_0_openssl_nghttp2_x64\ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
Okcan Yasin Saygılı
* SSL connection using TLSv1.2 / AES128-SHA
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; ST=California; L=Redwood Shores; O=Oracle Corporation; CN=*.us
2.oraclecloud.com
* start date: Dec 8 00:00:00 2015 GMT
* expire date: Jan 6 23:59:59 2017 GMT
* subjectAltName: host “storage.us2.oraclecloud.com” matched cert’s “*.us2.orac
lecloud.com”
* issuer: C=US; O=Symantec Corporation; OU=Symantec Trust Network; CN=Symantec
Class 3 Secure Server CA – G4
* SSL certificate verify ok.
> GET /v1/Storage-usthetalen/test HTTP/1.1
> Host: storage.us2.oraclecloud.com
> User-Agent: curl/7.51.0
> Accept: */*
> X-Auth-Token: AUTH_tkb24e42debe0154c71d19f69586f25967
>
< HTTP/1.1 204 No Content
< X-Container-Object-Count: 0
< X-Container-Write: usthetalen.Storage.Storage_ReadWriteGroup
< Accept-Ranges: bytes
< X-Timestamp: 1479110585.37577
< X-Container-Read: usthetalen.Storage.Storage_ReadOnlyGroup,usthetalen.Storage.
Storage_ReadWriteGroup
Okcan Yasin Saygılı
< X-Container-Bytes-Used: 0
< X-Trans-Id: txa2ca1da6aa9e4d75bd47e-005829730dga
< Date: Mon, 14 Nov 2016 08:17:17 GMT
< Connection: keep-alive
< X-Storage-Class: Standard
< X-Container-Meta-Policy-Georeplication: us2-us6
< X-Last-Modified-Timestamp: 1479110585.21201
< Content-Type: text/html;charset=UTF-8
< Server: Oracle-Storage-Cloud-Service
<
* Curl_http_done: called premature == 0
* Connection #0 to host storage.us2.oraclecloud.com left intact

4.Post data on api .
curl -v -k -X PUT -H “X-Auth-Token: AUTH_tkb24e42debe0154c71d19f69586f25967” -T table.txt https://storage.us2.oraclecloud.com/v1/Storage-usthetalen/test/table.txt
D:\curl_7_51_0_openssl_nghttp2_x64>curl -v -k -X PUT -H “X-Auth-Token: AUTH_tkb2
4e42debe0154c71d19f69586f25967” -T table.txt https://storage.us2.oraclecloud.com
/v1/Storage-usthetalen/test/table.txt
* Trying 129.152.172.3…
* TCP_NODELAY set
* Connected to storage.us2.oraclecloud.com (129.152.172.3) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
Okcan Yasin Saygılı
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / AES128-SHA
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; ST=California; L=Redwood Shores; O=Oracle Corporation; CN=*.us
2.oraclecloud.com
* start date: Dec 8 00:00:00 2015 GMT
* expire date: Jan 6 23:59:59 2017 GMT
* issuer: C=US; O=Symantec Corporation; OU=Symantec Trust Network; CN=Symantec
Class 3 Secure Server CA – G4
* SSL certificate verify result: unable to get local issuer certificate (20), c
ontinuing anyway.
> PUT /v1/Storage-usthetalen/test/table.txt HTTP/1.1
> Host: storage.us2.oraclecloud.com
> User-Agent: curl/7.51.0
> Accept: */*
Okcan Yasin Saygılı
> X-Auth-Token: AUTH_tkb24e42debe0154c71d19f69586f25967
> Content-Length: 0
>
< HTTP/1.1 201 Created
< Etag: d41d8cd98f00b204e9800998ecf8427e
< Connection: keep-alive
< Last-Modified: Mon, 14 Nov 2016 08:21:57 GMT
< X-Trans-Id: tx0b221562fdf44e7987dc2-0058297424ga
< Date: Mon, 14 Nov 2016 08:21:56 GMT
< X-Last-Modified-Timestamp: 1479111716.23776
< Content-Type: text/html;charset=UTF-8
< Content-Length: 0
< Server: Oracle-Storage-Cloud-Service
<
* Curl_http_done: called premature == 0
* Connection #0 to host storage.us2.oraclecloud.com left intact

Refrences
1. http://www.cloudberrylab.com/blog/how-to-use-cloudberry-explorer-with-oracle-cloud-storage/
2. https://blogs.oracle.com/OracleCloud4Developers/entry/cloudberry_setup_for_oracle_storage
3. https://www.youtube.com/watch?v=9nRF0Hq-CLQ
4. http://blog.dbi-services.com/how-to-manage-your-containers-in-oracle-storage-cloud-service/
and another docs

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: