Sun Java System Portal Server 7.1 Configuration Guide

Clustering in Portal Server 7.1 on BEA WebLogic 8.1 Service Pack 4 and Service Pack 5

This section explains about clustering Portal Server 7.1 on BEA WebLogic 8.1 Service Pack 4 and Service Pack 5.

Figure 8–3 Portal Server on WebLogic Cluster Environment

The user accesses any of the managed servers that are
clustered.

ProcedureTo Cluster Portal Server 7.1 on WebLogic 8.1 Service Pack 4

In this section, you do the following:

Before You Begin
  1. Run the BEA WebLogic 8.1 installer to install BEA WebLogic 8.1.

  2. Run the script quickStart.sh after a successful installation.

    Bea-base/weblogic81/common/bin/quickStart.sh

  3. Click Create a New Domain Configuration or Extend an Existing One.

    The installation panel appears.

  4. Enter admin and the admin password.

    Leave the other defaults as they are.

  5. Click Finish to complete the installation.

  6. To start WebLogic, run the startWeblogic.sh script.

    Bea-base/user_projects/domains/mydomain/startWeblogic.sh

  7. Access the Administrator server.

    http://node1.domain-name:7001/console

    By default, the administrator server of WebLogic is created on port 7001.

ProcedureTo Create a Node Agent on Node 1

This procedure creates a node agent on the port 5555, which is the default port for node agents. A node agent is required to create managed servers.

  1. Log in to the administrator server.

    http://node1.domain-name:7001/console

  2. Click Machines and click Configure a New Machine.

  3. Enter a name for the node agent, and click Create. For example, node_1.

    By default, the node agent runs on the port 5555. If you need any other port, enter the port number in the Node Manager tab.

  4. On Node 1, start the node agent.

    Bea-base/weblogic81/server/bin/startNodeManager.sh node1-ip-address 5555

ProcedureTo Create WebLogic Managed Servers on Node 1

This procedure creates managed servers on port 7011, port 7022, and port 55555. The first two managed servers are used for creating Portal Server instances. The last one is used as a proxy server to set up the load balancer.

  1. Log in to the administrator server.

    http://node1.domain-name:7001/console

  2. Click Servers, and click Configure a New Machine.

  3. Enter a name for the managed server. For example, node1_7011.

  4. Select node_1 from the Machine list box.

  5. Enter the Listen Port as 7011, and click Create.

  6. To start the managed server, click the Control tab and click Start the Server.

  7. (Optional) You can also start the managed server using the command-line interface.

    bea_base/user_projects/domains/mydomain/startManagedWeblogic.sh node1_7011

  8. Use steps 2 through 5 to create a managed server named node1_7022 with a listen port of 7022.

  9. Start the second managed server.

  10. Use steps 2 through 5 to create a managed server named proxy with a listen port of 55555.

    This managed server is used for the proxy settings.

  11. Start the third managed server.

ProcedureTo Create a Node Agent on Node 2

This procedure creates a node agent on port 5555 on Node 2 using the administrator console installed in Node 1.

  1. Install BEA WebLogic on Node 2.

  2. Log in to the administrator server of Node 1.

    http://node1.domain-name:7001/console

  3. Click Machines and click Configure a New Machine.

  4. Enter node_2 for the node agent name, and click Create.

  5. In the Listen Address field, enter the IP address of Node 2.

  6. On Node 2, start the node agent.

    Bea-base/weblogic81/server/bin/startNodeManager.sh node2-ip-address 5555

  7. In the nodemanager.Hosts file of Node 2, add the IP address of Node 1.

    Bea-base/weblogic81/common/nodemanager.Hosts

    You need to do this to ensure that Node 2's node agent can accept commands from the administrator server on Node 1.

ProcedureTo Create WebLogic Managed Servers on Node 2

This procedure creates a managed server on Node 2 on the port 7033 using the administrator console installed on Node 1.

  1. Log in to the administration server.

    http://node1.domain-name:7001/console

  2. Click on Servers, and click Configure a New Machine.

  3. Enter a name for the managed server. For example, node2_7033.

  4. Select node_2 from the Machine list box.

  5. Enter the Listen Address as the IP address of Node 2.

  6. Enter the Listen Port as 7022, and click Create.

  7. Click the Control tab and click Start the Server.

  8. (Optional) You can also start the managed server using the command-line interface on Node 2.

    bea_base/user_projects/domains/mydomain/startManagedWeblogic.sh node2_7033

ProcedureTo Install Access Manager on Administrator Server

This procedure installs Access Manager on the Administrator server (BEA WebLogic 8.1 Administrator Server) on Node 1. By default, the Administrator Server port is 7001.

  1. Install Directory Server and Web Server using the Java ES installer.

  2. Install Access Manger in the Configure Later mode.

  3. Run amsamplesilent.

    AccessManager_base/SUNWam/amconfig -s amsamplesilent

  4. Change the values in amsamplesilent accordingly.

  5. Access amconsole and verify whether Access Manager is running.

    http://node1.domain-name:7001/amconsole

ProcedureTo Install Portal Server 7.1 on Node 1

This procedure installs Portal Server 7.1 on port 7011 of the managed server on Node 1.

  1. Install Portal Server 7.1 using the Java ES installer.

  2. In the installer, select Managed Server while installing.

  3. Access the portal.

    http://node1.domain-name:7011/portal/dt

    The Portal Welcome page appears.

ProcedureTo Create an Instance of Portal Server 7.1 on Node 1

This procedure creates an instance of Portal Server on port 7022 of the managed server on Node 1.

  1. Modify the Webcontainer.properties file in BEA WebLogic to change the values corresponding to the managed servernode1_7022.

  2. Create an instance of Portal Server.

    PortalServer_base/SUNWportal/bin/psadmin create-instance -u amadmin -f password -p portal1 -w webcontainer.properties.BEAWL8

  3. Restart the managed server named node1_7022.

  4. Access the portal.

    http://node1.domain-name:7022/portal/dt

    The Portal Welcome page appears.

