Getting started
Installation using binary packages
Right now rpm packages are available. Packages needed for a basic platform installation are the message oriented middleware (xmlblaster) and oap-xmlblaster-tools (tools provided to facilitate publish/suscribe to the MOM) both available from the downloads section.
The MOM (xmlblaster) must only be installed in one machine, and oap-xmlblaster-tools in the machines destinated to contain platform adapted applications. If you only want to test the platform, you will probably want to install both packages in the same machine.
Download the packages and install them:
rpm -Uvh xmlblaster-*.rpm rpm -Uvh oap-xmlblaster-tools-*.rpm
If you prefer to use yum, first copy the file ingent-yum.repo to /etc/yum.repos.d, and install:
yum install xmlblaster yum install oap-xmlblaster-tools
Configuration
Xmlblaster
After installing xmlblaster package, the file etc/xmlblaster/wrapper.conf must be edited, to make sure that the path to java is correct. This is the line that must be changed:
# old value #wrapper.java.command=java # correct path wrapper.java.command=/usr/java/jdk1.5.0_06/bin/java # <- yout path here
xmlblaster installs as a daemon, so it be started like this:
/etc/init.d/xmlblaster start
and stopped like:
/etc/init.d/xmlblaster stop
If xmlblaster has been installed from the rpm package, by default it will start its xml-rpc server at port 8080.
Oap-xmlblaster-tools
In the machine where oap-xmlblaster-tools is installed, two programs are available to publish/suscribe to the MOM. To publish there is oappublish, and to suscribe there is the daemon oapdaemon. Once the packages are installed, edit /etc/oap/oapconf.rb in each machine where oap-xmlblaster-tools is installed, and edit the following parameters:
OAP_SERVER_IP - The IP address of the machine where xmlblaster resides.
OAP_SERVER_PORT - The TCP port xmlblaster listens. You shouldn't need to change this port if you installed from rpm's.
OAP_CLIENT_IP - The IP address of the machine where oap-xmlblaster-tools is installed.
OAP_CLIENT_PORT - The TCP port oap-xmlblaster-tools will listen for xmlblaster notifications. You shouldn't need to change this port if you installed from rpm's.
OAP_USER - This parameter will identify this machin'e session in the MOM. It should be different for each machine in the platform. This machine IP adress should be a correct value.
OAP_PASS - The password for this machine's session in the MOM.
OAP_TOPICS - This is an array containing all the MOM topics you want the machine to be subscribed to, and the call to be made when a message is received on each topic. This is an example of a oapconf.rb for a machine containing both the xmlblaster and oap-xmlblaster-tools:
# Configuration settings OAP_SERVER_IP = "127.0.0.1" OAP_SERVER_PORT = "8080" OAP_CLIENT_IP = "127.0.0.1" OAP_CLIENT_PORT = "8081" OAP_USER="oappublisher" OAP_PASS="pass" OAP_TOPICS={"SSO"=>"/usr/share/oap/oapdaemon/oapdistribute.sh", "IMS"=>"/usr/share/oap/oapdaemon/oapdistribute.sh", "NOTIFIER"=>"/usr/share/oap/oapdaemon/oapdistribute.sh", "SUGARCRM" =>"/usr/share/oap/oapdaemon/oapdistribute.sh", "ASTERISK" =>"/usr/share/oap/oapdaemon/oapdistribute.sh"}
After this you should be able to execute both programs. oappublish is installed in /usr/bin/oappublish, so you should be able to execute it just typing oappublish from any path. To execute it type:
oappublish TOPIC message
Where TOPIC must be one of the topics configured in /etc/oap/oapconf.rb, and the message is what you intend to publish to the MOM (in our case a xml message). This is an example of what you should see after executing oappublish on a valid topic, configured with the previous oapconf.rb example.
[user@machine ~]# oappublish IMS '<hello/>' Topic=IMS Msg=<hello/> Server=127.0.0.1 Port=8080 I, [2006-11-23T10:02:24.752232 #5734] INFO -- : ==> ::PUBLISH:: <== Success publishing with sessionID sessionId:[...] I, [2006-11-23T10:02:24.802383 #5734] INFO -- : ==> ::LOGOUT:: <== Success with sessionID sessionId:[...], return Value: <qos><state id='OK'/></qos>
oapdaemon is installed in /usr/share/oap/oapdaemon. To execute it type:
/etc/init.d/oapdaemon start
This is the output you can see in the log file:
[user@machine oapdaemon]# ./oapdaemon.rb Server=127.0.0.1 Port=8080 Topics=MEX/usr/share/oap/oapdaemon/oapdistribute.sh IMS/usr/share/oap/oapdaemon/oapdistribute.sh SSO/usr/share/oap/oapdaemon/oapdistribute.sh ASTERISK/usr/share/oap/oapdaemon/oapdistribute.sh SUGARCRM/usr/share/oap/oapdaemon/oapdistribute.sh [root@PROVES oapdaemon]# [2006-11-23 10:23:43] INFO WEBrick 1.3.1 [2006-11-23 10:23:43] INFO ruby 1.8.4 (2005-12-24) [i386-linux] [2006-11-23 10:23:43] INFO WEBrick::HTTPServer#start: pid=7177 port=8081 localhost.localdomain - - [23/Nov/2006:10:23:43 CET] "POST /RPC2 HTTP/1.1" 200 172 - -> /RPC2 Subscribing to MEX I, [2006-11-23T10:23:43.978897 #7177] INFO -- : ==> ::SUBSCRIBE:: <== Success subscribing with sessionID sessionId:127.0.0.1... Subscribing to IMS I, [2006-11-23T10:23:44.015700 #7177] INFO -- : ==> ::SUBSCRIBE:: <== Success subscribing with sessionID sessionId:127.0.0.1... Subscribing to SSO I, [2006-11-23T10:23:44.070855 #7177] INFO -- : ==> ::SUBSCRIBE:: <== Success subscribing with sessionID sessionId:127.0.0.1... Subscribing to ASTERISK I, [2006-11-23T10:23:44.090408 #7177] INFO -- : ==> ::SUBSCRIBE:: <== Success subscribing with sessionID sessionId:127.0.0.1... Subscribing to SUGARCRM I, [2006-11-23T10:23:44.133400 #7177] INFO -- : ==> ::SUBSCRIBE:: <== Success subscribing with sessionID sessionId:127.0.0.1...
As it can been seen in the output, oapconf.rb is configured to make oapdaemon always call /usr/share/oap/oapdaemon/oapdistribute.sh when a message is received, no matter the topic. A developer who wants its application being called when a message is received, should add a line to oapdistribute.sh, or configure oapconf.rb to call its application when a message is received in the desired TOPIC. For instance, a developer could put something like this to oapdistribute.sh to make IMS adaptor and Sugar CRM adaptor being called when a message is received:
#!/bin/bash # call IMS adaptor ruby /usr/share/oap/ims/ims_adaptor.sh "$1" # call Sugar CRM adaptor /usr/share/oap/sugarcrm4.2.1d/sugarcrm.sh "$1"