Friday, September 4, 2015

Using CloudBerry for creating containers in the Oracle Storage Cloud Service

One of the pre-requisite of creating an Java Cloud Service instance or DB Cloud service instance is  container.



A container is a storage compartment that provides a way to organize the data stored in Oracle Storage Cloud Service.

Any user with the Service Administrator role can create containers. You should create
at least one container for Java Cloud Service or DB Cloud Service. . Containers are similar to a directory structure but with a key distinction: unlike directories, containers cannot be nested. By default, all containers are standard

 Note: An Oracle Storage Cloud Service account is not required if you are creating Oracle Java Cloud Service—Virtual Image instances only

There are essentially 2 ways of creating containers

1. Rest Based Web services, which is based on Open Stack Swift standard
2. Java based API.

The focus of this tutorial is using Rest Based API.

The Rest based API too can either be invoked using CURL commands or using 3rd party tools like Cloud Berry.

Note: We can use any tool that supports Open Stack Swift Standard.

What you Need?

1. Oracle Public Cloud Account
2. Cloud Berry


Steps to create container using Cloud Berry
  1. The first step is to install the cloud berry on your machine.
  2. Click File -> Open Stack


  1. From the OpenStack tab - click Add






  1. Give the below values in the form 
    a.      Display Name: Any name of your choice
    b.     UserName: Storage-identityDomain:OracleCloudUser Name. For example if your oracle cloud identity domain is USORACLE012 & UserName is Tom@or.com, the username to be used will be Storage-USORACLE01:Tom@or.com 
    c.      API Key: Oracle Cloud Username & Password
    d.     Authentication Service: This value should be of the following https://identityDomainName.storage.oraclecloud.com/auth/v1.0 For example
    https://USORACLE012.storage.oraclecloud.com/auth/v1.0

    or

     it can be of following format - https://dataCenterCode.storage.oraclecloud.com/auth/v1.0, for example, if our data center is em2, 
    https://em2.storage/oraclecloud.com/auth/v1.0

     
    e.      Make sure you uncheck “Use Key Stone Authentication”

Note: The Authentication service URL in early releases of Oracle Storage Cloud Service was this https://storage.dataCenterCode.oraclecloud.com/auth/v1.0



After giving the above values, click on Test Connection



To create new container


1.     Go to the main screen of Cloud Berry.


2.     Click on the connection you created from the source. This will make a connection to your oracle cloud storage.


3.     Click Create New Container & give the container name & hit Ok.


That's all, you can use the above container for creating your Database or Java Cloud Service account.


Monday, August 24, 2015

Comptia Cloud+ Certification

Cloud is new the buzzword. If you go and search for cloud computing, every vendor comes up with its own definition. For all those people who want to get certified, there are many vendor specific certifications like AWS Architect etc or one can chose many vendor neutral certifications like the one provided by CloudSchool or Comptia.

One such exam which i recently did was Comptia Cloud+ Certification. This certification gives you good overview on the internals of cloud architecture and concepts which can be very helpful.

The below are the resources which one could use to pass the exam.

1. Comptia Cloud+ Book 
This book is a good starting point. It also contains CD which gives you 5 full exams. Though this is a good starting point, but i think one should not totally rely on it. The concepts given in the book are good from theory perspective, but real exam does test you in dept of particular concept. So one needs to go for combination of concepts given in this book along with youtube videos to get more clarity.

2. CV0-001 Mock mobile based mock exam
These are good 200+ questions available on over an apple device.

3.  Simply iLearn web-based training

4. cybrary.it -> Good site for dedicated videos on Comptia Cloud+

Finally, make sure you go thru Comptia Cloud+ Terminologies given in the objectives thoroughly & also go through as many as videos on you tube for each of the concept given in the book. The exam tests you on in deep on concepts like RAID, SAN, NAS, Security, HBA, LUN Masking etc.

Best of Luck!!


Tuesday, February 10, 2015

Installing jDeveloper in Oracle Public Cloud

Pre-requisites

1. JDeveloper downloaded to you local machine.
2. Valid subscription in Oracle Public Cloud - Java Cloud Service


Brief Steps

  1. Provision DBCS Instance
  2. Provsion JCS Instance
  3. Copy JDeveloper from your local machine to remote machine
  4. Configure XWindows
  5. Start VNCServer
  6. Create SSH Tunnel
  7. Unzip zip file from #3.
  8. VNC into your public machine.
  9. Run JDeveloper.



Details Steps

3. Copy the file you downloaded to the public IP. You can use PSCP.exe to copy Jdeveloper. Before copying make sure you create a separate folder into which you will be copying JDeveloper file.
For quick syntax on how to use PSCP, follow the link.


4. Configure XWindows

To Configure XWindows, you need to first putty into your public IP. On Terminal execute the below commands.


  • Edit sshd_config & change value of X11Forwarding Property
    • sudo vi /etc/ssh/sshd_config
    • Change the value of X11Forwarding to yes
  • Restart sshd
    • sudo /etc/init.d/sshd restart
  • Run the below command to prevent vnc displaying lock screen
    • gconftool-2 -s -t bool /apps/gnome-scrensaver/lock_enabled false
  • Start VNC Server
    • vncserver :1 -depth 16 -alwaysshared -geometry 1200x750 -s off
  • Confirm VNC Server is running
    • vncserver -list
  • Check if OPC user has access to $TMP. If no execute the below command. VNC tries to write to $TMP folder. If no access then you will get an error when trying to accessing the server using VNC Client. If the access is successful, you will be able to CD in $TMP as opc user.
    • sudo chmod 777 /u01 -R

