Wednesday, March 30, 2011

Oracle Weblogic Portal 10.3.2 on Ubuntu 10.10, deployment into ESXi Virtual Infrastructure

This article shows you how to install Oracle Weblogic Portal into a NFS folder with Oracle DB, SOA Suite and OSB installed.

The infrastructure details can be found here.

Unlike Oracle SOA Suite 11g and Oracle Service Bus 11g which use Weblogic server 10.3.4, Weblogic Portal 10.3.2 requires Weblogic Server 10.3.2. To fulfill the version compatibility, the WLP has been installed into its own middleware home, wlpmw, sits at the same level as osbmw in the file hierarchy.


To install Weblogic Portal 10.3.2, the following installation binary is used (downloadable from Oracle website).

portal103_linux32.bin

Installation steps

1) Login as oracle user
2) execute portal103_linux32.bin

$./portal103_linux32.bin

3) Follow the steps depicted in the following images







Uncheck the 'Run Quickstart' checkbox, we will create the domain later.

Happy Portaling.

Cheers,

Saturday, March 26, 2011

TIBCO Administrator 5.6 Installation on Windows XP

This short article describe the installation sequence of TIBCO softwares required before TIBCO Administrator and be installed and deployed. The target host is a Windos XP machine located in the following infrastructure.


Refer to this article for a complete description of the infrastructure.

The administrator node will be used to manage other TIBCO softwares such as TIBCO Businessworks on another machines.

TIBCO Administrator 5.6.0 requires the following softwares to be installed on the target host.

TIBCO Runtime Agents (TRA) 5.6.0
- TIBCO Rendezvous 8.1.1
- TIBCO Hawk 4.8.1
- JRE 1.5.0
- TPCL 5.6.0

Install TRA from the package TIB_tra-suite_5.6.0_win_x86_32.exe

The installation is straight forward. Double click the package from the windows Explorer and follow the instructions. Accept the default installation locations.

After the installation of TRA 5.6.0, you could apply additional patch if required. Patch 5.6.2 is available for TRA in the package TIB_tra-suite_5.6.2_win_x86.exe. The patch will install the following updated components

- TIBCO Rendezvous 8.2.1
- TPCL 5.6.2
- TRA 5.6.2
- JRE 1.6.0

After the patch, install TIBCO Administrator 5.6.0 from the package TIB_tibcoadmin-epe-simple_5.6.0_win_x86_32.exe.

Monday, March 21, 2011

Oracle SOA Suite PS3 (11.1.1.4.0) on Ubuntu Linux 10.10 Installation Guide (includes Optimal Flexible Architecture)

We will be looking at the installation of Oracle SOA Suite PS3 (11.1.1.4.0) on Ubuntu Linux 10.10. I have stretched the installation scope a little bit by installing the SOA Suite of products into an existing Oracle OFA (Optimal Flexible Architecture) that contains an existing Oracle Database 11g installation.

Oracle has recommended a UNIX file structure (known as Optimal Flexible Architecture, OFA) for Oracle Database installation and is documented in the Oracle Database Installation Guide.

In our example, we install Oracle SOA Suite 11.1.1.4.0 into the directory structure of an existing Oracle Database 11.2.0.1.0.

Pre-conditions
1) You must have an existing oracle database installation, on a file directory structure compliant to Optimal Flexible Architecture (OFA). For instructions to install Oracle Database 11g, please refer to this article.
2) Both servers (Oracle Database server and Oracle Service Bus server) must share the common oracle user and oinstall group with identical uid and gid. You can implement this either with NIS (the yellow pages, yp), NIS+, rsync or LDAP. The latter is the preferred but I will leave this exercise to a separate article. For now, just create the oracle user and oinstall group manually on the SOA Suite host.
3) Both server should mount the NFS exported file system using the same convention, either u01 or disk01 as recommended by Oracle. On my machine, I mapped the exported FS by specifying the following in /etc/mtab file.

192.168.50.100:/mnt/home_shared/sharedvol/u1 /u01 nfs rw,hard,intr,addr=192.168.50.100 0 0

SOA Suite Installation requires at least 512MB of swap space. If your default swap partition has less space than that, then the easiest way to increase the swap space is to follow the instructions here. I have my Ubuntu 10.10 Standard Operating Environment created with 1GB of swap partition and export it as a ESX ova template and re-use it for all my Oracle product installation.

