现有设置:一个standalone的app server先使用Profile Management Tool创建一个dmgr。
把AppSrv01添加到Dmgr01里面:
cd D:IBMWebSphereAppServerprofilesAppSrv01bin
addNode.bat localhost 8879
===================================================================================
D:IBMWebSphereAppServerprofilesAppSrv01bin>addNode.bat localhost 8879
ADMU0116I: Tool information is being logged in file
D:IBMWebSphereAppServerprofilesAppSrv01logsaddNode.log
ADMU0128I: Starting tool with the AppSrv01 profile
CWPKI0308I: Adding signer alias "CN=HGHLTR8Y32CC.corp.capgemini." to local
keystore "ClientDefaultTrustStore" with the following SHA digest:
11:0E:D2:82:EF:5B:F4:A4:FF:99:E9:C2:92:41:FC:2A:CA:90:66:C7
CWPKI0309I: All signers from remote keystore already exist in local keystore.
ADMU0001I: Begin federation of node HGHLTR8Y32CCNode01 with Deployment Manager
at localhost:8879.
ADMU0009I: Successfully connected to Deployment Manager Server: localhost:8879
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: server1
ADMU2010I: Stopping all server processes for node HGHLTR8Y32CCNode01
ADMU0510I: Server server1 is now STOPPED
ADMU0024I: Deleting the old backup directory.
ADMU0015I: Backing up the original cell repository.
ADMU0012I: Creating Node Agent configuration for node: HGHLTR8Y32CCNode01
ADMU0014I: Adding node HGHLTR8Y32CCNode01 configuration to cell:
HGHLTR8Y32CCCell01
ADMU0016I: Synchronizing configuration between node and cell.
ADMU0018I: Launching Node Agent process for node: HGHLTR8Y32CCNode01
ADMU0020I: Reading configuration for Node Agent process: nodeagent
ADMU0022I: Node Agent launched. Waiting for initialization status.
ADMU0030I: Node Agent initialization completed successfully. Process id is:
10976
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: nodeagent
ADMU0506I: Server name: server1
ADMU0300I: The node HGHLTR8Y32CCNode01 was successfully added to the
HGHLTR8Y32CCCell01 cell.
ADMU0306I: Note:
ADMU0302I: Any cell-level documents from the standalone HGHLTR8Y32CCCell01
configuration have not been migrated to the new cell.
ADMU0307I: You might want to:
ADMU0303I: Update the configuration on the HGHLTR8Y32CCCell01 Deployment
Manager with values from the old cell-level documents.
ADMU0306I: Note:
ADMU0304I: Because -includeapps was not specified, applications installed on
the standalone node were not installed on the new cell.
ADMU0307I: You might want to:
ADMU0305I: Install applications onto the HGHLTR8Y32CCCell01 cell using wsadmin
$AdminApp or the Administrative Console.
ADMU0003I: Node HGHLTR8Y32CCNode01 has been successfully federated.
D:IBMWebSphereAppServerprofilesAppSrv01bin>
===================================================================================
再去看原来那个standalone的app server的admin console已经打不开了,只有dmgr的admin console可以用了。
先把整个环境重启一下。
在admin console的WebSphere application server clusters页面添加两个server到cluster1中:
======================================================================================
Options | Values |
---|
Cluster Name | cluster1 |
Core Group | DefaultCoreGroup |
Node group | DefaultNodeGroup |
Prefer local | true |
Configure HTTP session memory-to-memory replication | false |
|
Server name | c1_svr1 |
Node | HGHLTR8Y32CCNode01(ND 8.0.0.0) |
Weight | 2 |
Clone Template | default |
Clone Basis | Create the member using an application server template. |
Select how the server resources are promoted in the cluster. | cluster |
Generate unique HTTP ports | true |
|
Server name | c1_svr2 |
Node | HGHLTR8Y32CCNode01(ND 8.0.0.0) |
Weight | 2 |
Clone Template | Version 8 member template |
Generate unique HTTP ports | true |
======================================================================================然后把启动cluster1。
把样例程序DefaultApplication.ear部署到集群里面。
启动应用。
这样就可以分别访问cluster1里面两个成员的snoop程序了
当然了,这并不是我们想要的集群。
那就先安装一下IHS(IBM Http Server)和web server plugin,以及WebSphere Customization Toolbox
使用WebSphere Customization Toolbox生成一个webserver1的定义。
这个过程会自动在IHS的D:IBMHTTPServerconfhttpd.conf文件中增加下面两行:
======================================================================================
LoadModule was_ap22_module "D:IBMWebSpherePluginsbinmod_was_ap22_http.dll"
WebSpherePluginConfig "D:IBMWebSpherePluginsconfigwebserver1plugin-cfg.xml"
======================================================================================
生成的web server的plugin的配置文件位于:
D:IBMWebSpherePluginsconfigwebserver1
将这个脚本拷贝至D:IBMWebSphereAppServerbin,并运行:
cd D:IBMWebSphereAppServerbin
D:IBMWebSphereAppServerbin>configurewebserver1.bat
======================================================================================
D:IBMWebSphereAppServerbin>configurewebserver1.bat
WASX7209I: Connected to process "dmgr" on node HGHLTR8Y32CCCellManager01 using S
OAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are
available as arguments that are stored in the argv variable: "[webserver1, IHS,
D:\IBM\HTTPServer, D:\IBM\HTTPServer\conf\httpd.conf, 80, MAP_ALL, D:\IB
M\WebSphere\Plugins, managed, HGHLTR8Y32CCNode01, HGHLTR8Y32CC.corp.capgemini.
com, windows, 8008, canjli, welcome1, IBM HTTP Server V8.0]"
Input parameters:
Web server name - webserver1
Web server type - IHS
Web server install location - D:IBMHTTPServer
Web server config location - D:IBMHTTPServerconfhttpd.conf
Web server port - 80
Map Applications - MAP_ALL
Plugin install location - D:IBMWebSpherePlugins
Web server node type - managed
Web server node name - HGHLTR8Y32CCNode01
IHS Admin port - 8008
IHS Admin user ID - canjli
IHS Admin password - welcome1
IHS service name - IBM HTTP Server V8.0
Creating the web server definition for webserver1 on node HGHLTR8Y32CCNode01.
Parameters for administering IHS web server can also be updated using wsadmin sc
ript or admin console.
Web server definition for webserver1 is created.
Start computing the plugin properties ID.
Plugin properties ID is computed.
Start updating the plugin install location.
Plugin install location is updated.
Start updating the plugin log file location.
Plugin log file location is updated.
Start updating the RemoteConfigFilename location.
Plugin remote config file location is updated.
Start updating the RemoteKeyRingFileName location.
Plugin remote keyring file location is updated.
Start saving the configuration.
Configuration save is complete.
Computed the list of installed applications.
Processing the application DefaultApplication.ear.
Get the current target mapping for the application DefaultApplication.ear.
Computed the current target mapping for the application DefaultApplication.ear.
Start updating the target mappings for the application DefaultApplication.ear.
ADMA5075I: Editing of application DefaultApplication.ear started.
ADMA5058I: Application and module versions are validated with versions of deploy
ment targets.
ADMA5005I: The application DefaultApplication.ear is configured in the WebSphere
Application Server repository.
ADMA5005I: The application DefaultApplication.ear is configured in the WebSphere
Application Server repository.
ADMA5005I: The application DefaultApplication.ear is configured in the WebSphere
Application Server repository.
ADMA5113I: Activation plan created successfully.
ADMA5011I: The cleanup of the temp directory for application DefaultApplication.
ear is complete.
ADMA5076I: Application DefaultApplication.ear edited successfully. The applicati
on or its web modules may require a restart when a save is performed.
Target mapping is updated for the application DefaultApplication.ear.
Start saving the configuration.
Configuration save is complete.
D:IBMWebSphereAppServerbin>
======================================================================================
这个过程将在dmgr里生成一个webserver1的定义。
当你会到admin console的Web servers页面,会发现多了一个webserver1。尝试从console里启动它,成功了!
而且你会发现DefaultApplication.ear也被自动map到webserver1了。
在IE里尝试访问snoop:
会发现你的request被load balance到cluster1中的两个app server了。
注意观察以下两项:
com.ibm.websphere.servlet.application.host | c1_svr1 |
这才是基本的集群的作用。
添加新评论2 条评论
2013-02-28 17:47
2012-03-02 21:36