Quick Start with Sailfin Clustering

You are at the right place if you are looking to quickly create a sailfin cluster and test it. This blog also has links to some helpful documentation and useful blogs around sailfin and glassfish.
Lets get started then...

Get Sailfin Installed and get it ready for Clustering (taken from sailfin instructions):
Download the Build from here
Set JAVA_HOME environment variable
java -Xmx256m -jar <sailfin-installer-file>.jar
cd sailfin
chmod -R +x lib/ant/bin
lib/ant/bin/ant -f setup-cluster.xml

Creating a SailFin Cluster

Decisions:
1. How many machines will be involved in the setup ?
2. Which machine will host the domain and which machines will host instances ?

What do the below steps create: 2 machine setup (cluster with 2 instances, one on each machine)
Machine 1: Domain, 1 Node-Agent, 1 instance
Machine 2: 1 Node-Agent, 1 instance

Note:
a. Names for the domain, node-agents, cluster and instances can of-course be changed to your liking
b. Unless specified all the below commands are to be executed on Machine 1.
c. Each machine that hosts an instance must have a node-agent created on it.

Steps:
export PATH=<sailfin-install-location>/bin:$PATH
asadmin create-domain --user admin --adminport 4848 my-domain [enter a adminpassword, accept defaults for the master password]
asadmin start-domain my-domain
asadmin create-node-agent --host <hostname-domain-machine> agent1
asadmin create-node-agent --host <hostname-domain-machine> agent2 (to be executed on Machine 2)
asadmin start-node-agent agent1
asadmin start-node-agent agent2 (to be executed on Machine 2)
asadmin create-cluster my-cluster
asadmin create-instance --node-agent agent1 --cluster my-cluster instance1
asadmin create-instance --node-agent agent2 --cluster my-cluster instance2
asadmin create-converged-lb --autocommit=true --configfile my-lb.xml --target my-cluster my-lb
asadmin start-cluster my-cluster
asadmin deploy --target st-cluster <path-to-your-app>

If you intend to use a single machine for the setup, you only need to create one node-agent and all instances created on that machine need to be associated with that node-agent.


The above steps create a ready-to-use Sailfin Cluster with 2 instances that also sports the Converged Load Balancer functionality. Go ahead, deploy your apps on Sailfin or write your own simple sip app or start with our samples, try SIP (default instance-sip-service port is 35060) and HTTP (default instance-http-service port is 38080) traffic and let us know how it goes....

Other Useful Documentation:
Sailfin Docs Home Page
Clustering in Glassfish 1(from Tech Article and Tips)
Clustering in Glassfish 2 (from Glassfish Community pages)


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Sailfin, Glassfish and more....

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today