A sample Vagrantfile to install ems, oracle, and bpm

# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The “2” in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don’t change it unless you know what
# you’re doing.
Vagrant.configure(“2”) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.

# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = “bento/centos-7.2”
config.vm.synced_folder “d:/software/dev_tools/BPM/bpm4.0/TIB_amx-bpm_4.0.0_linux24gl23_x86_64”, “/vagrant/bpm_install”
config.vm.synced_folder “d:/software/dev_tools/BPM/EMS8.2.2”, “/vagrant/ems_install”
config.vm.synced_folder “d:/software/dev_tools/oracle/12c/linux64/database”, “/vagrant/oracle_install”
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing “localhost:8080” will access port 80 on the guest machine.
# config.vm.network “forwarded_port”, guest: 80, host: 8080

# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network “private_network”, ip: “192.168.33.10”

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network “public_network”

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder “../data”, “/vagrant_data”

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider “virtualbox” do |vb|
vb.memory = “6144”
end

#
# View the documentation for the provider you are using for more
# information on available options.

# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define “atlas” do |push|
# push.app = “YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME”
# end

# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision “initialize”, type: “shell”, path: “scripts/initialize.sh”

#config.vm.provision “ems_install”, type: “shell”, path: “https://gist.githubusercontent.com/yonglai/caa8e8497a3640e23e93c61def9691ab/raw/f7e1daf08feb2abc98259574fdb1fea4960fb50f/ems_install.sh”
config.vm.provision “ems_install”, type: “shell”, path: “scripts/ems_install.sh”, privileged: false

config.vm.provision “ems_startup”, type: “shell”, path: “scripts/ems_startup.sh”

config.vm.provision “pre_oracle_install”, type: “shell”, path: “scripts/pre_oracle_install.sh”

config.vm.provision “oracle_install”, type: “shell”, path: “scripts/oracle_install.sh”

config.vm.provision “post_oracle_install”, type: “shell”, path: “scripts/post_oracle_install.sh”

config.vm.provision “bpm_install”, type: “shell”, path: “scripts/bpm_install.sh”, privileged: false

config.vm.provision “bpm_pre_config”, type: “shell”, path: “scripts/bpm_pre_config.sh”, privileged: false

config.vm.provision “bpm_config”, type: “shell”, path: “scripts/bpm_config.sh”, privileged: false

config.vm.provision “bpm_startup”, type: “shell”, path: “scripts/bpm_startup.sh”

end


To run:

vagrant up
vagrant provision –-provision-with initialize
vagrant reload
vagrant provision –-provision-with ems_install,ems_startup,pre_oracle_install,oracle_install
(wait for oracle install to complete)
vagrant provision –-provision-with post_oracle_install,bpm_studio_install,bpm_install,bpm_pre_config,bpm_config
vagrant provision –provision-with bpm_startup
vagrant provision –provision-with cleanup
vagrant provision –provision-with prepare_for_packaging

Advertisements

Config TIBCO EMS in silent mode

./tibemsadmin64 -server “tcp://localhost:7222” -user admin -password “” -script /vagrant/ems_install/ems_install/bpm_setup.scr

A sample script content:

delete queue >

delete topic >

create user bpmadm “bpm user” password=bpmadm

create queue AMX_SV.>

grant queue AMX_SV.> user=bpmadm create, delete, modify, send, receive

create topic EMSGMS.>

grant topic EMSGMS.> user=bpmadm create, modify, subscribe, publish

grant topic $sys.monitor.connection.* user=bpmadm subscribe

create queue com.tibco.amf.admin.deploymentServerQueue.>

grant admin user=bpmadm view-connection, view-server

grant queue com.tibco.amf.admin.deploymentServerQueue.> user=bpmadm create, delete, send, receive

create topic AMX_MGMT.>

grant topic AMX_MGMT.> user=bpmadm create, modify, subscribe, publish

create queue AMX_MGMT.>

grant queue AMX_MGMT.> user=bpmadm create, delete, modify, send, receive

create queue cl_logservice_queue.physical

create queue cl_payload_queue.physical

create queue amx.governance.stats

create queue amx.governance.internal.stats

grant queue cl_logservice_queue.physical user=bpmadm send, receive

grant queue cl_payload_queue.physical user=bpmadm send, receive

grant queue amx.governance.stats user=bpmadm send, receive

grant queue amx.governance.internal.stats user=bpmadm send, receive

create jndiname cl_logservice_queue queue cl_logservice_queue.physical

create jndiname cl_payload_queue queue cl_payload_queue.physical

commit

Install EMS (8.2.2) in silent mode

You need to install 32bit library support on 64bit centos
1. sudo yum install glibc.i686
2. Copy the TIBCOUniversalInstaller-ems.silent file and rename the file.
3. Using a text editor, open the copied file and update the install location and features to install.
4. Run the installer using this command line:
TIBCOUniversalInstaller -silent -V responseFile=”myfilename.silent”

If you are using the TIBCOUniversalInstaller-ems.silent file (rather than a copy), you need not supply the file name and can use this command line:
TIBCOUniversalInstaller -silent.

./TIBCOUniversalInstaller-lnx-x86.bin -silent -V responseFile=ems_install.silent

 

sample silent file content:

<?xml version=”1.0″?>
<!DOCTYPE properties SYSTEM “http://java.sun.com/dtd/properties.dtd”&gt;
<properties>
<comment>—Universal Installer Silent Installation Properties—</comment>

<!– Accept the license agreement –>
<entry key=”acceptLicense”>true</entry>

<!– The root installation directory –>
<!– If the product does not support multiple instances and TIBCO_HOME has already been set then –>
<!– this value is ignored and the existing TIBCO_HOME is used as the installation root. –>
<entry key=”installationRoot”>/opt/tibco</entry>

