Creating data source in Java Cloud Service

Tags

, , , , , , , , , , , , ,

Open Weblogic Console. Click on services from left panel. Click “Datasource” under “services”

jcsdsn2. Click “Lock & Edit” to enable “New” Button on the right. Cleck “New->Generic Data Source”

jcsdsn1

Name = it could be specified as any logical name

JNDI Name = This could be any thing (I have specified “jdbc/” and Oracle Database Cloud Service Name)

Database Type = Oracle

Click “Next”

jcsdsn2Database Type = Oracle

Database Driver = As specified above. You can choose these setting based on your DB and driver.

On next screen, “Simply click “Next”. It will open below screen,

jcsdsn3

Database Name = It is ORCL unless you have changed while creating database Cloud Service Instance.

Host Name = Enter your Database Cloud Service name

Port = 1521

Database User name = SYS as SYSDBA. Enter whatever user name you have specified for Database Cloud Service.

Password = Password for the connection which was specified while DBaaS creation.

Click “Next”

On the next page, Click “Test Configuration”. it should be success.

Click “Finish”.

Now refer this data source from your application and have fun!

Advertisements

Deploying Application to Java Cloud Service

Tags

, , , , , , , , , , , , ,

  1. Open Oracle Java Cloud Service.

jcswls2. Click on Weblogic Console as below (Make sure there is no SSH Tunnel open),

jcswls1It will open Weblogic Console for Java Cloud Service.

jcswls2Now this could be used to perform all activities which could be done from Weblogic Console i.e. Server start/stop, application deploy/undeploy, view log, create Data Source etc

Copy domain Name i.e. kumarjav_domain it will be used to create JCS Connection from JDeveloper.

Refer : Connecting Oracle Java Cloud Service from JDeveloper

Connecting Oracle Java Cloud Service from JDeveloper

Tags

, , , , , , , , , , , , ,

Make sure you have setup “SSH Connection for JCS” as explained in earlier blog and SSH connection is open.

Refer: Setting up SSH for Oracle Java Cloud Service

  1. Open JDeveloper (The Version I have used is JDeveloper 12.1.3.x)

2. Go to “Window” Menu and select “Application Servers”. It will display Application Servers Panel.

jcsjdev3. Right Click on Application Servers and Add New Application Server,

jcsjdev14. Select “Standalone Server from the below screen,

jcsjdev25. Specify Connection Name = Any Name, Connection Type = Weblogic 12.x as below,

jcsjdev36. Specify User Name and Password created for Weblogic Connection while setting up JCS Connection.

jcsjdev47. Specify hostname = localhost, Port = 9001 and weblogic domain = domain copied from weblogic console.

jcsjdev58. Click “Test Connection” it will show like this. All connections success. Clock “Ok”. And use this Weblogic Server connection for deployment etc activities from JDeveloper directly.

jcsjdev6

Setting up SSH for Oracle Java Cloud Service

Tags

, , , , , , , , , , , , ,

Make sure you have setup Oracle Java Cloud Service.

  1. Start Putty by clicking on putty.exe

jcsssh2. Specify Host Name – Public IP of Oracle Java Cloud Service Instance

3. make sure Connection Type = SSH

4. Specify Saved Session name = Any Name. Prefer Giving some meaningful name based on IP/Service connected.

5. Expand “Connections” from left panel. Select “Data”,

jcsssh1Specify Login Details -> Auto login User Name = opc

Select “Connection->SSH” from left Panel,

jcsssh2Make sure you have selected “Don’t start a shell or command at all” in Protocol options.

Select “Connection->SSH->AUTH” from left panel,

jcsssh3Browse and supply private key which was generated in earlier blog to “Private Key file for authorization”.

Select “Connection->SSH->Tunnels” from left panel,

jcsssh4Specify Source Port = 9001 This is specially configured for SSH based access.

Specify Destination = Java Cloud Service Public IP:9001 and click “add”.

Select “Session” from Left Panel and “Save” configuration and Open. It will open a console like this,

jcsssh5

Now you can use your JDeveloper to connect to JCS.

Setting up Oracle Java Cloud Service

Tags

, , , , , , , , , , , , ,

Pre-requisites:

Setting up Oracle Database Cloud Service

Watch Video on below link,

https://apexapps.oracle.com/pls/apex/f?p=44785:24:3417232610271::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:10040,16

There are few explanations,

VM Key – You should supply Public Key generated in the earlier post.

Storage Container Name – It should be in the form of IdentityDomainName/ContianerName e.g. MyTrial55669/MyFirstContainer

Copy JCS Admin User Name, Password to a separate notepad. it will be used further to connect Weblogic Console/ EM etc.

Rest goes fine.

Connecting Oracle Database Cloud Service from Oracle SQL Developer

Tags

, , , , , , , , , , , , ,

Pre-requisite:

How to setup SSH connection in SQL Developer

After doing above, Goto “Connections” -> Right Click “New Connection”

sqldeveloper-newconIt will open below screen where connection details will be supplied.

sqldeveloper-newcon1In the above image, specify properties as given below,

Connection Name – Specify any logical name.

User Name – It is the Administrator User Name specified while setting-up Oracle Cloud Database Service. e.g. SYS.

Password – Password which was specified for the Administrator user.

Select Connection Type – SSH

Role – SYSDBA

