• No results found

The Job Manager does not require an agent to be running in the remote host to invoke commands and execute light touch administration of the Liberty Server, such as installations, start server, and stop server. However, you must configure targets to the remote hosts where the remote Liberty severs will be installed. You will perform this task now.

____ 14. On hostA, Navigate to Jobs -> Targets in the console as shown below

Page 24

Discovering the value of IBM WebSphere Application Server V8.5 for Administrators ____ 16. As shown below

__a. Enter hostB for the Host Name

__b. Select Windows for the Operating System

__c. Enter Administrator for the Administrative User

__d. Enter passw0rd for the password

____ 18. You can now log out of the Job Manager console on hostA.

Update the Liberty Server configuration file (server.xml) for hostB.

The Liberty server configuration for the Blog application in lab #2 was configured for local access. In order to configure the Liberty server for remote management and to use an http server plug-in, minor changes to the erver.xml is required prior to deployment of the Liberty server to the remote host.

____ 19. Copy the Lab2Package.zip that you created at the end of Lab 2 (recall the lab instructed you to place it in c:\Student\LibertyWork\Output ) to the C:\temp directory

____ 20. To prepare the application and Liberty server for deployment, some changes need to be made to the configuration of the server in the Lab2Package.zip archive

__a. Unzip the copy of Lab2Package.zip in C:\temp

__b. Navigate to the directory wlp\usr\servers\labServer in the unzipped/expanded application archive

on your laptop.

__c. Make a copy of the server.xml file (e.g. server.xml.copy)

__d. Open the server.xml file in an editor (notepad or wordpad)

__e. Add <feature>restConnector-1.0</feature> to the file in the feature manager stanza (just below

the localConnector-1.0 feature)

__f. Add <feature>serverStatus-1.0</feature> to the file in the feature manager stanza (just below the restConnector-1.0 feature)

__g. Update the httpEndpoint stanza by changing the host parameter from localhost to hostb as

shown below

<httpEndpoint host="hostb" httpPort="9580" httpsPort="9443" id="defaultHttpEndpoint"/>

__h. Add <pluginConfiguration webserverPort="80" webserverSecurePort="443"/> to the file (just below the httpEndPoint feature). While these are the default values, adding them explicitly is good management practice

__i. Using the wlp securityUtility, encode “wlpadm1n” (note the numeric 1) as the password for the wlpadmin user. The securityUtility command is located in the C:\IBM\WebSphere\AppServer\wlp\bin directory.

Page 26

Discovering the value of IBM WebSphere Application Server V8.5 for Administrators __ii. Run the command: securityUtility encode wlpadm1n

The command will generate output of the encrypted password as shown below.

{xor}KDMvPjsybjE=

__j. Add <user&name="wlpadmin"&password="{xor}KDMvPjsybjE="&/>to the basicRegistry stanza, just

below the entry for alice.

__k. Add the following stanza to the server.xml file, after the basicRegistry stanza, as shown below.

<administratorRole>

<user>wlpadmin</user> </administratorRole>