ProcedureTo Create an Instance of Portal Server 7.1 on Node 2

This procedure creates an instance of Portal Server on port 7033 of the managed server on Node 2.

  1. Install Portal Server 7.1 and Access Manager SDK in the Configure Later mode using the installer.

  2. Modify the amsamplesilent script with appropriate values. Ensure that DEPLOY_LEVEL is set as 4.

    The amsamplesilent script is located in the AccessManager_base/SUNWam/bin directory.

  3. Run the amsamplesilent script.

    AccessManager_base/SUNWam/bin/amconfig -s amsamplesilent.

  4. Copy the example15.xml file to a temporary directory and modify it with appropriate values.

    The example15.xml file is located in the PortalServer_base/SUNWportal/samples/psconfig directory.

  5. Configure Portal Server using the example15.xml as the configuration XML file.

    PortalServer_base/SUNWportal/bin/psconfig --config example15.xml

  6. Modify the webcontainer.properties file in BEA WebLogic to change the values corresponding to the managed server node1_7033.

  7. Create a Portal Server instance.

    PortalServer_base/SUNWportal/bin/psadmin create-instance -u amadmin -f password -p portal1 -w webcontainer.properties.BEAWL8

  8. Restart the managed server node1_7033.

  9. Access the portal.

    http://node1.domain-name:7033/portal/dt

    The Portal Welcome page appears.

ProcedureTo Configure a Cluster

This procedure configures a cluster for the three managed server that were created: node1_7011, node1_7022, and node2_7033.

  1. Log in to the administrator server.

    http://node1.domain-name:7001/console

  2. Click Cluster and click Configure a New Cluster.

  3. Enter a cluster name and cluster address.

    Enter the cluster name as new_cluster and enter the cluster address as node1.domain-name.

  4. Select Default Load Algorithm as round robin, and click Create.

  5. Click the Server tab, and select node1_7011, node1_7022 and node1_7033 and drag them into the list box.

  6. Stop and restart all of the servers.

    Each time you change the cluster configuration you must stop and restart all of the servers in the cluster.

  7. Select the Monitoring tab.

    After a successful configuration of cluster, the following is displayed.


    Number of servers configured for this cluster: 2
    Number of servers currently participating in this cluster: 2

ProcedureTo Install Proxy Servlet for Load Balancing

This procedure creates a proxy server .war file for load balancing.

  1. Telnet to Node 1.

  2. Create files web.xml and weblogic.xml in the new proxy/WEB-INF directory.


    mkdir -p proxy/WEB-INF
    cd proxy/WEB-INF
  3. Add the following contents to the web.xml file.


    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3
    //EN? "http://java.sun.com/dtd/web-app_2_3.dtd"><web-app>
    
    <servlet>
            <servlet-name>HttpClusterServlet</servlet-name>
            <servlet-class>weblogic.servlet.proxy.HttpClusterServlet</servlet-class>
            <init-param>
                    <param-name>WebLogicCluster</param-name>
                    <param-value>HOST.DOMAIN:7011|HOST.DOMAIN:7022</param-value>
            </init-param>
    </servlet>
    
    <servlet-mapping>
            <servlet-name>HttpClusterServlet</servlet-name>
            <url-pattern>/</url-pattern>
    </servlet-mapping>
    
    <servlet-mapping>
            <servlet-name>HttpClusterServlet</servlet-name>
            <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>
    
    <servlet-mapping>
            <servlet-name>HttpClusterServlet</servlet-name>
            <url-pattern>*.htm</url-pattern>
    </servlet-mapping>
    
    <servlet-mapping>
            <servlet-name>HttpClusterServlet</servlet-name>
            <url-pattern>*.html</url-pattern>
    </servlet-mapping>
    
    </web-app>
  4. Add the following contents to the weblogic.xml file.


    <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems,
     Inc.//DTD Web Application 8.1//
    EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
    <weblogic-web-app>
            <context-root>/</context-root>
    </weblogic-web-app>
  5. Change directories to the proxy directory.

  6. Run the following command:

    /usr/jdk/jdk1.5.0_01/bin/jar cvf proxy.war WEB-INF

  7. Access the administrator console.

    http://node1.domain-name:7001/console

  8. Click Server > Configure a New Server.

  9. Enter the new server name as proxy and the listen port as 55555, and click Apply.

  10. Click Deployment in the left pane, click Web Applications Module, and click Deploy New.

  11. Select proxy.war from the node1.domain and deploy it on the independent server named proxy.

ProcedureTo Deploy .war Files on the Cluster

This procedure deploys all .war files on the cluster. Redeployment of all the .war files needs to be done on the cluster.

  1. Log in to administrator server.

  2. Click Web Application Modules.

  3. For each Portal Web Application module, click the Target tab, select All Servers in the Cluster option, and click Apply.

  4. Click Services > JDBC > Connection Pools.

  5. For each connection pool related to Portal Server, click the Target tab, select All Servers in the Cluster option, and click Apply.

  6. Click Services > JDBC > Data Source.

  7. For each data source related to Portal Server, click the Target tab, select All Servers in the Cluster option, and click Apply.

  8. Restart all servers.

ProcedureTo Install Gateway on the Gateway Host

  1. Install Gateway on Node 3.

  2. Enter the load balancer URL, http://node1/domain-name:55555/portal, as the portal URL while installing gateway.

  3. Log in to gateway and access developer/developer.

    If the proxy is working, the URL changes to the following: https://GWhost:443/http://node1.domain-name:55555/portal/dt