Given that the target host is a multi-homed host, with a NIC for application and another for storage, I have updated the /etc/hosts file to ensure the hostname resolved into the correct IP address.

172.16.20.50    orasoa1.a.kein.com   orasoa1
127.0.0.1       localhost.localdomain   localhost

Bill of Materials
1) Oracle Weblogic Server 10.3.4 (wls1034_oepe111161_linux32.bin)
2) Oracle SOA Suite PS3 11.1.1.4.0 (ofm_soa_generic_11.1.1.4.0_disk1_1of2.zip, ofm_soa_generic_11.1.1.4.0_disk1_2of2.zip)

The following are typical steps to installing Oracle SOA Suite onto your target machine.

1) First, you must install Oracle Weblogic Servier 10.3.4 as oracle user.

ORACLE_BASE = /u01/app/oracle
MW_HOME = /u01/app/oracle/product/soamw
We don't need support do we?

Select the 'Typical' option, we will develop something on this installation
WLS_HOME = /u01/app/oracle/product/soamw/wls_10.3
3) Install Oracle SOA Suite PS3 (11.1.1.4.0)

Unlike SOA Suite PS2 (11.1.1.3.0) which needs to be installed on top of SOA Suite 11.1.1.2.0, PS3 can be installed as a standalone package. As oracle user, unzip ofm_soa_generic_11.1.1.4.0_disk1_1of2.zip and ofm_soa_generic_11.1.1.4.0_disk1_2of2.zip into your /home/oracle folder.

5 folders (Disk1, Disk2, Disk3, Disk4 and Disk5) will be created after unzip operation. cd into Disk1 and execute runInstaller. When asked for JRE/JDK location, use the one installed with WLS. (wither Sun JKD or JRockit)

oracle@orasoa1:~/Disk1$ ./runInstaller

Checking if CPU speed is above 300 MHz.    Actual 3296 MHz    Passed
Checking Temp space: must be greater than 150 MB.   Actual 1583 MB    Passed
Checking swap space: must be greater than 512 MB.   Actual 1023 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 65536    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-03-29_11-49-15PM. Please wait ...
Please specify JRE/JDK location ( Ex. /home/jre ), /bin/java should exist :/u01/app/oracle/product/soamw/jrockit_160_22_D1.1.1-3

If you see the following error on the console, you can ignore them (do nothing about them)

oracle@orasoa1:~/Disk1$ [WARN ][jrockit] MaxPermSize=512m ignored: Not a valid option for JRockit
Log: /u01/app/oraInventory/logs/install2011-03-29_11-49-15PM.log
sh: /bin/rpm: not found
sh: /bin/rpm: not found

SOA Suite Installation Screens

Select the existing oraInventory of previous product installation




Click 'Continue' to ignore the result of failed pre-requisite checks

Specify the existing middle home (soamw) created during installation of Weblogic Server in Step 1 above.
MW_HOME=/app/oracle/product/soamw

The installer detected a compatible Weblogic Server version already exist in the selected MW_HOME

Start the installation process by clicking the 'Install' button


Click 'Next' to finish the installation
Click 'Finish' to complete the installation
Note that after the installation of SOA Suite, the inventory.xml file under the ContentsXML folder in oraInventory is updated to include the following entries.


   
      
   


   
      
   


The following image depicts the summary of the resultant directory structure after WLS and SOA installations.

The final step is to make sure your operating environment has the right variables set up.

As root,

#vi /etc/bash.bashrc

Add the following lines

export ORACLE_BASE=/u01/app/oracle
export MW_HOME=$ORACLE_BASE/product/soamw
export WLS_HOME=$MW_HOME/wls_10.3

save the file.

Deployment Summary

Server Configuration

Server Name
IP Address
Gateway
OS
CPU #
RAM
orasoa1.a.kein.com
eth0 - 172.16.20.50
eth1 - 192.168.50.50
172.16.20.1
-
Ubuntu Linux 10.10
1
1GB

Software Configuration

Component
Application location
Data files location
Comments
Oracle Weblogic Server 10.3.4
/u01/app/oracle/product/soamw/
-

Oracle SOA Suite   11.1.1.4.0
/u01/app/oracle/product/soamw/
-


Storage Configuration

File System
Mounted On
Available Space
192.168.50.100:/mnt/sharedvol/shared/u1
/u01
1 TB

Voilà, Oracle SOA Suite on OpenFiler NFS.

Happy SOA'ing.

Saturday, March 5, 2011

