Hi Legolas,
Let me try to explain:
Domain Spans machines, usually.
One of the machines is designated as DAS, as Pankaj pointed out earlier.
The DAS is the admin server and it manages the servers in the same
domain. The servers can be clustered if administrator wants them so.
The administrator has benefits of management when instances are clustered.
Now, on the other machine, all you need is "bits".
Consider the scenario: You have "m1" and "m2" as two machines. Let's
say you want to create a cluster "c1" with instances "s1" and "s2"
with node-agents "na1" on "m1" and "na2" on "m2". Your DAS is on "m1".
Let's call the domain where all this "logically" resides as "domain1".
You do the following:
1- Download the glassfish.jar on both "m1" and "m2".
2- On "m1", run "ant -f setup-cluster.xml". This creates the domain,
domain1 that is capable of handling clusters.
3- On "m1", you start domain, domain1.
4- On "m1", <bin>/asadmin create-node-agent na1
5- On "m2", run ant -f setup-cluster.xml on glassfish.jar you downloaded
(after of course, java -jar ...) This creates a domain on that machine
as well, but you don't need it. I will file an RFE in this regard.
6- On "m2" you create a node-agent *pointing to domain1 on "m1"* as:
<bin>/asadmin create-node-agent --host m1 --user admin-user na2
7- On "m1", <bin>/asadmin start-node-agent na1
On "m2", <bin>/asadmin start-node-agent na2
Now, your topology is created and ready to go.
You have a domain domain1, this spans "m1" and "m2".
Node-agent "na1" is on "m1". It will control instances on "m1".
Node-agent "na2" is on "m2". It will control instances on "m2".
From this point on, forget you had machine "m2". The entire
configuration can be done just from machine "m1".
This is the beauty of the process, IMO.
8- On "m1", just try: <bin>/asadmin create-cluster c1
9- On "m1", <bin>/asadmin create-instance --cluster c1 --nodeagent na1 s1
This puts "s1" in cluster "c1". Note that this instance is controlled by
Node Agent "na1". This instance uses "physical resources" from "m1".
10- On "m1", (not "m2"!)
<bin>/asadmin create-instance --cluster c1 --nodeagent na2 s2
11- On "m1", <bin>/asadmin start-cluster "c1".
This is where it culminates.
All you do is "start cluster".
It starts instance "s1" on "m1" and "s2" on "m2".
The instances have homogeneous configuration.
Does this help?
Regards,
Kedar
Legolas Woodland wrote:
> Thank you for reply.
> just as last question:
>
> As i said i have DAS installed and configuredin my own computer
> i want to install some more glassfish in other computer and add them
> to cluster.
>
> question is:
>
> Should i install glassfish clustered edition on other computers that
> will act as nodes?
> ant -f setup-cluster.xml
>
> Thankss
>
> On 4/17/07, *Pankaj Jairath* <Pankaj.Jairath_at_sun.com
> <mailto:Pankaj.Jairath_at_sun.com>> wrote:
>
> Legolas Woodland wrote:
>
> > Thank you very much for reply.
> >
> > Right now i think i have setup a cluster and a load balancer
> according
> > to your very good weblog.
> > I have sun java web server 7.u1 and latest blassfish installed.
> > What i want to know is:
> > I have one DAS, And a web server which according to your weblog will
> > balance the load between any instance that we add in
> loadbalancer.xml .
> >
> > I have two questions and one problem.
> >
> > problem:
> > I tried several time to create load balancer in glassfish
> application
> > server and then apply it to my web server, but it just return an
> error
> > without any stack trance, error say: Can not connect to server.
> > My web server and glassfish both works on the same machine, so i
> > tried: 127.0.0.1 <http://127.0.0.1> < http://127.0.0.1>,
> localhost and my lan ip address
> > none of them worked.
> > the port that i can access my web server administration console is
> > 8989 and i used this port in HTTP Load Balancers node of glassfish
> > administration console when i trid to create the load balancer.
>
> The communication between DAS and WS/LB is over SSL and the host/port
> needs to be HTTPS listener of the WebServer Instance and not that
> of the
> Admin Server (the Load Balancer is configured to run on the WebServer
> instance). Given that you have successfully configured the SSL setup
> between the DAS and WS/LB, check with changing the port to the SSL
> port
> of the WebServer 7.0 instance.
>
> >
> > IS there anything specific to change in order to make it possible to
> > apply changes to web server load balancer from glassfish console?
> >
> > Now my question:
> >
> > -what kind of glassfish i should setup in some other machines to add
> > them to the cluster? can they be normal domains or there are some
> > specific ways to create domains to add them to cluster?
> > can you give me the steps?
> >
>
> You can create multiple server instances and group them under a
> defined
> cluster configuration. The cluster or the group of clustered server
> instances are under a single domain. Domain is the administrative
> reference - the single point / central repository of carrying out the
> administrative tasks.
>
> You can refer to the documentation that details the setups to work
> with
> clusters. This is from the /"High Availability Administration Guide"/
> under chapter 5 : /"Using Application Server Clusters" /:-
> http://docs.sun.com/app/docs/doc/819-3679/6n5spoggp?a=view
>
> Specifically refer to the topic named - /"Working with Clusters"./
>
> > -I find that we can have several instance in a server? what is
> > relation of domains with instances? why we should have several
> > instance in a domain?
>
> There can be zero or more server instances in a administrative domain
> and there can one or more such domains. Each such domain has its own
> DAS. DAS is actually the designated administrative server instance
> with
> a default config within a domain.
>
> regards
> Pankaj
>
> >
> >
> >
> > Thanks.
> >
> >
> >
> >
> >
> >
> > On 4/17/07, *Pankaj Jairath* <Pankaj.Jairath_at_sun.com
> <mailto:Pankaj.Jairath_at_sun.com>
> > <mailto: Pankaj.Jairath_at_sun.com
> <mailto:Pankaj.Jairath_at_sun.com>>> wrote:
> >
> > Hello Legolas,
> >
> > If I understood your question, you are referring to the UI
> element
> > "HTTP
> > Load Balancers" element of the GlassFish V2 Application
> Server. If so
> > let me give a brief.
> >
> > GlassFish V2 provides the HTTP Load Balancer which can then be
> > deployed
> > onto the supported WebServer - for GlassFish V2 it's the Sun
> Java
> > System
> > WebServer 6.1 / 7.0. When defining the High Availability
> deployment
> > topology of a Java EE deployment, administrator would define a
> > cluster
> > of application servers instances and install and configure the
> > HTTP Load
> > Balancer to take care of load balancing and failover of the HTTP
> > requests.
> > To do this administrative configuration steps, the end-user can
> > use the
> > Admin Console (GUI) or the CLI commands to define the
> cluster, it's
> > configuration and associate a HTTP Load Balancer with this
> > configuration. This association defines the cluster
> configuration and
> > other Load Balancer configurable parameters, which the HTTP Load
> > Balancer uses to perform its HA functionality. The administrator
> > can use
> > the Admin Console to generate this HTTP Load Balancer
> > configuration and
> > even push the configuration over the wire to the deployed
> HTTP Load
> > Balancer on a given Sun Java System WebServer.
> >
> > Refer to the documents provided earlier for further details
> on how to
> > use the Domain Administrative Server (DAS) Admin Console
> (GUI) or
> > CLI to
> > administer the HTTP Load Balancer.
> >
> > regards
> > Pankaj
> >
> > legolas wood wrote:
> >
> > > Hi
> > > Thank you for reading my post.
> > > What is relation of "HTTP Load Balancers" in administration
> > console
> > > with using sun java web server as load balancer?
> > >
> > > Thanks
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> users-unsubscribe_at_glassfish.dev.java.net
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> > <mailto:users-unsubscribe_at_glassfish.dev.java.net
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>>
> > > For additional commands, e-mail:
> > users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>
> > <mailto:users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>>
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe_at_glassfish.dev.java.net
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> > <mailto:users-unsubscribe_at_glassfish.dev.java.net
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>>
> > For additional commands, e-mail:
> users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>
> > <mailto:users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>>
> >
> >
>
>