Failover capability

From UFP-UV Sakai Wiki

Jump to: navigation, search

Contents


Clustering

UFPUV clustering details:

Changes required on current implementation:

  • Better separation of sakai.properties and local.properties
  • Sakai modules configuration:
    • Content hosting -> edit sakai.properties
    • Search module -> edit sakai.properties
    • JForum tool -> probably not needed
    • Melete tool -> probably not needed
    • Samigo -> probably not needed
    • james -> edit sakai.properties, edit iptables cfg, re-deploy james
  • System configuration:
    • Tomcat server.xml: different AJP1.3 ports
    • Apache mod_jk
    • better tomcat startup scripts
    • iptables (mail)

Useful resources:

Configuration

Tomcat server.xml

Parameter Tomcat 1 Tomcat 2
Instance Type Cluster instance 1 Cluster instance 2
Server port 8005 9005
Server id elearning elearning-b
Non-SSL HTTP/1.1 Connector 8080 9080
AJP 1.3 Connector 8009 9009

Apache mod_jk jk.conf

Replace all current worker name with loadbalancer Example:

JkMount /* loadbalancer

Apache mod_jk workers.properties

Replace entries below:

#
#------ DEFAULT worket list ------------------------------------------
worker.list=loadbalancer,status
 
#------ sakaidbg-a WORKER DEFINITION ------------------------------
worker.sakaidbg-a.port=8009
worker.sakaidbg-a.host=localhost
worker.sakaidbg-a.type=ajp13
worker.sakaidbg-a.lbfactor=1
 
#------ sakaidbg-b WORKER DEFINITION ------------------------------
worker.sakaidbg-b.port=9009
worker.sakaidbg-b.host=localhost
worker.sakaidbg-b.type=ajp13
worker.sakaidbg-b.lbfactor=1
 
#------ DEFAULT LOAD BALANCER WORKER DEFINITION ----------------------
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=sakaidbg-a,sakaidbg-b
worker.loadbalancer.sticky_session=1

Search

sakai.properties

search.experimental = true
# Below, to save segments on file system instead of db
#sharedSegments@org.sakaiproject.search.api.SearchService.SegmentStore=searchsegments/ 

James

local.properties

Parameter Tomcat 1 Tomcat 2
smtp.port 8025 9025
smtp.enabled true true

WARNING: On deploy, James edits webapps/sakai-mailarchive-james/apps/james/SAR-INF/config.xml to match configured smtp port. James MUST BE re-deployed to apply smtp port changes!!!

iptables

To list:

iptables -L PREROUTING -t nat -v

To add:

iptables -t nat -A PREROUTING -p tcp --dport 25 -i vlan2 -j REDIRECT --to-port 8025
iptables -t nat -A PREROUTING -p tcp --dport 25 -i vlan4 -j REDIRECT --to-port 8025
iptables -t nat -A PREROUTING -p tcp --dport 25 -i vlan5 -j REDIRECT --to-port 8025
iptables -t nat -A PREROUTING -p tcp --dport 25 -i eth0 -j REDIRECT --to-port 8025
/etc/init.d/iptables save

To replace (change destination port: 8025/9025):

# replace
iptables -t nat -R PREROUTING 1 -p tcp --dport 25 -i vlan2 -j REDIRECT --to-port 9025
iptables -t nat -R PREROUTING 2 -p tcp --dport 25 -i vlan4 -j REDIRECT --to-port 9025
iptables -t nat -R PREROUTING 3 -p tcp --dport 25 -i vlan5 -j REDIRECT --to-port 9025
iptables -t nat -R PREROUTING 4 -p tcp --dport 25 -i eth0 -j REDIRECT --to-port 9025
/etc/init.d/iptables save

Migration steps

Follow instructions in Migration Plan: upgrade to cluster (2 tomcats in 1 server)

Back up

Please read Backup procedures.

Personal tools