Oracle Database 11g R2 Deployment into ESXi Virtual Lab

With the infrastructure in place, the Oracle 11g R2 (non-clustered) database server is now deployed.

For instructions on how to install Oracle Database 11g in Ubuntu 10.10, please refer to this article.


Following is a summary of the server configuration.

Hardware Configuration

Server Name
IP Address
Gateway
OS
CPU #
RAM
oradb11g01.a.kein.com
eth0- 10.10.30.10
eth1 - 192.168.50.10
10.10.30.1
-
Ubuntu Linux 10.10
1
1GB

Storage Configuration

File System
Mounted On
Available Space
192.168.50.100:/mnt/sharedvol/shared/u1
/u01
1 TB

Software Configuration

Component
Application location
Data files location
Comments
Oracle Database 11g R2
(11.2.0.1.0)
/u01/app
/u01/app/oracle/oradata



Port Configuration

Type
Port and Port Range
Protocol/Application
Comments
Listener
1521
TCP/IP

Enterprise Manager DB Console
5560
HTTP



Testing the deployment

Connectivity from APP_VLAN (for TIBCO BW)

TIBCO BW Admin Server ip address. Currently DHCP, we will need to assign a static IP address later.

C:\XEClient\bin>ipconfig

Windows IP Configuration

Ethernet adapter Local Area Connection 3:

        Connection-specific DNS Suffix  . : a.kein.com
        IP Address. . . . . . . . . . . . : 172.16.20.100
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 172.16.20.1

» ping test

C:\XEClient\bin>ping 10.10.30.10
Pinging 10.10.30.10 with 32 bytes of data:

Reply from 10.10.30.10: bytes=32 time=5ms TTL=63
Reply from 10.10.30.10: bytes=32 time<1ms TTL=63
Reply from 10.10.30.10: bytes=32 time<1ms TTL=63
Reply from 10.10.30.10: bytes=32 time<1ms TTL=63

Ping statistics for 10.10.30.10:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 5ms, Average = 1ms

C:\XEClient\bin>

» sqlplus test

C:\XEClient\bin>sqlplus system/xxxxxxx@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.30.10)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Feb 28 22:25:19 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

» jdbc connection test

Copy the JdbcCheckup.java codes from the official Oracle documentation "Oracle® Database - JDBC Developer’s Guide 11g Release 2 (11.2)". We will use this program unmodified. Compile and run to test your jdbc connection.

You will need the ojdbc6.jar libraries, and a JDK for this to compile.  ojdbc6.jar comes with the Oracle Database 11g Release 2 Client (11.2.0.1.0) for both Windows and Linux.

To compile:
javac -classpath .;[path_to_ojdbc6.jar]\ojdbc6.jar JdbcCheckup.java

To execute:
java -cp .;[path_to_ojdbc6.jar]\ojdbc6.jar JdbcCheckup

The outcome:

Please enter information to test connection to the database
user: youruserid
password: yourpassword
database(a TNSNAME entry): yourservicename
Connecting to the database...Connecting...
connected.
Hello World
Your JDBC installation is correct.

Important notes about the TNSNAME parameter:

If you encounter the following error,
Exception in thread "main" java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified

        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:737)
        at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:401)
        at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:531)
        at oracle.jdbc.driver.T2CConnection.(T2CConnection.java:148)
        at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
        at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
        at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:207)
        at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:157)
        at JdbcCheckup.main(JdbcCheckup.java:45)

it usually means your tnsnames.ora cannot be located.

In order for the program to locate your tnsnames.ora, you need to specify the environment variable TNS_ADMIN to the path containing the file.

Example (Linux)

export TNS_ADMIN=$ORACLE_HOME/network/admin

If you do not have tnsnames.ora (probably because you do not use SQL*Net) file on your system, you can specify at the TNSNAME parameter input with the following format.

host:port:service_name

Example:
database(a TNSNAME entry):10.10.30.10:1521:orcl

» telnet test

bash-4.1$ telnet 10.10.30.10 1521
Trying 10.10.30.10...
Connected to 10.10.30.10.
Escape character is '^]'.
Connection closed by foreign host.
bash-4.1$ 

Connectivity from MSG_VLAN (for EMS)

» ping test

