Kannel Setup for Solaris Cluster 3.2 Software With the Solaris 10 OSMohamad Mortada, August 2007 The setup and configuration presented in this article is for the Kannel gateway software version 1.4.0 under
Solaris Cluster 3.2 (formerly Sun Cluster) software, running on the Solaris 10 Operating System for SPARC platforms. The article
assumes that the Solaris Cluster software has been successfully installed and configured over two nodes ( The significance of the Kannel setup under a clustered platform is that a cluster usually provides a virtual IP address for client connections that is transparent as far as which node is actually serving the connections. But the Kannel setup initiated here provides a virtual IP address for connection with the SMSC regardless of which cluster node is currently handling the Kannel processes. The following steps illustrate in detail the required commands for installing and setting up the Kannel gateway in failover mode under the Solaris Cluster 3.2 software. 1. This step assumes there is already a logical volume created on the shared storage and it is ready to be deployed for the Kannel installation.
From any cluster node, create a new disk set called # metaset -s kands -a -h dwh01 dwh02 # metaset -s kands -a -m dwh01 dwh02 # metaset -s kands -a /dev/rdsk/c6t600A0B800029E568000007E7468B3AF1d0 # metastat -s kands # metainit -s kands d37 1 1 c6t600A0B800029E568000007E7468B3AF1d0s0 # newfs /dev/md/kands/rdsk/d37 2. On each cluster node, edit the # vi /etc/vfstab /dev/md/kands/dsk/d37 /dev/md/kands/rdsk/d37 /global/kannel ufs 2 yes global # mkdir /global/kannel # vi /etc/hosts 192.168.1.62 kan-lh 3. From any cluster node, mount the newly created file system under the # mount /global/kannel 4. From any cluster node, configure the new cluster resources for the Kannel software by creating a new resource group called
# clrt register SUNW.gds SUNW.HAStoragePlus # clrg create -n dwh01,dwh02 RG-KAN # clrslh create -g RG-KAN kan-lh # clrs create -g RG-KAN -t SUNW.HAStoragePlus -p AffinityOn=TRUE \ -p FilesystemMountPoints=/global/kannel RS-KAN-HAS # clrg online -M RG-KAN 5. Download the Kannel software package 6. Download and install the # vi /.profile PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/openwin/bin: /usr/dt/bin:/opt/sun/bin:/usr/cluster/bin: /usr/cluster/lib/sc:/opt/SUNWexplo/bin:/opt/SUNWsneep/bin: /opt/rsc/bin:/usr/ccs/bin LD_LIBRARY_PATH=/usr/openwin/lib:/usr/openwin/lib:/usr/local/lib export PATH LD_LIBRARY_PATH # . /.profile 7. From any node, install and configure the Kannel software by executing the following process: # cd /global/kannel # gzip -d gateway-1.4.0.tar.gz | tar xvf - # cd /global/kannel/gateway-1.4.0 # CFLAGS="-DSunOS=1" ./configure --disable-ssl # /usr/local/bin/make # mkdir /global/kannel/bin /global/kannel/logs # /usr/local/bin/make bindir=/global/kannel/bin install # cd gw # cp -p smskannel.conf smskannel.orig # vi smskannel.conf group = core admin-port = 13000 smsbox-port = 13001 admin-password = <Dumb-bugger> admin-deny-ip = "*.*.*.*" admin-allow-ip = "127.0.0.1;192.168.*.*" log-file = <"/global/kannel/logs/kannel.log"> log-level = 0 box-deny-ip = "*.*.*.*" box-allow-ip = "127.0.0.1;192.168.*.*" access-log = <"/global/kannel/logs/access.log"> group = smsbox bearerbox-host = <kan-lh> sendsms-port = 13013 sendsms-chars = "0123456789 " log-level = 0 mo-recode=true access-log = <"/global/kannel/logs/access.log"> group = sendsms-user username = <test> password = <test> user-allow-ip = "127.0.0.1;192.168.*.*" max-messages = 10 group = smsc smsc = <smpp> smsc-id = "IN_CONN" host = <192.168.100.30> port = 2775 transceiver-mode = true receive-port = 0 system-type = "ESME" my-number = "1155" validityperiod = 8 smsc-username = <john> smsc-password = <mypassword> keepalive = 25 interface-version = 34 source-addr-ton = 5 source-addr-npi = 0 source-addr-autodetect = yes dest-addr-ton = 1 dest-addr-npi = 1 address-range = "" enquire-link-interval = 60 max-pending-submits = 10 reconnect-delay = 10 priority = 0 alt-charset= UCS2 our-host= <kan-lh> 8. From any node, create the startup, stop, and probe scripts for both # vi /global/kannel/bin/start_bearer #!/bin/ksh . /.profile rm /global/kannel/bin/pid1 /global/kannel/gateway-1.4.0/gw/bearerbox \ -p /global/kannel/bin/pid1 \ /global/kannel/gateway-1.4.0/gw/smskannel.conf # vi /global/kannel/bin/start_sms #!/bin/ksh . /.profile rm /global/kannel/bin/pid2 /global/kannel/gateway-1.4.0/gw/smsbox \ -p /global/kannel/bin/pid2 \ /global/kannel/gateway-1.4.0/gw/smskannel.conf # vi /global/kannel/bin/stop_bearer #!/bin/ksh if [ -f /global/kannel/bin/pid1 ]; then rm /global/kannel/bin/pid1 fi # vi /global/kannel/bin/stop_sms #!/bin/ksh pid_sms=/global/kannel/bin/pid2 if [ -f $pid_sms ]; then rm /global/kannel/bin/pid2 fi # vi /global/kannel/bin/probe_bearer #!/bin/ksh pid_bearer=/global/kannel/bin/pid1 if [ -f $pid_bearer ]; then exit 0 else exit 100 fi # vi /global/kannel/bin/probe_sms #!/bin/ksh pid_sms=/global/kannel/bin/pid2 if [ -f $pid_sms ]; then exit 0 else exit 100 fi 9. After successful installation and configuration of the Kannel gateway, create the # clrs create -g RG-KAN -t SUNW.gds \ -p Resource_dependencies=RS-KAN-HAS \ -p Scalable=false \ -p Start_command="/global/kannel/bin/start_bearer" \ -p Stop_command="/global/kannel/bin/stop_bearer" \ -p Probe_command="/global/kannel/bin/probe_bearer" \ -p Port_list="2775/tcp" \ -p Network_resources_used=kan-lh \ -p Network_aware=true RS-BEAR 10. Also from any node, proceed to create the # clrs create -g RG-KAN -t SUNW.gds \ -p Scalable=false \ -p Resource_dependencies=RS-BEAR \ -p Start_command="/global/kannel/bin/start_sms" \ -p Stop_command="/global/kannel/bin/stop_sms" \ -p Probe_command="/global/kannel/bin/probe_sms" \ -p Port_list="13013/tcp" \ -p Network_resources_used=kan-lh \ -p Network_aware=true RS-SMS 11. Finally, verify and test the newly created Kannel failover services by looking at the resources status and trying to switch the resources from one node to another: # clrs status # clrg switch -n dwh02 RG-KAN # clrs status That is all. Now your SMS gateway should be highly available.
Discuss and comment on this resource in the BigAdmin Wiki
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License. |
| |||||||