2012年12月5日 星期三

Create a Basic Cluster

 (15 minutes) 

Skills Learned

At the end of this exercise, you will be able to:
·         Create a cluster of managed servers
·         Start clustered servers

Problem Statement

The Dizzyworld system architects have determined that the Dizzyworld applications will benefit from a highly available environment which will load balance requests to different servers.  This will make the Dizzyworld applications more reliable to employees and customers in case of server failure.  It will also allow more processing capabilities for times when application traffic is heavier than usual.

Design

Overview

In this lab you will create a cluster of three servers, dizzy1, dizzy2 and dizzy3.  This cluster will eventually host your Dizzyworld applications but for now you want to confirm that they start properly and join the cluster.

Specifications

Figure 13 presents the cluster architecture...


Figure 13. Dizzyworld Cluster Architecture


Table 26 Variables
File Name
Example
<STUDENT>
(Windows) c:\student\course_wls10_sysadmin
(Linux) /usr/student/course_wls10_sysadmin
<WORK_HOME>
(Windows) <STUDENT>\work
(Linux) <STUDENT>/work
<LAB_HOME>
(Windows) <STUDENT>\labs\labXX
(Linux) <STUDENT>/labs/labXX

Instructions

            1.   
Set up the exercise by opening a command prompt using prompt.cmd (Windows) or ./prompt.sh (Linux) found in <STUDENT>\bin. Change to the <LAB_HOME> directory and type:

ant setup_exercise

Note:  To continue working on the current exercise, use ant continue_exercise to start the HRDatabase and AdminServer. Using ant setup_exercise will overwrite your existing work.
            2.   
If already running, shut down dizzy1, dizzy2 and dizzy3 managed servers.  If not already open, start a web browser and navigate to http://localhost:7001/console.  Log in as:

Username: system
Password: weblogic

Create a new cluster with the following properties:

Name: dizzyworldCluster
Multicast Address: 239.192.0.0 (default)
Multicast Port: (refer to instructor)
Servers: dizzy1, dizzy2, dizzy3
            3.   
Start dizzy1, dizzy2 and dizzy3.  Watch each server as it tries to synchronize with other servers in the cluster and as it finally joins the cluster.  During startup of the servers, if prompted, enter the following:

Username: system
Password: weblogic
            4.   
(Optional): To set up the solution for this lab, open a command prompt using prompt.cmd (Windows) or ./prompt.sh (Linux) found in <STUDENT>\bin directory. Change to the <LAB_HOME> directory and type:

ant setup_solution

Detailed Instructions

Set up the exercise
        1.1        
Open a prompt using prompt.cmd (Windows) or ./prompt.sh (Linux) in <STUDENT>\bin.

        1.2        
Change to the <LAB_HOME> directory.

        1.3        
Type the following command:

ant setup_exercise

Note:  To continue working on the current exercise, use ant continue_exercise to start the HRDatabase and AdminServer. Using ant setup_exercise will overwrite your existing work.

Create a cluster
        2.1        
If already running, shut down dizzy1, dizzy2 and dizzy3 managed servers.
        2.2        
If not already open, start a web browser and navigate to http://localhost:7001/console.  Log in as:

Username: system
Password: weblogic
        2.3        
Navigate to dizzyworld à Environment à Clusters.  Lock the console, if necessary.
        2.4        
Create a new cluster with the following properties:

Name: dizzyworldCluster
Messaging Mode: Multicast
Multicast Address: 239.192.0.0 (default)
Multicast Port: (refer to instructor)

Click OK.
        2.5        
Go back into the dizzyworldCluster and navigate to the Configuration à Servers tab.
        2.6        
Add the existing servers dizzy1, dizzy2 and dizzy3 to the cluster.
        2.7        
Activate your changes.
        2.8        
Navigate to dizzyworld à Environment à Servers and view the list of servers.  Note that dizzy1, dizzy2 and dizzy3 are now part of the dizzyworldCluster.
Start the clustered servers
        3.1        
Using the previously opened prompt, navigate to <WORK_HOME>\domains\dizzyworld\bin.
        3.2        
Start the dizzy1 server by typing the following in the prompt:

(Windows) start startManagedWebLogic.cmd dizzy1
(Linux)  xterm –T dizzy1 –e ./startManagedWebLogic.sh dizzy1 &
        3.3        
If prompted, enter the following:

Username: system
Password: weblogic
        3.4        
Watch the server start up in the prompt window.  At some point you should see it start listening for cluster announcement and waiting to synchronize with other servers in the cluster.  As the other servers have not started yet; there is nothing for it to synchronize with yet.

<Notice> <Cluster> <BEA-000138> <Listening for announcements from cluster dizzyworldCluster on 239.192.0.0:7011.>

<Notice> <Cluster> <BEA-000133> <Waiting to synchronize with other running members of dizzyworldCluster.>
        3.5        
Finally, you should see that it has successfully joined the cluster.  You will see something like:

<Notice> <Cluster> <BEA-000102> <Joining cluster dizzyworldCluster on 239.192.0.0:7011>
        3.6        
Start the dizzy2 server by typing the following in the prompt window:

(Windows) start startManagedWebLogic.cmd dizzy2
(Linux) xterm –T dizzy2 –e ./startManagedWebLogic.sh dizzy2 &
        3.7        
If prompted, enter the following:

Username: system
Password: weblogic
        3.8        
Watch the server start up in the prompt window.  As one of the servers in the cluster is already started, dizzy2 will synchronize with dizzy1 and will download the cluster JNDI tree.

<Notice> <Cluster> <BEA-000133> <Waiting to synchronize with other running members of dizzyworldCluster.>
        3.9        
Finally, start the dizzy3 server and watch it synchronize with the other servers in the cluster and finally join the cluster.
(Optional) Setup Solution, if unable to complete lab.
        4.1        
To set up the solution for this lab, open a command prompt using prompt.cmd (Windows) or ./prompt.sh (Linux) found in <STUDENT>\bin directory. Change to the <LAB_HOME> directory and type:

ant setup_solution

沒有留言:

張貼留言