5. Create SSH Tunnel using command line or using putty.


  • Using Commandline
    • ssh -L 6905:127.0.0.1:5901 -N -f -i Complete_Path_Of_SSH_Public_Key -l opc OPC_Public_IP
  • Using Putty
6. Login into VNC using opc crendentials



7. VNC Desktop


8. Open Terminal & run Jdeveloper









Thursday, January 29, 2015

Backing up your database using Oracle Database backup as Service

Oracle Database backup as service is a public cloud service from oracle to store oracle db backups.

This service is typically helpful to store your database backups at an off site location. This service helps you to access the backup over the internet and recover when required.

The backup store in the remote location is replicated across many systems which helps our customers against corruption or failed database etc.

Also with features like encryption  the data is secured too.

The basic steps to user this service is as follows.

Note: I am using Oracle DB as service as my database instance to backup. You can also follow the below steps to backup your local database.

Putty to Cloud Instance using oracle user.
1.      Copy Jar file from your local system to Oracle public cloud instance.
C:\Program Files (x86)\PuTTY>pscp.exe -i D:\Oracle_Cloud\xxxOPC.ppk d:\downloads\opc_installer\opc_install.jar oracle@x.x.x.x:/home/oracle
2.      Login/Putty into Oracle Public Cloud instance using oracle user.

3.      Confirm the environment, by executing the below commands..
a.      echo $ORACLE_HOME -> This has to be set
b.      java -jar version -> Req 1.5+ version
c.      java –jar opc_install.jar -> You can execute this command to see what are the various parameters required to execute this. We will be running this command again with necessary parameters.

4.      Execute bellow command

java -jar opc_install.jar -serviceName serviceName -identityDomain inoracleXXXXX -opcId username -opcPass cloudinstancepassword -walletDir /home/oracle/opc/wallet -libDir /home/oracle/opc/lib

If these directories /wallet or /lib is not created, please create them.

5.      On Executing of the above command, some files like libopc.so, opcSID.ora & cwallet.sso files are created. These files would be used with RMAN for backup/restore of your database. The below is output of command generated at step#4
Oracle Database Cloud Backup Module Install Tool, build 2014-09-04
Oracle Database Cloud Backup Module credentials are valid.
Oracle Database Cloud Backup Module wallet created in directory /home/oracle/opc/wallet.
Oracle Database Cloud Backup Module initialization file /u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcORCL.ora created.
Downloading Oracle Database Cloud Backup Module Software Library from file opc_linux64.zip.
Downloaded 23169388 bytes in 0 seconds.
Download complete.


6.      Execute RMAN command on the console

7.      Connect to target database
RMAN> connect target /

8.      Configure RMAN using below command. 

9.      RMAN>
CONFIGURE CHANNEL DEVICE TYPE sbt PARMS='SBT_LIBRARY=/home/oracle/opc/lib/libopc.so, SBT_PARMS=(OPC_PFILE=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcORCL.ora)';
Output of the above Command
Using target database control file instead of recovery catalog
Old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' MAXPIECESIZE 2 G FORMAT   'cloudstorage_%d_%U' PARMS  'SBT_LIBRARY=libopc.so, ENV=(OPC_PFILE=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcORCL.ora)';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS  'SBT_LIBRARY=/home/oracle/opc/lib/libopc.so, SBT_PARMS=(OPC_PFILE=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcORCL.ora)';
new RMAN configuration parameters are successfully stored
10.   RMAN> SET ENCRYPTION ON IDENTIFIED BY 'ppwd' Only;
11. RMAN> BACKUP DEVICE TYPE sbt DATABASE;

You should be able to see backup complete command on execution of above command.
The amount of time taken to backup a local database to cloud depends upon size/bandwidth of your database & network connection.

Hope this helps.

You can refer to Oracle Documentation for more details.

Using Putty PSCP With Private Key

To trasmit a file from your local machine to remote machine using PSCP command having a private key, the below command can we very useful

c:\putty\pscp.exe -i D:\Oracle_Cloud\xx.ppk C:\Users\xx\Downloads\sample.txt opc@p    x.x.x.123:/home/xx

Tuesday, October 7, 2014

Clearing data in DataObjects with BAM 12c

I was recently facing an issue in which I was not able to delete data within dataobjects in BAM due to BAM 12c bug.

BAM 12c provides BAMCommand utility, which is just like iCommand in 11g.

To delete data in data objects in BAM 12c, we to do following steps

1. Go to FMW_HOME/soa/bam/bin/
2. Edit BAMCommandConfig.xml with your BAM Configuration
3. Set Java_Home
4. Execute the below command to delete data within data object

 ./bamcommand -cmd clear -name "DataObjectName" -type dataobject


where DataObjectName is name of your data object. 

On Executing the above command, you would be promoted to provide server credentials.

Similarly you can also export BAM objects using the below command

./bamcommand -cmd export -type all -file "home/zzz/test.zip"