__l. Save the file (for reference, a copy of the modified server.xml is in the appendix at the end

Note: Due to defect in the 8.5.0.0 code, the Liberty Profile administrative security constraints and role configured in the server.xml are not consistently enforced. As a result you may or may not be

prompted for the wlpadmin user name and password further along in this lab, even though a prompt is the expected behavior. This defect is scheduled to be corrected in FixPack 1 (WAS V8.5.0.1)

__m. Rezip the archive and name the archive “Lab2Package_v1.zip by highlighting the wlp directory

then using the right mouse button select Send to -> Compressed (zipped) Folder

__n. Copy the archive to C:\temp on hostA

Use the Job Manager to install Liberty resources on the remote host (hostB)

____ 21. Log into the Job Manager console with the user jobadmin and password j0badmin and navigate to

____ 22. Select a Job Type of “Install Liberty Profile Resources” and click Next

____ 23.

__a. Enter hostB for the Target names, and click Add, which will add hostB as shown below,

__b. Enter Administrator and passw0rd for the User name and password as shown below

__c. Click Next

____ 24. Browse to the Lab Archive file in the C:\temp directory, Select it and click OK

Page 28

Discovering the value of IBM WebSphere Application Server V8.5 for Administrators ____ 26. Accept the defaults on the Schedule the Job panel and click Next

____ 27. Review the Job Parameters as shown below and click Finish to submit the job

n

____ 28. This will bring up the Job Status dialog as shown below. Be patient as you wait for the job to execute!!

Use the Job Manager to start the Liberty Profile Server on hostB.

____ 30. Now return to the Jobs panel and create and submit a job to start the Liberty server that was just installed

__a. Select Job Type of Start Liberty Profile Server and click Next

__b. Add hostB to the target list and enter Administrator and passw0rd as you did for the installation

job. , then click next

__c. Find the server runtime/wlp/liberty_server/labServer as shown below, then click Next

Page 30

Discovering the value of IBM WebSphere Application Server V8.5 for Administrators

__e. Review the job parameters and click Finish

____ 31. As before when installing the Liberty package, a successful job execution will be indicated as shown below.

Invoke the Blog application on the remote Liberty Profile Server

.

____ 32. Open a web browser on hostB and enter the URL http://hostB:9580/Blog/createBlogPost.html

____ 33. As before, if you receive a secure connection failed error and need help in resolving it refer to the Common Tasks section for more information.

____ 34. When prompted for credentials, enter alice for the user name with the password: alicePW

Generate the http server plug-in configuration file for the remote Liberty Profile server

____ 35. Generate a plugin-cfg.xml on hostB

__a. Using the Windows Explorer on the hostB desktop, navigate to C:\Program Files\IBM\Java60\bin

and open a Command Window (highlighting a folder inside that directory as you have done previously)

__b. Enter the command jconsole as shown below

__c. As shown below

__e. Highlight the labServer

__f. Enter wlpadmin for the username and wlpadm1n for the password

__g. Click Connect

JConsole is a JMX compliant graphical monitoring and management tool that connects to a running Java

Virtual Machine (JVM)both on a local or remote machine. JConsole comes as part of Java Development Kit (JDK).

____ 36. Generate the http server plugin configuration file, using the WebSphere MBeans, as shown below

__a. Click on the Mbeans tab

__b. Expand the WebSphere Mbeans

__c. Highlight the generatePluginCfg Mbean

__d. Click generate (in the right hand panel)

Page 32

Discovering the value of IBM WebSphere Application Server V8.5 for Administrators Note: The HTTP server and the Liberty Profile application server are located on the same machine (VMware image in this case). This was done to facilitate demonstration of remote Liberty Profile management in a lab exercise context and should not be considered a recommendation to place any application server in a DMZ on the same machine as the HTTP server.

____ 37. The HTTP server and plugin has already been configured to point to the plugin-cfg.xml which was generated and placed in the C:\IBM\WebSphere\wlp\usr\servers\labServer directory. So. all you need to do is to start the IBM HTTP Server by opening a command window C:\IBM\HTTPServer\bin and then entering apache as shown below

End of Lab 3 – Congratulations!

You have successfully performed a silent install of WebSphere Application Server - ND using a response file, created a WebSphere Application Server-ND Job Manager, used the Job Manager to install a Liberty Profile server and application to a remote server and performed a remote start of the Liberty Profile server. Additionally you have also covered some production aspects of Liberty configuration management by adding features to the Liberty Profile server server.xml file.

Page 34

Discovering the value of IBM WebSphere Application Server V8.5 for Administrators

Appendix A - Using the Packaging Utility to create the installation images

C:\Program Files\IBM\Packaging Utility>pucl listAvailablePackages –repositories D:\STEWInstalls\ND com.ibm.websphere.ND.v85_8.5.0.20120501_1108

C:\Program Files\IBM\Packaging Utility>pucl.exe copy com.ibm.websphere.ND.v85_8. 5.0.20120501_1108 -repositories D:\STEWInstalls\ND,D:\STEWInstalls\WASv85iFixes\ 8.5.0.0-ws-was-ifpm62795.zip,D:\STEWInstalls\WASv85iFixes\8.5.0.0-ws-was-ifpm636 90.zip,D:\STEWInstalls\WASv85iFixes\8.5.0.0-ws-was-ifpm63827.zip,D:\STEWInstalls \WASv85iFixes\8.5.0.0-ws-wasnd-distexceptibmi-ifpm64890.zip,D:\STEWInstalls\WASv 85iFixes\8.5.0.0-ws-wasprod-ifpm64186.zip,D:\STEWInstalls\WASv85iFixes\8.5.0.0-w s-wasprod-multios-ifpm63479.zip -platform os=win32 -target d:\STEWInstalls\PU_ Image -prompt -acceptLicense

The operation completed successfully.

C:\Program Files\IBM\Packaging Utility>pucl listAvailablePackages –repositories D:\STEWInstalls\Java7 com.ibm.websphere.IBMJAVA.v70_7.0.1000.20120424_1539

C:\Program Files\IBM\Packaging Utility>pucl.exe copy

com.ibm.websphere.IBMJAVA.v70_7.0.1000.20120424_1539 -repositories D:\StewInstalls\Java7 -target D:\STEWInstalls\Java7\PU_Win32 -platform os=win32 -prompt -acceptLicense

Appendix B - server.xml for the lab with changes

<server description="Liberty server for labs">

<!-- Enable features --> <featureManager> <feature>jsp-2.2</feature> <feature>servlet-3.0</feature> <feature>localConnector-1.0</feature> <feature>restConnector-1.0</feature> <feature>serverStatus-1.0</feature> <feature>jdbc-4.0</feature> <feature>jpa-2.0</feature> <feature>appSecurity-1.0</feature> </featureManager>

<httpEndpoint host="hostb" httpPort="9580" httpsPort="9443" id="defaultHttpEndpoint"/>

<pluginConfiguration webserverPort="80" webserverSecurePort="443"/>

<applicationMonitor updateTrigger="mbean"/>

<application id="Sample1" location="Sample1.war" name="Sample1" type="war"/> <logging consoleLogLevel="INFO" traceSpecification="*=info=enabled "/>

<library id="derby">

<fileset dir="${shared.resource.dir}/derby"/> </library>

<jdbcDriver id="derbyDriver" libraryRef="derby"/>

<dataSource jdbcDriverRef="derbyDriver" jndiName="jdbc/blogDB" type="javax.sql.ConnectionPoolDataSource">

<properties.derby.embedded createDatabase="false" databaseName="C:\Student\Derby\databases\blogDB"/> </dataSource>

<application id="Blog" location="Blog.war" name="Blog" type="war"> <application-bnd> <security-role name="author"> <user name="alice" /> </security-role> </application-bnd> </application> <featureManager> <feature>ssl-1.0</feature> </featureManager>

Page 36

Discovering the value of IBM WebSphere Application Server V8.5 for Administrators <administratorRole> <user>wlpadmin</user> </administratorRole> <basicRegistry id="BasicRegistry">

<user password="{xor}PjM2PDoPCA==" name="alice" /> <user password="{xor}KDMvPjsybjE=" name="wlpadmin" /> </basicRegistry>

Lab 04: WebSphere Application

Server V8.5 Operations and

Control

Contents'

WEBSPHERE APPLICATION SERVER V8.5 OPERATIONS AND CONTROL ... 7!

LAB REQUIREMENTS ... 7! WHAT YOU SHOULD BE ABLE TO DO ... 7! EXERCISE INSTRUCTIONS ... 7!

PART 1: JAVA 7 SE INSTALLATION AND CONFIGURATION OF WEBSPHERE APPLICATION SERVER TO USE JAVA 7 SE ... 9!

START THE VIRTUAL MACHINE AND MOUNT THE JAVA 7 ISO CD IMAGE. ... 9! INSTALL JAVA 7 USING INSTALLATION MANAGER ... 9! CREATE A STAND-ALONE SERVER PROFILE ... 10! DISPLAY AND SWITCH THE JAVA SE VERSION USED FOR THE WEBSPHERE APPLICATION SERVER ... 11!

PART 2: TRACKING ADMINISTRATIVE CONFIGURATION CHANGES ... 14!

ENABLE AUTOMATIC TRACKING REPOSITORY CHECKPOINTS ... 14! UPDATE THE JAVA HEAP SIZE ON THE SERVER, WHICH WILL TRIGGER AN AUTOMATIC REPOSITORY CHECKPOINT. ... 15! COMPARE THE CONFIGURATION CHANGES FROM THE EXTRACTED DATA GENERATED BY THE AUTOMATIC

REPOSITORY CHECKPOINT. ... 17!

PART 3: MEMORY LEAK DETECTION AND CORRECTION ... 22!

INSTALL A TEST APPLICATION THAT WILL PRODUCE A JAVA MEMORY LEAK. ... 22! START THE MEMORY LEAK APPLICATION ... 25! ENABLE THE LEAK DETECTION FEATURE USING THE WSADMIN COMMANDS. ... 26!

Discovering the value of IBM WebSphere Application Server V8.5 for Administrators

Related documents