The cluster deployment scenario described in this section includes the following components:
Software or hardware load balancer. For example, the Big-IP load balancer
Application Server 9.1 or Sun GlassFish 2.1 cluster named agents30 with these components:
Domain Administration Server (DAS) on Host A
Remote Node Agent on Host B with two Application Server 9.1 or Sun GlassFish 2.1 instances
Setting up the cluster is outside the scope of this guide. For information, see the following documentation:
Sun GlassFish Enterprise Server 2.1:
Sun GlassFish Portfolio: http://www.sun.com/software/products/glassfish_portfolio/index.jsp
Sun documentation collection: http://docs.sun.com/coll/1343.6
Sun Java System Application Server 9.1: http://docs.sun.com/coll/1343.5
Several considerations for the cluster are:
Because the cluster profile sets the admin port as non-SSL, set AS_ADMIN_SECURE=false in the config/asadminenv.conf file.
After the cluster is setup, you are ready to install the agents. This section uses agents30 as the cluster name with the corresponding 'agents30-config' node in the domain.xml file (or agents30-config from the console) This configuration name is key information that you will need to configure the Application Server and GlassFish agent.
To verify the cluster setup, access the clusterjsp sample application using the load balancer URL. For example:
http://is-lb-2.example.com:38181/clusterjsp
To create a password file:
P_FILE=/tmp/.gfpass echo 'AS_ADMIN_ADMINPASSWORD=password' > $P_FILE echo 'AS_ADMIN_PASSWORD=password'' >> $P_FILE echo 'AS_ADMIN_MASTERPASSWORD=password'' >> $P_FILE
To create a cluster using the following names:
Cluster name: agents30
Domain name: telco
Instance names: sales and eng
INSTALL_DIR/bin/asadmin create-domain --adminport 34848 --user admin --passwordfile $P_FILE --interactive=false --profile cluster telco INSTALL_DIR/bin/asadmin start-domain --user admin --passwordfile $P_FILE telco INSTALL_DIR/bin/asadmin create-node-agent --user admin --port 34848 --interactive=false --passwordfile $P_FILE telco-nodeagent INSTALL_DIR/bin/asadmin create-cluster --port 34848 agents30 INSTALL_DIR/bin/asadmin create-instance --port 34848 --nodeagent telco-nodeagent --systemproperties HTTP_LISTENER_PORT=38080 --cluster agents30 sales INSTALL_DIR/bin/asadmin create-instance --port 34848 --nodeagent telco-nodeagent --systemproperties HTTP_LISTENER_PORT=38081 --cluster agents30 eng INSTALL_DIR/bin/asadmin start-node-agent --user admin --interactive=false --passwordfile $P_FILE telco-nodeagent INSTALL_DIR/bin/asadmin deploy --target agents30 --port 34848 - -availabilityenabled=true samples/quickstart/clusterjsp/clusterjsp.ear INSTALL_DIR/bin/asadmin start-cluster --port 34848 --interactive=false --passwordfile $P_FILE agents30
To start and stop a cluster:
asadmin stop-cluster --port 34848 agents30 asadmin stop-node-agent asadmin stop-domain telco asadmin start-domain telco asadmin start-node-agent --syncinstances=true asadmin start-cluster agents30