Professional Documents
Culture Documents
0: an open source
HA-enabling framework for mission
critical systems
COMPLETE TUTORIAL
RAJAN SHARMA
An open source project under Louisiana Tech research foundation copyright and a GNU public license
Contents
1. Introduction to HAOSCAR 2.0
2. Step by step Installation of HAOSCAR 2.0
3. Configuring HAOSCAR 2.0
4. Trouble Shooting HAOSCAR 2.0
Primary server
Standby server
Switches
Multiple clients
Primary Server
Monitors primary server and takes over in the event a failure is detected.
Cluster(optional)
IP Monitoring(Heartbeat)
Service Monitoring(MONIT)
Project Management
http://hpci.latech.edu/blog/?page_id=64
HAOSCAR API
New addition in which developers and administrators can extend the functionality of
HA-OSCAR using provided hooks
Allows creating event notification services and powerful rule based systems
Can be used to determine the state of the monitored services
Web Applications
Hardware/software failure
Power issues
Routine maintenance
Cybertools Petashare
Petashare storage is used for sharing data across the networks and
can be HA enabled with HAOSCAR.
Pre-Installation Configuration
Services
/etc/fstab
/etc/hosts
Network Interfaces
Service Configuration
/etc/fstab
Replace all UUIDs with the full path of the device file
Before:
After:
/etc/hosts
Replace 127.0.1.1 of the host name with the static IP
for the Primary node
Before:
After:
auto NIC
iface NIC inet static
address IP
netmask MASK
After:
auto NIC
iface NIC inet static
address IP
netmask
After:
Run Command
sudo haoscar_configure
Primary Server
Node Redundancy
Service Redundancy
HATCI Architecture
Node Redundancy
Heartbeat Configuration
Service Redundancy
Monit Configuration
Data Replication
Rsync Configuration
System Cloning
Same as the process for setting up the static IPs for the
primary server though the last number should be
different
Authenticating ssh keys
Done from the primary server
ssh-keygen (The passphrase must be left empty.)
ssh-copy-id -i ~/.ssh/id_rsa.pub Secondary_Server
mv /etc/dhcp3/dhcpd.conf.bak.1
/etc/dhcp3/dhcpd.conf
service dhcp3-server restart
mv /etc/dhcpd.conf.bak.1 /etc/dhcpd.conf
/etc/init.d/dhcpd restart
Optional Customization
HAOSCAR 2.0 can be configured according to the need of
application by user. These are some of the configuration
that can be done to HAOSCAR 2.0
Monit Configuration
Debian: /etc/monit/monitrc
set daemon SECONDSS
set httpd port PORT and use address localhost
allow localhost
allow USER:PASSWORD
http://mmonit.com/wiki/Monit/ConfigurationExamples
Proof of Case 1
This is the
monit status
report for
postfix mail
server when
we run the
command
monit status
Proof of Case 2
Proof of Case 3
This is the
monit status
report for
Apache web
server when
we run the
command
monit status
SSHD
Proof of Case 4
This is the
monit status
report for
SSHD when
we run the
command
monit status
In /etc/ha.d/ha.cf
logfile /var/log/haoscar/heartbeat.log
udpport 694
keepalive 2
deadtime 30
Initdead 120
bcast eth0
In /etc/ha.d/haresources:
/etc/init.d/ha-oscar-filemon
start-stop-daemon --start --pidfile $PID_FILE --background
--make-pidfile --exec $DAEMON -- --recursive --period
SECONDS --primary=$PRIMARY
--secondary=$SECONDARY $watch_dirs
Trouble Shooting
Problem
Possible Solution
Unmount .gvfs