Creating and Deploying to WebLogic Server Clusters

Tutorial 1: Creating a WebLogic Server Cluster

In this tutorial you use the WebLogic Server Configuration Wizard to create the domain, servers, and cluster in which you will deploy and run the MedRec applications. The new domain, medrecdomain, contains a single Administration Server and a cluster of three Managed Servers.

The tutorial includes the following sections:

- Prerequisites

- Procedure

- Best Practices

- The Big Picture

- Related Reading

Prerequisites

Before starting this tutorial, make sure WebLogic Server and the server samples are installed on your computer.

Procedure

To create the domains server instances, and clusters:

1. Start the Configuration Wizard on your system by selecting the Start Menu option:

   Start—>Programs—>BEA WebLogic Platform 8.1—>Configuration Wizard

2. On the initial screen, select Create a new WebLogic configuration.

3. On the Select a Configuration Template screen, select the Basic WebLogic Server Domain template.

   Note: Do not select the Avitek Medical Records Sample Domain template, as the tutorial does not make use of its functionality.

4. On the Choose Express or Custom Configuration screen, select Custom and click Next..

5. On the Configure the Administration Server screen:

   - Enter medrecadmin in the Name field.

   - Enter 127.0.0.1 in the ListenAddress field.

   - Enter 7001 in the Listen Port field.

   - Click Next..

6. On the Managed Servers, Clusters, and Machines Options screen, select Yes and click Next to continue..

7. On the Configure Managed Servers screen, click Add and:

   - Enter MedRec1 in the Name field.

   - Enter 127.0.0.1 in the ListenAddress field.

   - Enter 8001 in the ListenPort field.

   - Repeat this step to add two additional servers with the following field entries:

     Name | ListenAddress | ListenPort
     --- | --- | ---
     MedRec2 | 127.0.0.1 | 8011
     MedRec3 | 127.0.0.1 | 8021

   - Click Next to continue.

8. On the Configure Clusters screen, click Add and:

   - Enter MedRecCluster in the Name field.

   - Enter 237.0.0.101 in the MulticastAddress field

   - Enter 8050 in the Multicast Port field.

   - Click Next to continue.

9. In the Assign Servers to Clusters screen:

   - Select all three servers in the Source list.

   - Click the arrow button to place the servers in the Target list.

   - Click Next to continue.

10. On the Configure Machines screen, click Next without adding any machines.

11. On the Database (JDBC) Options screen, click Next.

12. On the Messaging (JMS) Options screen, click Next.

13. On the Configure Administrative Username and Password screen:

    - Enter weblogic in the Name field.

    - Enter weblogic in the Password field.

    - Enter weblogic in the Confirm User Password field.

    - Click Next to continue.

14. On the Configure Windows Options screen:

    - Select No in the Create Start Menu section.

    - Select No in the Install Administration Server as a Windows Service section.

    - Click Next to continue.

15. On the Configure Server Start Mode and Java SDK screen:

    - Select Development Mode in the WebLogic Configuration Startup Mode section.

    - Click Next to continue.

16. On the Create WebLogic Configuration screen:

    - Enter MedRecClusterDomain in the Configuration Name field.

    - Click the Create button to create the new domain.

    - Click Done to exit the Configuration Wizard.

    The Configuration Wizard creates the new domain in c:\bea\user_projects\domains\MedRecClusterDomain.

Best Practices

- When creating the clustered WebLogic Server instances on a single machine, specify an unused localhost port such as 127.0.0.1 for the Listen Address. If you leave the Listen Address field blank, the server binds to all available IP addresses on the machine. If you specify "localhost" as the Listen Address, the server binds to all localhost addresses (127.0.0.x).

- Always specify an unused Multicast address and port number for production clusters. This ensures that only the cluster's messages are broadcast on the address/port combination.

The Big Picture

This tutorial is the basis for setting up your cluster environment. Before you can deploy applications to a server, you must first configure the domains and servers to which you want to deploy the applications.

The servers that you created have a minimal configuration—you specified only the server names and listen address, and their membership in the cluster. In the next tutorial, you will use the Administration Console to create and assign the server resources necessary to deploy the MedRec application suite on the cluster.

Related Reading

- Creating and Configuring Domains Using the Configuration Wizard in Configuring and Managing WebLogic Server

- Starting and Stopping WebLogic Servers: Quick Reference in the Configuring and Managing WebLogic Server