weblogic managed servers lab - dell emc · pdf fileadministration and deployment lab 2 –...

17
Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-1 Lab 2 — Setting up BEA WebLogic on multiple managed servers Estimated Time: 45 minutes Goals Set up a load-balanced multiple managed-server configuration, deploy Documentum Webtop and test. Tasks 1. Create a custom WebLogic domain and configure one admin server and two managed server instances. 2. Create default web application and target it to deploy to the managed servers. 3. Create a Proxy Server and configure load-balancing across the managed server instances, by deploying the HttpClusterServlet application. 4. Install Documentum Webtop. 5. Deploy Webtop to managed servers. 6. Test configuration by logging into Webtop. 7. Test failover by shutting down the managed server instance that is handling a session. Background To complete this lab, you must have successfully installed Content Server and configured it with a docbroker and docbase. You will need to know the docbroker hostname and listening port. If you do not have a Content Server installed and configured, you can still perform this lab, but you will not be able to perform the final step of testing the configuration. Although this lab demonstrates how to set up a load-balanced multiple-managed server configuration, we are limited to a single machine. In a production environment you would most likely install WebLogic on two or more server machines, and configure the managed server instances across the machines..

Upload: vannguyet

Post on 18-Mar-2018

231 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-1

Lab 2 — Setting up BEA WebLogic on multiple managed servers

Estimated Time: 45 minutes

Goals Set up a load-balanced multiple managed-server configuration, deploy Documentum Webtop and test.

Tasks 1. Create a custom WebLogic domain and configure one admin server and two managed server instances.

2. Create default web application and target it to deploy to the managed servers.

3. Create a Proxy Server and configure load-balancing across the managed server instances, by deploying the HttpClusterServlet application.

4. Install Documentum Webtop.

5. Deploy Webtop to managed servers.

6. Test configuration by logging into Webtop.

7. Test failover by shutting down the managed server instance that is handling a session.

Background To complete this lab, you must have successfully installed Content Server and configured it with a docbroker and docbase. You will need to know the docbroker hostname and listening port.

If you do not have a Content Server installed and configured, you can still perform this lab, but you will not be able to perform the final step of testing the configuration.

Although this lab demonstrates how to set up a load-balanced multiple-managed server configuration, we are limited to a single machine. In a production environment you would most likely install WebLogic on two or more server machines, and configure the managed server instances across the machines..

Page 2: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-2

Steps 1. Create a custom WebLogic domain and configure one admin server and two managed server

instances. Launch the WebLogic Configuration Wizard from the Start menu on Windows: click Start > Programs > BEA WebLogic Platform 8.1 > Configuration Wizard.

1.1. Select Create a New WebLogic Configuration and click Next.

1.2. In the Templates list, select the Basic WebLogic Server Domain node and click Next.

1.3. Select Custom configuration type and click Next.

1.4. Set the various Administrative Server options as shown—set the Name to: adminServer—and click Next.

1.5. When asked “Do you want to distribute your WebLogic configuration across managed servers…?” Click Yes, then click Next.

1.6. In the Configure Managed Servers panel, configure two managed server instances as follows:

1.6.1. Click the Add button twice to create two new server records.

1.6.2. Enter the following information for these managed server instances, taking note of the port assignments. All server Listen address plus Listen port assignments must be unique. Care must be taken to ensure the combined adminServer Listen address plus Listen port that were set in step 1.5 are different from these managed server settings.

Page 3: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-3

NOTE: This lab is limited to allowing you to set up managed server instances on a single computer. If you were configuring this topology to use remote machines, you would enter the appropriate machine name or IP address in the Listen address fields.

1.6.3. After verifying the above information, click Next.

1.7. Do not make any entries in the Configure Clusters panel, and click Next. We will configure a load-balancing proxy server later in this lab.

1.8. Do not make any entries in the Configure Machines panel, and click Next.

1.9. When asked “Do you want to define JDBC components…?” Just click Next.

1.10. When asked “Do you want to define JMS components …?” Just click Next.

1.11. In the Configure Administrative Username and Password panel, set them both to “weblogic” as shown and click Next.

