Tuesday, 28 April 2015

Command Line Cloning - Oracle R12.1.3 Example

Command Line Cloning

It's very simple to clone Oracle EBS R12.1.3 using Delphix command line interface.

Simple example. We have following data sources available:

Delphix - Disabled Oracle EBS Sources

Data sources:
  • VIS - Oracle database source data
  • VIS appsTier - EBS R12 application stack source
  • VIS dbTechStack - EBS R12 database binaries source
All the sources are greyed out which means that they are disabled and are not connected to the source EBS instance. Source EBS instance is down at this time and is not necessary to be up during provisioning process.

To create new totally independent Oracle EBS instance we just need to execute one command:

ssh delphix_admin@DOMAIN@192.168.1.32 < /home/delphixcli/VISDEV2_app.dx
The command is executing simple Delphix CLI script which is creating three virtual objects necessary to bring a new virtual EBS instance to life. The objects:
  1. VISDEV2 dbStack - new Oracle database binaries
  2. VISDEV2 - new database
  3. VISDEV2 appsTier - new application binaries
Delphix CLI cloning script (VISDEV2_app.dx):

database provision
defaults
set type=TimeflowPointSemantic
set location=LATEST_SNAPSHOT
set container="VIS dbTechStack"
commit
set container.name="VISDEV2 dbStack"
set container.group="Targets - EBS"
set source.parameters.appsPassword=apps
set source.parameters.display="ebstrg10:0.0"
set source.parameters.oracleHome="db/tech_st/11.1.0"
set source.parameters.targetSystemHostname="ebstrg10"
set source.parameters.targetSystemPortPool=1
set source.parameters.targetSystemSid="VISDEV2"
set source.parameters.targetSystemUtlFileDir="/var/tmp"
set source.name="VISDEV2 dbStack"
set sourceConfig.name="VISDEV2 dbStack"
set sourceConfig.path="/data/u01/oracle/VISDEV2"
set sourceConfig.repository="ebstrg10.kolibero.local/builtin:ebs-db"
commit

database provision
defaults
set type=TimeflowPointSemantic
set container="VIS"
set location=LATEST_SNAPSHOT
commit
set container.name=VISDEV2
set container.group="Targets - EBS"
set source.mountBase="/data/u01/oracle/data2"
set sourceConfig.type=OracleSIConfig
set sourceConfig.databaseName=VISDEV2
set sourceConfig.uniqueName=VISDEV2
edit sourceConfig.instance
set instanceNumber=1
set instanceName=VISDEV2
back
set sourceConfig.repository="ebstrg10.kolibero.local/'/data/u01/oracle/VISDEV2/db/tech_st/11.1.0'"
commit

database provision
defaults
set type=TimeflowPointSemantic
set location=LATEST_SNAPSHOT
set container="VIS appsTier"
commit
set container.name="VISDEV2 appsTier"
set container.group="Targets - EBS"
set source.name="VISDEV2 appsTier"
set source.parameters.appsPassword=apps
set source.parameters.display="ebstrg20:0.0"
set source.parameters.commonTop="apps/apps_st/comn"
set source.parameters.instTop="/data/u01/oracle/VISDEV2_inst"
set source.parameters.oracleHome="apps/tech_st/10.1.3"
set source.parameters.targetSystemDatabaseDomainName="kolibero.local"
set source.parameters.targetSystemDatabaseServerNode="ebstrg10"
set source.parameters.targetSystemHostname="ebstrg20"
set source.parameters.targetSystemPortPool=1
set source.parameters.targetSystemSid="VISDEV2"
set sourceConfig.name="VISDEV2 appsTier"
set sourceConfig.path="/data/u01/oracle/VISDEV2"
set sourceConfig.repository="ebstrg20.kolibero.local/builtin:ebs-app"
commit
Execution of the script takes 14 minutes and new EBS life is born.

Delphix - New EBS virtual target objects created


New EBS R12.1.3 Life

Conclusion

  • It is very easy to prepare Delphix CLI script to clone EBS environments
  • The script is self documenting
  • The script can be adjusted for automation

Update, 2015-12-11
Current fixed version of scripts available on GitHub here: https://github.com/goliasz/delphix-cli-ebs

Wednesday, 22 April 2015

Oracle EBS R12.1.3 - Virtualizing Experience



Oracle's ERP Goes Virtual

Some time ago I discovered in marketing materials that Delphix is capable of virtualizing Oracle EBS. From that moment I wanted to test it myself. Let us test it!

Test Enviroment Architecture

We need:
  1. Source Oracle EBS R12.1.3 environment.
  2. Delphix Engine v.4.2.1.
  3. 2 target VM to host database and application node.

I have decided to install source R12.1.3 in one VM running in ESX5.5. Both database and application node will share the same VM host. This is to conserve some resources. We do not need great performance of source R12.1.3 since we are only using it as a source for virtualizing and cloning. I have installed EBS from scratch in VM running Oracle Enterprise Linux 6.4 (Santiago). Installation was done in two steps. First installation of R12.1.1 from media available in Oracle e-delivery and then patching up to R12.1.3. This was quite challenging for me but eventually I have succeeded. This was Vision Demo installation.