<!– If using an existing environment then the installationRoot AND environmentName MUST match a pre-existing environment. –>
<!– If creating a new environment then the installationRoot AND environmentName MUST BE UNIQUE and not match a pre-existing environment. –>
<entry key=”environmentName”>TIBCO-HOME</entry>
<!– This only needs to be used for the macos power platform. –>
<entry key=”environmentDesc”>my installation</entry>

<!– configDirectoryRoot – location of configuration files if it does not already exist –>
<entry key=”configDirectoryRoot”>/home/user/tibco</entry>

<!– The following configuration parameters control the download of Hibernate –>
<!– LGPLAssemblyLicenseAccepted – true or false to accept the license –>
<!– LGPLAssemblyDownload – true or false to download the assembly from the public TIBCO server –>
<!– LGPLAssemblyPath – if LGPLAssemblyDownload is false, this is the path where the Hibernate assembly is located on the system –>
<entry key=”LGPLAssemblyLicenseAccepted”>true</entry>
<entry key=”LGPLAssemblyDownload”>true</entry>
<entry key=”LGPLAssemblyPath”>/opt/tibco/thirdpartyDownload</entry>

<!–Product Feature Settings–>
<entry key=”feature_EMS Server Baseline_ems”>true</entry>
<entry key=”feature_Development Kit_ems”>true</entry>
<entry key=”feature_EMS Client Baseline_ems”>true</entry>
<entry key=”feature_EMS Source_ems”>true</entry>
<entry key=”feature_Hibernate (For Database Stores)_ems”>false</entry>

<!– Product-specific properties can be set below using the same ‘entry key=’ format as above. –>
<!– ONLY applicable for Windows platforms: –>
<!– manualRB – values can be true or false –>
<!– autoRB – values can be true or false –>
<!– Only one can be true, the default will be manual. –>
<entry key=”manualRB”>true</entry>
<entry key=”autoRB”>false</entry>
<entry key=”setUID”>false</entry>
<!– configFile – values can be the default value or a file that already exists –>
<!– If an invalid value is added, the default value will be used –>
<entry key=”configFile”>/home/user/tibco/cfgmgmt/ems/data/tibemsd.conf</entry>
</properties>

config EMS for preparation of BPM server configuration

In the Enterprise Message Service server console, set permissions for the Administrator servers.
In the following commands, replace username and password with the username and password values appropriate for each bus.

Messaging Bus
delete queue >

delete topic >

create user username “Description of the user” password=password

create queue AMX_SV.>

grant queue AMX_SV.> user=username create, delete, modify, send, receive

Notification Bus, which propagates status messages between Administrator, hosts, and nodes

create topic EMSGMS.>

grant topic EMSGMS.> user=username create, modify, subscribe, publish

grant topic $sys.monitor.connection.* user=username subscribe

grant admin user=username view-connection, view-server

create topic AMX_MGMT.>

grant topic AMX_MGMT.> user=username create, modify, subscribe, publish

create queue AMX_MGMT.>

grant queue AMX_MGMT.> user=username create, delete, modify, send, receive

Management Bus, which handles the internal Administrator queues, currently grouped with the Notification Bus

create queue com.tibco.amf.admin.deploymentServerQueue.>

grant queue com.tibco.amf.admin.deploymentServerQueue.> user=username create, delete, send, receive

Common Logging and Payload Bus

grant queue cl_logservice_queue.physical user=username send, receive

grant queue cl_payload_queue.physical user=username send, receive

Monitoring Bus

grant queue amx.governance.stats user=username send, receive

grant queue amx.governance.internal.stats user=username send, receive

ems auto start script

#!/bin/sh
# chkconfig: 345 98 10
# description: EMS auto start-stop script.
#
# Set TIBCO_HOME to the directory where the software is installed
#
# Set OWNER to the user id of into which EMS was installed

TIBCO_HOME=/opt/tibco/ems/8.2/
OWNER=bpmadm

if [ ! -f $TIBCO_HOME/bin/tibemsd64.sh ]
then
echo “EMS startup: cannot start”
exit
fi

case “$1” in
‘start’)
# Start EMS
# Remove “&” if you don’t want startup as a background process.
cd $TIBCO_HOME/bin
su $OWNER -c “./tibemsd64” &
touch /var/lock/subsys/ems
;;
‘stop’)
# Stop EMS
cd $TIBCO_HOME/bin
su $OWNER -c “./shutdown.sh”
rm -f /var/lock/subsys/ems
;;
esac

Create JMS resources in Tibco Studio

1. Connection Factory needs to be created in Tibco EMS. No jndi name is needed for connection factory. Just make sure the factory jndi name in BPM is the same as the connection factory name created in Tibco EMS.

2. Queue destination needs to be created in Tibco EMS. A jndi name must also be created in EMS admin. Make sure the queue jndi name is the same as the jndi name specified in BPM.

2. request and response can share the same connecition factory

create user, connection factory, queue, jndiname in Tibco EMS

Enable the EMS server to accept anonymous connections:
a. create user anonymous
b. commit

Create factories
a. GenericConnectionFactory is used by all applications except the sample for JMSTransactedOneWay, if not present create this factory using following command
create factory GenericConnectionFactory generic URL=tcp://7222
b. XAGenericConnectionFactory is used by sample jms.binding.helloworld.jmstransactedoneway.soa, if this factory is not present create by using command
create factory XAGenericConnectionFactory xageneric URL=tcp://7222

create queue queue.service.request.helloworld

Create JNDI names in the TIBCO Enterprise Message Service server corresponding to Queue names used in the resource templates:
a. create the JNDI using command: create jndiname queue.service.request.helloworld queue queue.service.request.helloworld
b. create the JNDI using command: create jndiname queue.service.reply.helloworld queue queue.service.reply.helloworld