username: weblogic password: weblogic

1.12. In the Configure Windows Options panel, click Yes to add a shortcut in the Start Menu, and click No to installing the administrative server as a windows service, then click Next.

1.13. In the Build Start Menu Entries, change the name of the admin server startup entry, and create two new startup entries, one for each managed server instance.

1.13.1. Change the name of the Shortcut link name to “Start Admin Server” as shown:

Page 4: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-4

1.13.2. Add a new Shortcut link by clicking the Add button, and enter the following information for starting managedServer1:

1.13.3. Add another Shortcut link by clicking the Add button, and enter the

following information for starting managedServer2.

NOTE: It is very important that the Argument fields exactly match the server names of the instances you created in step 1.6.2.

1.13.4. Click Next.

1.14. In the Configure Server Start Mode and Java SDK panel, select Production Mode for the WebLogic Configuration Startup Mode and in the BEA Supplied SDKs list in the Java SDK Selection area, select Sun SDK 1.4.2_04. Then click Next.

1.15. In the Create WebLogic Configuration panel, enter “labDomain” for the Configuration Name in the lower right corner:

1.16. Leave all other information on this panel “as is” and click Create.

NOTE: The operation will complete pretty quickly and you will know it is finished when the Create button changes to a Done button.

1.17. On the next panel, click Done.

2. Create default web application and target it to deploy to the managed servers.

Page 5: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-5

NOTE: The DefaultWebApp is required to support Documentum web apps that use the Virtual Linking feature.

2.1. Launch the WebLogic Configuration Wizard again, as in step 0, and in the Create or Extend a Configuration panel, select Extend an existing Weblogic configuration and click Next.

2.2. In the Choose a WebLogic Configuration Directory panel, select the labDomain node inside the …\user_projects\domains folder, and click Next.

2.3. In the Select a Configuration Extension Template panel, under Configuration Extensions, check DefaultWebApp and click Next.

2.4. In the Choose the Administration Server panel, select the adminServer and click

Next.

2.5. When asked “Do you want to define JDBC components…?” Just click Next.

2.6. When asked “Do you want to define JMS components …?” Just click Next.

2.7. When asked “Do you want to target servers and clusters…?” Click Yes, then click Next.

2.8. In the Target Applications to Servers or Clusters panel, leave the settings “as is” and click Next. This will automatically target the DefaultWebApp to the two managed server instances. If you select either of the managed server instances in the Target

Page 6: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-6

list on the right, you will see that the wizard already selected the DefaultWebApp. Do not target the adminServer.

2.9. When asked “Do you want to configure the application’s security?” Just click Next.

2.10. In the Create WebLogic Configuration panel, click Import.

NOTE: The operation will complete pretty quickly and you will know it is finished when the Import button changes to a Done button.

2.11. When the import process has completed, click Done.

3. Deploy a Proxy Server and configure load-balancing across the managed server instances.

3.1. Start the WebLogic Node Manager from the Start menu on Windows: click Start > Programs > BEA WebLogic Platform 8.1 > Other Development Tools > Node Manager.

NOTE: The WebLogic Node Manager must be running before you can start any server instances. Also note that the DOS window will continue to remain open for all app server instances that are running during this lab. Do not close these windows or you will shutdown the server instances.

3.2. Start the adminServer from the Start menu on Windows: click Start > Programs > BEA WebLogic Platform 8.1 > User Projects > labDomain > Start Admin Server:

3.3. When asked to enter a username and password in the command window, enter the administrative username and password you chose in step 1.11 which should be ‘weblogic’

3.4. Open a browser window and navigate to http//localhost:7001/console and again, enter the administrative username and password you entered in the previous step.

NOTE: The Administrative Server instance must be started before you can access the Administrative Console.

3.5. In the Administrative Console window’s left pane (tree control), select the Servers node, and in the right hand pane, click on Configure a new Server:

3.6. Configure the following settings and click the Create button.

Page 7: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-7

3.7. Start the proxyServer instance by selecting the Servers > proxyServer node in the left pane of the console and selecting the Control tab in the right pane.

3.8. Click the Start/Stop sub tab within the Control tab in the right pane, and click Start this server…