I have chosen most recent version of Delphix Engine v4.2 for test. It supports virtualizing Oracle EBS R11i, R12.1 and R12.2. This time we are testing R12.1.3. In one of the next posts I am going to show how it goes with R12.2. Delphix is running as VM in ESX5.5.

We need target VMs to host our database and application stack of R12.1.3. I have decided to use also Oracle Enterprise Linux 6.4 for this.

VM Sizing

Source VM - Source EBS
- 8GB RAM
- 4 vCores
- 16 GB Swap
- 20 GB - system partition
- 600 GB - partition dedicated to EBS R12.1.3 (used for db and apps binaries, database and installation media)

Target VM - Database Tier Node
- 4GB RAM
- 2 vCores
- 16GB - Swap
- 20GB - System Partition

Target VM - Application Tier Node
- 8GB RAM
- 4 vCores
- 16 GB - Swap
- 20GB - System Partition

Source EBS Instance

Delphix GUI - Capacity Management Screen
Delphix after importing of EBS source objects into applience's storage is reporting:
- source database takes 186.99 GB
- database stack takes 53.94 GB
- application stack takes 28.07 GB

EBS binaries plus database files occupy 269 GB disk space in source VM.

Source VM reports following
Space Occupation in Source VM

Folder data keeps not only EBS files but installation media too.


Target Instance Nodes

Database Tier Target VM
Space Occupation - Target VM - Database Tier
We can see in screenshot above that there is only 3.6GB occupied in our system partition. The mounted resources are managed by Delphix Engine. DE delivers database binaries and database files this way. No Oracle binaries are installed in this VM.
We can see that there are "appdata_container" and "oracle_db_container" folder names over there. They indicate what kind of resources are mounted on target VM.

Space occupied by target VM - Apps Tier


Application Tier Target VM
In screenshot above we can see that we occupy in system tablespace only 3.6GB. We also have one network resource mounted from Delphix Engine. These are just application tier binaries managed by DE.

Virtualizing Process

Clonig approach is very well described in Ron Enkins's blog posts:

http://blog.delphix.com/ron/2014/09/10/virtualsing-oracle-ebs-r12-1/
http://blog.delphix.com/ron/2014/10/08/creating-virtual-oracle-ebs-environment-using-delphix/ 
It consists of two phases
1. Creating data sources
2. Virtualizing/Cloning

Both phases consist of three steps.

Data sources - one time process
1. Create database stack data source - ingest database binaries and EBS database related stuff
2. Create Oracle database data source - ingest database itself
3. Create application stack data source  - ingest application binaries and related data


Virtualizing/Cloning - Virtual EBS Components
1. Create virtual database stack - binaries. It is done by mounting network resource containing virtual database binaries. It is mounted in target database VM. After mounting listener process is started.
2. Create VDB (Virtual Database) in target database VM. Startup database using virtual binaries.
3. Create virtual application stack in target app stack VM. Mounting binaries from Delphix Engine. Startup of binaries.

All these steps are done in just few clicks. It's described in detail in Ron's blog posts mentioned above.

Delphix Main Console - EBS Objects
In screen above we can see:
VIS - data source for Oracle database VIS
VIS dbTechStack - data source containing Oracle database binaries and database server related data in EBS
VIS appsTier - data source containing application binaries and apps related data

VISDEV dbStack - virtual database binaries mounted to and running in database node VM
VISDEV - virtual database opened in database node VM
VISDEV appsTier - virtual application binaries mounted to and running in application node VM

Virtual means
  • We don'd need space in target VMs
  • We only need computing power in target VMs
  • We can multiply all virtual objects endlessly. The only limit is computing resources in target VMs.
  • We can use all amazing Delphix features like snapshots, rewind, refresh from source, time flow etc etc


Database Stack Card

Virtual Database Card


Application Tier Card



Delphix'ed EBS Login Screen



Inside Virtual EBS

Virtual VISDEV EBS R12.1.3


Conclusion

Timing
  1. Provisionig of virtual database stack - 3 minutes
  2. Provisioning of VDB - 3 minutes
  3. Provisioning of virtual application stack - 11 minutes

You can have running virtual copy of fully functional Oracle EBS R12.1.3 in 17 minutes. This is timing in my small lab box.

You don't need vast resources at target nodes to run your virtual EBS.

You can do it without expect knowledge. Once source EBS instance is ingested into Delphix Engine and your target VMs are properly prepared (one time action) you can do it in just few clicks in Delphix Web GUI.

Imagine what you can do with such capabilities.
  • EBS patching and regression tests are getting safe and can be done in parallel with other projects. No collisions with release activities.
  • Production bugs can be tested against system state when the problem happened - time flow feature of Delphix data sources
  • You can run parallel projects in isolated environments
 

Sunday, 29 March 2015

