Installing and Configuring WebSphere Message Broker
Note – This deployment example is designed for a single node cluster. It is provided simply as a concise guide to help you if you need to refer to an installation and configuration of WebSphere Message Broker.
This deployment example is not meant to be a precise guide to install and configure WebSphere Message Broker.
If you need to install WebSphere Message Broker in any other configuration, refer to the general purpose procedures elsewhere in this manual.
The instructions with this deployment example assumes that you are using the WebSphere Message Broker v6 Solaris x86–64 platform and will configure WebSphere Message Broker on a ZFS highly available local file system.
The cluster resource group has already be configured to failover between two zones on a single node cluster.
This deployment examples assumes that you have completed the Deployment Example: Installing WebSphere MQ in Zones from the Sun Cluster Data Service for WebSphere MQ Guide.
The tasks you must perform to install and configure WebSphere Message Broker in the zones are as follows:
-
Example: Prepare the Cluster for WebSphere Message Broker
- Example: Configure zones z1 and z2 for WebSphere Message Broker
- Example: Install WebSphere Message Broker in the zones
- Example: Verify WebSphere Message Broker
- Example: Configure Cluster Resources for WebSphere Message Broker
- Example: Enable the WebSphere Message Broker Software to Run in the Cluster
-
Example: Verify the Sun Cluster HA for WebSphere Message Broker Resource Group
Example: Prepare the Cluster for WebSphere Message Broker
Perform all steps within this example in the global zone.-
Install and configure the cluster as instructed in Sun Cluster Software Installation Guide for Solaris OS.
Install the following cluster software components.
-
Sun Cluster core software
-
Sun Cluster HA for WebSphere Message Broker data service
Note – This deployment example assumes that WebSphere MQ has been installed into zones z1 and z2 and that the Sun Cluster for WebSphere MQ data service has been installed and configured.
This deployment example further assumes that the Deployment Example: Installing WebSphere MQ in Zones, from the Sun Cluster Data Service for WebSphere MQ Guide, was used to create the resource group wmq1-rg and zones z1 and z2.
Within this deployment example a GDS resource is used to create and register a DB2 resource.
-
Sun Cluster core software
-
Install and configure a Zettabyte file system.
Create a ZFS pool.
Note – The following zpool definitions represent a very basic configuration for deployment on a single node cluster.
You should not consider this example for use within a productive deployment, instead it is a very basic configuration for testing or development purposes only.
Vigor5# zpool create -m /ZFSwmb1 HAZpool3 c1t5d0
Example: Configure zones z1 and z2 for WebSphere Message Broker
-
Import the ZFS pool into zone z1.
Perform this step in the global zone only.
Vigor5# zpool export -f HAZpool3 Vigor5# zpool import -R /zones/z1/root HAZpool3
-
Create some directories and a symbolic link for the WebSphere Message Broker and
DB2 software.
Perform this step in the global zone only.
Vigor5# zlogin z1 mkdir /ZFSwmb1/mqsiuser /ZFSwmb1/db2user /ZFSwmb1/mqsi Vig0r5# zlogin z1 touch /ZFSwmb1/mqsiuser/.profile Vig0r5# zlogin z1 touch /ZFSwmb1/db2user/.profile Vigor5# zlogin z1 mkdir /opt/mqsi Vigor5# zlogin z2 mkdir /opt/mqsi Vigor5# zlogin z1 ln -s /ZFSwmb1/mqsi /var/mqsi Vigor5# zlogin z2 ln -s /ZFSwmb1/mqsi /var/mqsi
-
Create the WebSphere Message Broker and DB2 userid in the zones.
Perform this step from the global zone and repeat for zone z2.
Vigor5# zlogin z1 # groupadd -g 2000 mqbrkrs # useradd -u 2000 -G mqm,mqbrkrs -d /ZFSwmb1/mqsiuser -s /usr/bin/ksh mqsiuser # groupadd -g 3000 dba # useradd -u 3000 -G dba -d /ZFSwmb1/db2user -s /usr/bin/ksh db2user # passwd mqsiuser New Password: mqsiuser Re-enter new Password: mqsiuser # passwd db2user New Password: db2user Re-enter new Password: db2user # exit
-
Setup file permissions in the ZFS pool.
Perform this step in zone z1 only.
Vigor5# zlogin z1 # cd /ZFSwmb1 # chown db2user:dba db2user # chown mqm:mqbrkrs mqsi # chown mqsiuser:mqbrkrs mqsiuser # exit
Example: Install WebSphere Message Broker in the zones
Caution – The steps within this procedure are not precise steps to install WebSphere Message Broker or DB2. Refer to the relevant IBM documentation for complete information.
-
Mount the WebSphere Message Broker software in the zones.
Perform this step in the global zone only.
In this example, the WebSphere Message Broker software and DB2 software has been copied to node Vigor5 in directories /export/software/ibm/wmbv6 and /export/software/ibm/db2v8.
Vigor5# zlogin z1 mkdir -p /var/tmp/software Vigor5# zlogin z2 mkdir -p /var/tmp/software Vigor5# mount -F lofs /export/software /zones/z1/root/var/tmp/software Vigor5# mount -F lofs /export/software /zones/z2/root/var/tmp/software
-
Install the DB2 software in zone z1.
Perform this step from the global zone for zone z1.
Vigor5# zlogin z1 # cat > /var/tmp/db2_response <<-eof eof="" install_type="TYPICAL" kbd="" lic_agreement="ACCEPT" prod="ENTERPRISE_SERVER_EDITION">-eof> # cd /var/tmp/software/ibm/db2v8 # ./db2setup -r /var/tmp/db2_response
# Check that kernel parameters are updated -> # chk_kernel_conf # Set the value of vars INSTHOME and INSTPGRP # and check their validity
# vi /opt/IBM/db2/V8.1/instance/db2iutil # exit
-
Install the WebSphere Message Broker software in zone z1.
Perform this step from the global zone for zone z1 which can be performed at the same time you are installing the DB2 software.
Vigor5# zlogin z1 # cat > /var/tmp/install.opt <<-eof -p="" -w="" brokerfeature.active="true" configmanagerfeature.active="true" eof="" installlocation="/opt/IBM/mqsi/6.0" kbd="" setuptypes.selectedsetuptypeid="typical" transformationservicesfeature.active="true" unsfeature.active="true">-eof> # cd /var/tmp/software/ibm/wmbv6/messagebroker_runtime1 # ./setupsolarisx86 -options /var/tmp/install.opt -silent # exit
-
Relocate the ZFS pool to zone z2.
Perform this step in the global zone.
Vigor5# zpool export -f HAZpool3 Vigor5# zpool import -R /zones/z2/root HAZpool3
-
Install the DB2 software in zone z2.
Perform this step from the global zone for zone z2.
Vigor5# zlogin z2 # cat > /var/tmp/db2_response <<-eof eof="" install_type="TYPICAL" kbd="" lic_agreement="ACCEPT" prod="ENTERPRISE_SERVER_EDITION">-eof> # cd /var/tmp/software/ibm/db2v8 # ./db2setup -r /var/tmp/db2_response
# Check that kernel parameters are updated -> # chk_kernel_conf # Set the value of vars INSTHOME and INSTPGRP # and check their validity
# vi /opt/IBM/db2/V8.1/instance/db2iutil # exit
-
Install the WebSphere Message Broker software in zone z2.
Perform this step from the global zone for zone z2 which can be performed at the same time you are installing the DB2 software.
Vigor5# zlogin z2 # cat > /var/tmp/install.opt <<-eof -p="" -w="" brokerfeature.active="true" configmanagerfeature.active="true" eof="" installlocation="/opt/IBM/mqsi/6.0" kbd="" setuptypes.selectedsetuptypeid="typical" transformationservicesfeature.active="true" unsfeature.active="true">-eof> # cd /var/tmp/software/ibm/wmbv6/messagebroker_runtime1 # ./setupsolarisx86 -options /var/tmp/install.opt -silent # exit
-
Relocate the ZFS pool back to zone z1.
Perform this step in the global zone.
Vigor5# zpool export -f HAZpool3 Vigor5# zpool import -R /zones/z1/root HAZpool3
Example: Verify WebSphere Message Broker
-
Create the Broker database.
Perform this step in the global zone for zone z1.
Vigor5# zlogin z1 # cd /opt/IBM/db2/V8.1/instance # ./db2icrt -u db2user db2user # su - db2user $ db2start $ db2 create database BROKERDB $ db2 connect to BROKERDB $ db2 bind ./sqllib/bnd/@db2cli.lst grant public CLIPKG 5 $ db2 update database configuration for BROKERDB using dbheap 900 $ chmod 644 /ZFSwmb1/db2user/sqllib/db2nodes.cfg $ cat > /ZFSwmb1/db2user/sqllib/db2nodes.cfg <<-eof 0="" db2user="" eof="" kbd="">-eof> $ chmod 444 /ZFSwmb1/db2user/sqllib/db2nodes.cfg $ exit
-
Update /etc/hosts with db2user on both zones.
Perform this step in zones z1 and z2.
# vi /etc/hosts
127.0.0.1 localhost loghost z1 db2user
-
Create the Broker, Configuration Manager and UserNameServer.
Perform this step in zone z1 only.
Note – The broker queue manager and broker database must be running before you perform this step.
Ensure that DB2 is started and resource group wmq1-rg is online on Vigor5:z1.
Deployment Example: Installing WebSphere MQ in Zones, from the Sun Cluster Data Service for WebSphere MQ Guide, was used to create the resource group wmq1-rg.
# cat > /ZFSwmb1/mqsiuser/.profile <<-eof .="" bin="" db2profile="" db2user="" eof="" kbd="" mqsi="" mqsiprofile="" opt="" sqllib="" wmb1="">-eof> # su - mqsiuser $ mqsicreatebroker brk \ > -i mqsiuser -a mqsiuser -q qmgr1 -n BROKERDB -u db2user -p db2user $ mqsicreateconfigmgr cmg \ > -i mqsiuser -a mqsiuser -q qmgr1 $ mqsicreateusernameserver \ > -i mqsiuser -a mqsiuser -q qmgr1 $ exit
-
Start the Broker, Configuration Manager and UserNameServer.
Perform this step in zone z1.
# su - mqsiuser $ mqsistart brk $ mqsistart cmg $ mqsistart UserNameServer
-
Verify that the Broker, Configuration Manager and UserNameServer
have been created and are running.
Perform this step in zone z1.
# su - mqsiuser $ mqsilist BIP8099I: ConfigMgr: cmg - qmgr1 BIP8099I: UserNameServer: UserNameServer - qmgr1 BIP8099I: Broker: brk - qmgr1 BIP8071I: Successful command completion. $ exit # ptree mqsiuser 2608 zsched 15573 bipservice brk 15574 bipbroker brk 15590 biphttplistener brk 15594 bipservice cmg 15595 bipconfigmgr cmg 15665 bipservice UserNameServer 15666 bipuns UserNameServer
-
Stop the Broker, Configuration Manager and
UserNameServer.
Perform this step in zone z1.
# su - mqsiuser $ mqsistop -i brk $ mqsistop -i cmg $ mqsistop -i UserNameServer $ exit
-
Stop the Broker database.
Perform this step in zone z1.
# su - db2user $ db2stop force $ exit # exit
-
Failover the WebSphere MQ resource group to
the other zone.
Perform this step in the global zone.
Vigor5# clrg switch -n Vigor5:z2 wmq1-rg
-
Relocate the ZFS pool to the other zone.
Perform this step in the global zone.
Vigor5# zpool export -f HAZpool3 Vigor5# zpool import -R /zones/z2/root HAZpool3
-
Setup /etc/services and
start the Broker database.
Perform this step in zone z2.
Note – The port list entries for db2user should be the same as those on zone z1.
Vigor5# z2 # cat >> /etc/services <<-eof 60000="" 60001="" 60002="" 60003="" db2_db2user="" db2_db2user_1="" db2_db2user_2="" db2_db2user_end="" eof="" kbd="" tcp="">-eof> # su - db2user $ db2start $ exit
-
Start the Broker, Configuration Manager and
UserNameServer.
Perform this step in zone z2.
# su - mqsiuser $ mqsistart brk $ mqsistart cmg $ mqsistart UserNameServer $ exit
-
Verify that the Broker, Configuration Manager and UserNameServer
are running.
Perform this step in zone z2.
# su - mqsiuser $ mqsilist BIP8099I: ConfigMgr: cmg - qmgr1 BIP8099I: UserNameServer: UserNameServer - qmgr1 BIP8099I: Broker: brk - qmgr1 BIP8071I: Successful command completion. $ exit # ptree mqsiuser 2614 zsched 6658 bipservice brk 6659 bipbroker brk 6681 biphttplistener brk 6674 bipservice cmg 6675 bipconfigmgr cmg 6691 bipservice UserNameServer 6692 bipuns UserNameServer
-
Stop the Broker, Configuration Manager and
UserNameServer.
Perform this step in zone z2.
# su - mqsiuser $ mqsistop -i brk $ mqsistop -i cmg $ mqsistop -i UserNameServer $ exit
-
Stop the Broker database.
Perform this step in zone z2.
# su - db2user $ db2stop force $ exit # exit
-
Export the ZFS pool.
Perform this step in the global zone.
Vigor5# zpool export -f HAZpool3
Example: Configure Cluster Resources for WebSphere Message Broker
Perform all steps within this example in the global zone.-
Create the HAStoragePlus resource
in the wmq1-rg resource group.
Vigor5# clresource create -g wmq1-rg -t SUNW.HAStoragePlus \ > -p Zpools=HAZpool3 wmq1-ZFSbrokerhas
Deployment Example: Installing WebSphere MQ in Zones, from the Sun Cluster Data Service for WebSphere MQ Guide, was used to create the wmq1-ZFShas resource..
Vigor5# clresource set -p Zpools=HAZpool1,HAZpool2,HAZpool3 wmq1-ZFShas
-
Enable the resource.
This step is only required is you created the wmq1-ZFSbrokerhas resource.
Vigor5# clresource enable wmq1-ZFSbrokerhas
Example: Enable the WebSphere Message Broker Software to Run in the Cluster
Perform all steps within this example in the global zone.-
Create and enable the DB2 cluster resource.
Note – At the time of writing this deployment example, an IBM DB2 agent for Sun Cluster 3.2 was not available. Instead to provide high availability for DB2 the following GDS resource was used.
Vigor5# z2 # cat > /ZFSwmb1/db2user/ha-db2probe <<-eof -="" -c="" -i="" -p="" -s="" 0="" db2gcf="" db2user="" if="" su=""> /dev/null then rc=0 else su - db2user -c "ipclean -a" rc=100 fi return ${rc} EOF-eof> # chmod 755 /ZFSwmb1/db2user/ha-db2probe # exit Vigor5# clresource create -g wmq1-rg -t SUNW.gds \ -p Start_command='/usr/bin/su - db2user -c "db2start"' \ -p Stop_command='/usr/bin/su - db2user -c "db2stop force"' \ -p Probe_command='/usr/bin/ksh /ZFSwmb1/db2user/ha-db2probe' \ -p Network_aware=false wmq1-db2 Vigor5# clresource enable wmq1-db2
-
Create the Broker configuration file.
Either cat the following into /var/tmp/brk_config or edit /opt/SUNWscmqi/sib/util/sib_config and execute /opt/SUNWscmqi/sib/util/sib_register.
Within this step HAS_RS=wmq1-ZFShas is specified, if you created resource wmq1-ZFSbrokerhas you must specify HAS_RS=wmq1-ZFSbrokerhas.
Vigor5# cat > /var/tmp/brk_config <<-eof broker="brk" has_rs="wmq1-ZFShas" lh="wmq1-lh" mqsi_id="mqsiuser" qmgr="qmgr1" qmgr_rs="wmq1-qmgr" rdbms_rs="" rg="wmq1-rg" rs="wmq1-brk" sc3_in="NONE" sc3_out="NONE" start_cmd="" stop_cmd="EOF</kbd">-eof>
-
Register and enable the Broker resource.
Vigor5# /opt/SUNWscmqi/sib/util/sib_register -f /var/tmp/brk_config Vigor5# clresource enable wmq1-brk
-
Create the Configuration Manager configuration
file.
Either cat the following into /var/tmp/cmg_config or edit /opt/SUNWscmqi/sib/util/sib_config and execute /opt/SUNWscmqi/sib/util/sib_register.
Within this step HAS_RS=wmq1-ZFShas is specified, if you created resource wmq1-ZFSbrokerhas you must specify HAS_RS=wmq1-ZFSbrokerhas.
Vigor5# cat > /var/tmp/cmg_config <<-eof broker="cmg" has_rs="wmq1-ZFShas" lh="wmq1-lh" mqsi_id="mqsiuser" qmgr="qmgr1" qmgr_rs="wmq1-qmgr" rdbms_rs="" rg="wmq1-rg" rs="wmq1-cmg" sc3_in="NONE" sc3_out="NONE" start_cmd="" stop_cmd="EOF</kbd">-eof>
-
Register and enable the Configuration Manager
resource.
Vigor5# /opt/SUNWscmqi/sib/util/sib_register -f /var/tmp/cmg_config Vigor5# clresource enable wmq1-cmg
-
Create the UserNameServer configuration file.
Either cat the following into /var/tmp/uns_config or edit /opt/SUNWscmqi/siu/util/siu_config and execute /opt/SUNWscmqi/siu/util/siu_register.
Within this step HAS_RS=wmq1-ZFShas is specified, if you created resource wmq1-ZFSbrokerhas you must specify HAS_RS=wmq1-ZFSbrokerhas.
Vigor5# cat > /var/tmp/uns_config <<-eof has_rs="wmq1-ZFShas" lh="wmq1-lh" mqsi_id="mqsiuser" qmgr="qmgr1" qmgr_rs="wmq1-qmgr" rg="wmq1-rg" rs="wmq1-uns" start_cmd="" stop_cmd="EOF</kbd">-eof>
-
Register and enable the UserNameServer resource.
Vigor5# /opt/SUNWscmqi/siu/util/siu_register -f /var/tmp/uns_config Vigor5# clresource enable wmq1-uns
Example: Verify the Sun Cluster HA for WebSphere Message Broker Resource Group
Perform this step in the global zone.Switch the WebSphere MQ resource group between the two zones.
Vigor5# for node in Vigor5:z2 Vigor5:z1 do clrg switch -n $node wmq1-rg clrs status wmq1-brk clrs status wmq1-cmg clrs status wmq1-uns clrg status wmq1-rg done
Comments
Post a Comment