3.9. When asked to verify, click Yes.

3.10. Click the Deployments > Web Application Modules node in the left pane of the console.

3.11. In the right pane click Deploy a new Web Application Module… The following will display in the right pane:

Page 8: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-8

3.12. Navigate to the proxyApp.war by clicking on the C: link in the Location link:

3.13. Navigate to the C:\Lab_Materials folder and select the proxyApp.war by clicking the radio button to its left, and click the Target Module button.

3.14. Put a check next to proxyServer and click the Continue button.

3.15. Click the Deploy button.

NOTE: You can safely start the proxyServer instance from the WebLogic admin console, but do not start any managed server instances from the admin console. You must start these server instances using the Start menu shortcuts you created when configuring the domain, or by directly executing startManagedWebLogic.cmd from a command window: startManagedWebLogic.cmd managedServer1 startManagedWebLogic.cmd managedServer2 Post 5.3 release, you will able to start, stop, deploy and undeploy Documentum applications directly from the admin console. For the current release, you still need to start server instances using the script files.

Page 9: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-9

3.16. A note about the proxyApp. The important thing to understand about the proxy application is that it deploys the WebLogic HttpClusterServlet application and configures it within the web.xml file (shown here). The line in bold shows how you configure it to distribute new requests to the various managed servers you have created. If the managed server instances were on other machines, the “localhost” part of the listener addresses would contain another machine name or IP address.

<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>localhost:8001|localhost:8002</param-value> </init-param> <init-param> <param-name>DebugConfigInfo</param-name> <param-value>ON</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. Install Documentum Webtop.

4.1. Launch the Webtop installer by executing the following file: C:\Lab_Materials\Webtop\webtopWinSetup.exe

4.2. When the welcome panel displays, click Next.

4.3. Click “I accept the terms of the license agreement” and click Next.

4.4. In the Select Optional Features panel, click Next.

4.5. In the Select an Application Server panel, click the radio button for BEA WebLogic 8.1 and click Next.

Page 10: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-10

4.6. In the Select an Application Server panel, click the radio button for BEA WebLogic

8.1 and click Next.

4.7. In the Get App Server Directories panel, the App Server Folder and User Project Folder edit controls should already be populated with the location of the version of WebLogic on the box, so just click Next.

NOTE: To enable the installer so that it will pre populate the location of WebLogic on your computer, you should set the BEA_HOME environment variable to the root folder where you installed BEA, e.g., “c:\bea”. This was already done for you in this lab, so just click Next.

4.8. In the Choose Deployment Configuration Type panel, select Managed Server Configuration and click Next.

Page 11: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-11

4.9. In the Get Upload Option panel, select Upload application to admin server

instance and click Next.

NOTE: This option will prepare the Webtop application war file and expand it to the upload folder within the adminServer folder in the labDomain. This is a BEA recommended location for applications that will later be deployed to multiple managed servers which is what you will do later in this lab.

4.10. In the Get Target Info panel, accept the pre populated Target Domain and Target Server. Since there is only one domain and one admin server instance defined, these will be the only options. Click Next.

4.11. In the Get Domain Configuration Option panel, select Configure one or more

domains and click Next.

NOTE: This option will ensure all targeted managed server instances configured on this computer system will be able to locate DFC and BOF services so that the application can communicate with the Content Server.

4.12. In the Configure Domains panel, select the labDomain and click Next.

Page 12: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-12

4.13. In the Virtual Link Option panel, select Install Virtual Linking… and click Next.

The installer will verify that virtual linking is possible by checking for the existence of the DefaultWebApp that you deployed in step 2. If you had not deployed a DefaultWebApp, the installer will uncheck the Virtual Link option and explain that you must first deploy the DefaultWebApp, or not install this feature.

4.14. In the Select Content Transfer Folder panel, accept the pre populated temporary

folder that will be used for content transfer operations and click Next.

4.15. In the Install Summary panel, click Next to begin the installation and wait for it to complete.

NOTE: Once the installation has completed, if the installer instructs you to reboot, go ahead and do that, otherwise just click the Finish button.

