Sun Java System Web Server 7.0 Update 4 Administrator's Guide

ProcedureTo Configure the Cluster

Before You Begin

Identify the following machines:

  1. Install Administration Server on MachineA.

    See To Set Up a Server Farm for information on installing an administration server. The typical installation process will also install a web server instance. For this scenario, we will not be using that instance.

  2. Install the Administration Node on MachineB, MachineC, MachineD and MachineE.

    Install the administration node on all four machines. Register the administration nodes with the administration server.

  3. Configure the Web Application.

    Enable session replication for the web application. Modify the WEb-INF/sun-web.xml file as follows:

    <session-manager persistence-type="replicated"/>
  4. Configure the Instances.

    • Launch wadm.

      wadm --host MachineA --port 8089
    • Create a new configuration for the load balancer.

      wadm> create-config --http-port=8080 --server-name=SampleCluster lb
    • Set up the reverse proxy (Load balancer).

      wadm> create-reverse-proxy --config=lb --vs=lb 
      -uri-prefix=/ --server="http://MachineB:8080,http://MachineC:8080,
    • Create an instance.

      wadm> create-instance --config=lb MachineA
    • Deploy the Configuration.

      wadm> deploy-config lb
      wadm> start-instance --config=lb
  5. Create and Start the Cluster.

    Create a new Configuration with four instances.

    • Create a new configuration for the cluster.

      wadm> create-config --http-port=8080 --server-name=SampleCluster clusterOf4
    • Enable Session Replication.

      wadm> set-session-replication-prop --config=clusterOf4 enabled=true
    • Add the web application.

      wadm> add-webapp --config=clusterOf4 --uri=/simple webapps-simple.war
    • Create the instances.

      wadm> create-instance --config=clusterOf4 MachineB MachineC MachineD MachineE
    • Start the cluster.

      wadm> start-instance --config=clusterOf4

      Note –

      If the host name is not specified for the start-instance command, this action will start instances on all the nodes where the configuration is deployed.