kj@tibems01:~$ ping 10.10.30.10
PING 10.10.30.10 (10.10.30.10) 56(84) bytes of data.
64 bytes from 10.10.30.10: icmp_seq=1 ttl=63 time=1.32 ms
64 bytes from 10.10.30.10: icmp_seq=2 ttl=63 time=0.596 ms
64 bytes from 10.10.30.10: icmp_seq=3 ttl=63 time=0.549 ms
^C
--- 10.10.30.10 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 0.549/0.822/1.323/0.355 ms
kj@tibems01:~$ 

» sqlplus test

kj@tibems01:~/app/kj/product/11.2.0/client_1$ ./sqlplus system/xxxxx@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.30.10)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 1 17:20:00 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> 

» telnet test

kj@tibems01:~$ telnet 10.10.30.10 1521
Trying 10.10.30.10...
Connected to 10.10.30.10.
Escape character is '^]'.

Cheers,

Thursday, March 3, 2011

Basic TIBCO EMS file-based-storage, shared state Fault Tolerance Configuration

The official TIBCO EMS documentation has detailed the steps required to setup a functional Fault Tolerance server pair. I made a summary of the steps below for those who are in hurry.

WARNING: This is not a production configuration as it lacks of security enforcement such as ssl communication between servers. The the file system where the shared storage resides (which is NTFS) may not meet the criteria (Write Order, Synchronous Write Persistence, Distributed File Locking, Unique Write Ownership - refer to the official documentations) for Fault Tolerance. The shared storage folder in local drive is for quicky PoC only. The tibemsd.conf files may contain default parameter values that do not meet your operation scenarios.

New! - FT Pair on NFS
New! - FT Pair on Oracle

In scope:
- FT pair with shared state, file-based
- Inspect the propagation of a new topic into backup server when Fail-over takes place
- FT pair with sever authorization = enabled

Not in scope:
- SSL requirements
- Client configurations for FT connections
- Shared application binary folders for both participating servers
- Testing of client fail-over (it would probably not work because storage criteria are not met)

Tools:
Notepad++
DOS command line prompt

Bill of materials:
Installation of TIBCO EMS 5.1.x (1x)
tibemsd.conf (2x, 1 for primary sever, 1 for backup server)
Windows XP host (1x, we will use different listening ports for both severs so they can co-exist in the same host)

Schematic of Fault Tolerance EMS Server Pair Configuration, shared state (from the official doco).



Preparing the tibemsd.conf for the first server
1) Create a local folder in you local drive, name it "ems_ft_config"
2) Create a sub-folder under that folder, name it "datastore" (it becomes "ems_ft_config\datastore")
3) Copy tibemsd.conf from the sample folder of your TIBCO EMS installation. In my host, it is "C:\tibco\ems\5.1\samples\config"
4) Paste tibemsd.conf into "ems_ft_config", rename it to tibemsd1.conf
5) Edit tibemsd1.conf with your favorite text editor. Update the following parameters

users                   = x:\ems_ft_config\users.conf
 groups                  = x:\ems_ft_config\groups.conf
 topics                  = x:\ems_ft_config\topics.conf
 queues                  = x:\ems_ft_config\queues.conf
 acl_list                = x:\ems_ft_config\acl.conf
 factories               = x:\ems_ft_config\factories.conf
 routes                  = x:\ems_ft_config\routes.conf
 bridges                 = x:\ems_ft_config\bridges.conf
 transports              = x:\ems_ft_config\transports.conf
 tibrvcm                 = x:\ems_ft_config\tibrvcm.conf
 durables                = x:\ems_ft_config\durables.conf
 channels                = x:\ems_ft_config\channels.conf
 stores                  = x:\ems_ft_config\stores.conf
 
  
 store                   = x:\ems_ft_config\datastore

 
 ft_active               = tcp://your-ip-address:7224
 ft_heartbeat            = 3
 ft_activation           = 10
 ft_reconnect_timeout    = 60

6) Save the file.
7) Make another copy of tibemsd1.conf, name it tibesmd2.conf. Update the following parameters (note: replace 'x' with  your drive letter)

ft_active               = tcp://your-ip-address:7222

8) Save the file.
9) Open a command prompt, change directory to your EMS installation bin (in my case, it is C:\tibco\ems\5.1\bin).
10) Execute the following command

tibemsd -config x:\ems_ft_config\tibemsd1.conf

You should see the server startup traces in the stdout.



Let's examine the output.