KonaKart Community Edition virtualized by Delphix Landshark 2.0

KonaKart virtualized!


Delphix capability to virtualize applications is amazing!

After some brainstorming I've decided to try to use Delphix Landshark Demo 2.0 to virtualize e-commerce application.

What is KonaKart?

KonaKart is enterprise e-commerce java application. It is adopted by companies that are very well recognizable. See here: http://www.konakart.com/customers/




Sample Screenshot from KonaKart Community edition.

The idea behind

Let us imagine we want to create test/development numerous instances of KonaKart application with almost no storage and time cost. We want to create, synchronize and destroy test instances on demand in seconds.
Delphix can do this with various databases, flat files and such big fishes like Oracle's e-Business Suite. Why not just KonaKart?

How to do this?

We can virtualize KK in 2 ways.
  1. Use flat files virtualizing capability and prepare hook scripts to do some post provisioning actions after virtual application instance is created.
  2. Create our own toolkit doing everything behind the scenes. This is something similar like shown here Landshark 2.0 Employee Web App Virtualization.
Let us get bold and do our own toolkit.

Testbed preparations

We need an source application to virtualize. I've decided to install KonaKart Community Edition in new schema "konakart" in linuxsource.delphix.local host. The host is available as a part of Delphix Landshark 2.0 Demo. It consists of Delphix Engine VM, linuxsource VM and linuxtarget VM. You can get it here.
Process of KonaKart installation is easy. You can get the installation files here. I've used "64′ Linux/Unix" zipped package. I've used existing ORCL Oracle 11g database available in linuxsource.delphix.local VM. After successful installation you should be able to run KK using a link similar to this http://linuxsource.delphix.local:8780/konakart.

Now we are ready to virtualize KK.

What does it mean to virtualize KK?

What do we want to do? We want to create a virtual copy of KonaKart on different host (aka linuxtarget.delphix.local). What is virtual copy? It is a NFS mounted directory in linuxtarget filesystem containing new copy of KK binaries. We want to reconfigure the new application so that it connects to new "virtual" database. Beside this we want to give it to testers and developer so we need to mask sensitive data in new virtual database.   

Steps to do


Very easy! We have everything thanks great job done by Adam Bowen from Delphix. He has prepared sample application toolkit we can use to create our own.
But first let us plan the steps that has to be performed by new toolkit. We want the toolkit to:
  1. Create a virtual copy of application binaries. 
  2. Mount the directory with copied binaries to target host (linuxtarget.delphix.local).
  3. Reconfigure the application so that it connects to new virtual database.
  4. Mask sensitive data in virtual database i.e. application users, password etc. etc.
  5. Start the virtual application
That is all we need to do to have brand new working KK.

How to create new toolkit?

Let us take a look at existing example Adam has prepared for us. We can find it in linuxtarget VM /home/delphix/webapp.json

If we look inside we can easily understand how does it work! But firs we need to reformat it to make it better readable. I'm using http://jsonformatter.curiousconcept.com/ to make it human readable :).

Beginning of formated webapp.json
webapp.json contains following sections
  • name
  • type
  • stop
  • start
  • snapshot
  • prettyName
  • provision
  • provisionParameters
  • statusScript
To prepare our own toolikit we have to create new json file with modified sections
  • name
  • stop
  • start
  • prettyName
  • provision
  • provisionParameters 
name - just add new name of the toolkit
prettyName - new name visible in Delphix GUI
provisionParameters - here we have to decide what paremeters we need to accomplish our goals. I needed some additional parameter ORACLE_HOME. This parameter was necessary to execute sqlplus from the script embeded in start and provision section.
stop, start, provision - contain embedded shell scripts that get executed when virtual application gets provisioned, started or stopped.

I've created my own konakartapp.json file with custom embedded scripts implementing my logic described above in "Steps to do".
Part of my konakartapp.json file.
  

How to register toolkit definition in Delphix?

Very easy! Again thanks to Adam. We just need to modify script webapp_toolkit_installer.sh or create our own. We just have to upload our new json file.
Contents of webapp_toolkit_installer.sh
 After executing our new toolkit installer we have our toolkit ready to use.

Showtime

Now we can see our toolkit in Delphix.
Now we can choose KonaKart-Application-ORA as new data set.
We can create a data set of KonaKart-Application-ORA and dSource. This is Delphix representation of our source KK instalation.
KonaKart dSource is ready to use.

When dSource is ready we can provision our virtual KonaKart application. 

Now it's time to provision new virtual KK.

First step by provisioning. We are filling in parameters of provisioning KK application.
Now formality. Name of our new KK application in Delphix Engine.
Just summary of our settings and let's go! Make it real!
30 seconds of wait time and we have new KonaKart up and running. Ready to use!
New virtual instance of KonaKart application ready to use!

Conclusion

Delphix has amazing capabilities! The ability to virtualize whole application stacks is unique and very powerful. You can have a bunch of virtual applications in just few clicks, in just a minute and almost with no additional storage cost.