Port Forward – When you select Connection Type = “SSH” Port forward will list down “SSH Host Name” created by you. Select SSH Host Name setup in previous blog.

Specify SID – Generally it is ORCL unless you have changed.

Click “Test” button. It will say “Success”.

Click “Save” to save this connection and use it just like another DB connection.

How to setup SSH connection in SQL Developer

Tags

, , , , , , , , , , , , ,

Pre-requisites:

Generating Public/Private Key for Oracle Cloud Service

This is to remember that if you have selected Oracle Database 12c then there is SQL Developer 4.x with JDK 8 needs to be installed. Find download link below,

http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html

Steps to setup SSH in Oracle SQL Developer,

  1. Start SQL Developer 4.x

sqldeveloper2. Open “View” menu-> click “SSH”. It will open SSH Panel in SQL Developer.

sqldeveloper-ssh3. Right click on “SSH Hosts” and add “New SSH Host”

sqldeveloper-ssh1In the above screen, specify attribute values as given below,

Name – Specify Name of our choice. Prefer specifying name based on Oracle DB Cloud Service Name so that it will be easy to remember.

Host – Host must be the Public IP of Oracle Database Cloud Service.

Port – Leave it as is to 22.

User Name – It must be the administrator User Name of Database Service i.e. oracle.

  • Check “Use Key File” checkbox and browse “Private Key file” generated in earlier blog.
  • Check “Add a local port forward” checkbox also.
  • In below properties, specify Name – any name of your choice

Host – It must be Public IP of Database Service.

Port – It should be the port specified for your Database Service e.g. 1521

  • Make sure you check “Automatically assign local port”

After doing all, right click on this new SSH Host and click “Connect”

Setting up Oracle Database Cloud Service

Tags

, , , , , , , , , , , , ,

Login to Oracle Cloud Service using following link,

https://myservices.oraclecloud.com/mycloud/faces/gDashboard.jspx

login
Supply User Name and User Password and Sign In.

It lands on dashboard page as below,

dashboardOpen Oracle Database Cloud Service from here. It will land to the below page,

dbaasClick on “Create Service” button to create new Oracle Cloud Database Service. It will open below page where user has to select Service Level.

dbaas1In the Above Screen, Oracle Database Cloud Service(First Option) will be enabled only if associated Oracle Cloud Storage Account has a container created and available.

If there is no container created, User can go for Oracle Database Cloud Service-Virtual Image option.

Billing Frequency needs to be specified even if you have a trial account. I have selected “Monthly.

Click “Next” to proceed. It will open this screen as below,

Here User can specify database Version.

dbaas2

Click “Next” to proceed.

It will open below screen where user is supposed to provide Software Edition. I have selected Enterprise Edition.

dbaas3Click “Next” to proceed.

dbaas4Specify value to the required attributes in above screen e.g.

  • Service Name – Specify DBaas Service Name.
  • Compute Storage – Select configuration you would like to use.
  • VM Public Key – Supply Public Key created as part of Generating Public/Private Key for Oracle Cloud Service
  • Usable Database Storage – Specify storage requirement for the database service
  • Total data file storage – Specify total data file storage
  • Administration Password – Specify Password for the SYS user.
  • Confirm Password specified above.
  • DB name – it would automatically populated. User can modify if required.
  • PDB Name – Pluggable database name will be automatically populated. User can modify if required.
  • Backup destination – If you remember, we discussed this option while setting up Storage Container in earlier post. Option “Both Cloud and Local Storage” will only be available if container is configured. Otherwise user can select “Local Storage Only”
    If backup destination is “Both Cloud and Local Storage” then user will have to supply,
  • Cloud Storage Container – it will be like identityDomainName/containerName
  • Cloud Storage User name – it will be cloud admin user name(normally email id)
  • Cloud Storage Password – It will be cloud admin password.

Click “Next” to proceed.

Confirm on the landing page. It will start creation of DBaas Service.

User can click on “Service Name” which will be listed on the page to see list of activities getting performed. It takes about 15-30 min depending on cloud network availability.

Creating Oracle Cloud Storage Service container

Tags

, , , , , , , , , , , , ,

Pre-requisites:

Generating Public/Private Key for Oracle Cloud Service

Setting up curl on Windows 7

Login to Oracle Cloud Service using following link,

https://myservices.oraclecloud.com/mycloud/faces/gDashboard.jspx

login
Supply User Name and User Password and Sign In.

Open Oracle Storage Cloud Service,

storageExpand Service Details and copy REST Endpoint URL

storage1Open windows command prompt as administrator-> Go to folder where curl is installed,

and run below command to generate AUTH Key,

<curlInstallDir>curl -v -s -X GET -H “X-Storage-User: Storage-<IdentityDomainName>:<UserIdUsedToLoginToCloudAccountYourMailId>” -H “X-Storage-Pass:<PasswordUSEDToLogin>” https://<IdentityDomainName&gt;.
storage.oraclecloud.com/auth/v1.0

It would generate an output like below.

authkey

Copy “X-Auth-Token” from the console.

Copy REST API URL from Oracle Storage Cloud Screen.

Run below command on command prompt by replacing,

<curlInstallDir>curl -v -X PUT -H “X-Auth-Token: <AUTHKEYHERE>” <REST API for Storage Cloud>

It would generate output like below,

container

It confirms that container has been created for you.