(1) The server is started with tibemsd1.conf file
(2) It is trying to contact the server specified in the ft_active parameter, but could find the server (could be it was down, we haven't started it, or there was a connection problem to the target server.
(3) It decided to startup as active server (as opposed to 'backup server), and start listening on port 7222 as specified in the 'listen' parameter.
(4) Because it knows that itself is part of a FT pair, it performs the state recovery step.

Up to this stage, all is running as expected.

11) Open another command prompt, change directory to your EMS installation bin (in my case, it is C:\tibco\ems\5.1\bin).
12) Execute the following command

tibemsd -config x:\ems_ft_config\tibemsd2.conf

You should see the server startup traces in the stdout.


Let's examine the output.

(1) The server is started with tibemsd2.conf file
(2) It starts listening on port 7224 as specified in the 'listen' parameter of tibemsd2.conf file
(3) This time, it has started itself in standy mode because it has detected an active EMS server specified in the ft_active parameter.

On the primary server, the trace shows that the secondary server has been accepted as the standby server.


Using tibemsadmin, connect to each server and issue a command 'show server'. It provides the summary of the server, as you can see from the following images. The first server is the 'active' sever, and the second server is the 'standby server'.

Primary Server

Secondary Server

Examine one of the fail-over behaviour.

We will examine the behaviour of the backup server after it re-reads the configuration. First we add a new topic into the active server by using tibemsadmin tool.

1) Open another command prompt, change directory to your EMS installation bin (in my case, it is C:\tibco\ems\5.1\bin).
2) Execute the following command to connect to the primary sever (make sure that you have this server as the active sever)

tibemsadmin -server tcp://192.168.13.200:7222 -user admin

3) Press enter when asked for password, because we don't have one
4) Create a new topic called topiccreatedin7222 by issueing the following command at the admin prompt[tcp://192.168.13.200:7222> ]

tcp://192.168.13.200:7222> create topic topiccreatedin7222



5) Shut down the active server by issuing a 'shutdown' command at the admin prompt and answer 'yes' to the confirmation question.

tcp://192.168.13.200:7222> shutdown

You will see that the active server is shutdown, and the standy server resume it's operation as the primary server.



6) Connect to the now active primary server

tibemsadmin -server tcp://192.168.13.200:7224 -user admin

7) Issue the command 'show topics' at the admin prompt

tcp://192.168.13.200:7224> show topics

You now see that the topic created in the previously active server is now served in this new instance of active server.



Enabling server authorization for TIBCO EMS Fault Tolerance pair -> Available here.

Tuesday, March 1, 2011

Vyatta Router Configuration Example of vR0

vR0_FW0 acts as the primary router routing traffics in and out from my host machine. Here is the config.boot file of vR0_FW0 described in my previous article. You may tweak the file and upload that into your Vyatta router if you want to create a similar environment.

interfaces {
    ethernet eth0 {
        address 192.168.0.55/24
        description external
        duplex auto
        hw-id 00:0c:29:98:49:42
        smp_affinity auto
        speed auto
    }
    ethernet eth1 {
        address dhcp
        duplex auto
        hw-id 00:0c:29:98:49:4c
        smp_affinity auto
        speed auto
    }
    ethernet eth2 {
        address dhcp
        duplex auto
        hw-id 00:0c:29:98:49:56
        smp_affinity auto
        speed auto
    }
    ethernet eth3 {
        address 192.168.75.55/24
        duplex auto
        hw-id 00:0c:29:98:49:60
        smp_affinity auto
        speed auto
    }
    ethernet eth4 {
        address dhcp
        duplex auto
        hw-id 00:0c:29:98:49:6a
        smp_affinity auto
        speed auto
    }
    loopback lo {
    }
}
service {
    https
    nat {
        rule 10 {
            description "SNAT from any internal host"
            outbound-interface eth0
            type masquerade
        }
        rule 20 {
            description to_esx001_lans
            outbound-interface eth3
            type masquerade
        }
        rule 30 {
            description to_management_host
            outbound-interface eth4
            type masquerade
        }
    }
    telnet {
        port 23
    }
}
system {
    domain-name kein.com
    gateway-address 192.168.0.1
    host-name edge
    login {
        user vyatta {
            authentication {
                encrypted-password XXXXXXXXXX
            }
            level admin
        }
    }
    name-server 192.168.0.1
    package {
        auto-sync 1
        repository community {
            components main
            distribution stable
            password ""
            url http://packages.vyatta.com/vyatta
            username ""
        }
        repository lenny {
            components "main contrib non-free"
            distribution lenny
            password ""
            url http://mirrors.kernel.org/debian
            username ""
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone GMT
}


Cheers