5. After Webtop installation has completed (and the system is rebooted—if necessary), deploy Webtop to managed servers.

5.1. Verify that the WebLogic Node Manager and adminServer instances are running. If you stopped them for any reason, or if you rebooted after the Webtop installation, you will need to restart them. You should start the Node Manager first, followed by the adminServer instance. Refer to steps 3.1 through 3.1.

Page 13: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-13

5.2. Start the two managed server instances by executing the following Start menu shortcuts: click Start > Programs > BEA WebLogic Platform 8.1 > User Projects > labDomain > Start Managed Server 1 and Start Managed Server 2.

NOTE: For Documentum 5.2.5 SP2 products you cannot use the Administrative Console to control these server instances, unless you manually configure the Remote Start settings in the Administrative Console for each managed server instance. Instructions for doing this are in Lab #3. In a future release of Documentum Web App installers this process will be automated.

5.3. Open a browser window and navigate to http//localhost:7001/console and enter the administrative username and password.

5.4. Click the Deployments > Web Application Modules node in the left pane of the console.

5.5. In the right pane click Deploy a new Web Application Module… and navigate to the upload folder located in the adminServer directory as shown, select the webtop module and click the Target Module button.

5.6. Put a check next to both managed servers and click the Continue button.

5.7. Click the Deploy button and wait for completion. This process may take several minutes. You will know it has completed when the Status of Last Action changes from “In Process” to “Success”. This web page will periodically refresh automatically.

Page 14: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-14

6. Test configuration by logging into Webtop.

6.1. In the admin console, select the Deployments > Web Application Modules > webtop node in the left pane.

6.2. Select the Testing tab in the right pane, and click the managedServer1 test URL:

http://localhost:8001/webtop/

6.3. A browser window should pop up and after a few moments a Webtop Login page will display. You have just verified that the managedServer1 has been correctly configured with Webtop.

6.4. Repeat the test for managedServer 2 on:

http://localhost:8002/webtop/

6.5. Test the load balancing mechanism through the HttpClusterServlet by connecting to the proxyServer address by opening a browser and entering the following URL:

http://localhost:7003/webtop

6.6. A Webtop Login page should display:

6.7. Log into Webtop using the username and password you specified when installing the

Content Server during Lab 1.

7. Test failover by shutting down the managed server instance that is handling a session.

Page 15: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-15

NOTE: This part of the lab will demonstrate what happens in a multiple managed server environment when a server instance fails. Since Documentum web apps do not yet contain session failover capability—but will have in 5.3—the benefit of using multiple managed servers is redundancy and availability for new sessions. As will be demonstrated here, if a server instance fails while handling a session, the user will simply be presented with a new login panel and have to log back into Webtop. However, all new sessions will work as if nothing happened. With 5.3, the user will be able to continue working as if no failure occurred.

7.1. Connect to Webtop through the proxyServer:

http://localhost:7003/webtop

7.2. Log into the docbase you created in Lab 1.

NOTE: the first time you log in, or access a new jsp page in Webtop it will load quite slowly because the app server is compiling java classes. This only occurs the first time you access a particular page.

7.3. Once the main page has finished initializing, shut down the instance of managedServer2 which will be handling this request. Do this by locating the DOS window running managedServer2 and closing it by clicking the X button in the upper right corner:

7.4. Switch back to the Webtop and click the Preferences button in the upper right corner of the screen:

7.5. After a few moments, the following web page will display:

Page 16: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-16

7.6. After a few moments, the Webtop Logon page should display again:

IMPORTANT: If the Webtop Login screen did not display, and the preferences page displayed normally, then your session was being handled by managedServer1. In that case, restart managedServer2 and then shut down managedServer1, and then click the preferences button to cause the failover behavior.

7.7. Log back into Webtop and click the Preference button in the upper right corner of the screen. This time a Preferences page should display as expected:

Page 17: WebLogic Managed Servers Lab - Dell EMC · PDF fileAdministration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers Lab 2-3 NOTE: This lab is limited to

Administration and Deployment Lab 2 – Setting up BEA WebLogic on multiple managed servers

Lab 2-17

End of Lab 2