Чтобы создать новый кластер, используйте объект AdminTask или AdminConfig. В примере 5.52 объект AdminTask используется для создания кластера с именем T4SCluster путем добавления существующего сервера с именем server2 в члены кластера.
Пример 5.52. Создание кластера серверов
wsadmin>AdminTask.createCluster(‘-interactive’)
Create Server Cluster
Creates a new application server cluster.
1. Cluster Configuration (clusterConfig)
2. Replication Domain (replicationDomain)
3. Convert Server (convertServer)
4. Configure the event service during cluster creation. (eventServiceConfig)
5. Promote Proxy Server Settings To Cluster (promoteProxyServer)
S (Select)
N (Next) C (Cancel) H (Help)
Select [S, N, C, H]: [S] S
Cluster Configuration (clusterConfig)
*Cluster Name (clusterName):
Prefer Local (preferLocal): [true] Cluster Type (clusterType): Short Name of Cluster (shortName): Select [C (Cancel), E (Edit)]: [E]
*Cluster Name (clusterName): testCluster2 Prefer Local (preferLocal): [true] Cluster Type (clusterType): Short Name of Cluster (shortName): Create Server Cluster
Creates a new application server cluster.
1. Cluster Configuration (clusterConfig)
2. Replication Domain (replicationDomain)
3. Convert Server (convertServer)
4. Configure the event service during cluster creation. (eventServiceConfig)
5. Promote Proxy Server Settings To Cluster (promoteProxyServer)
S (Select)
N (Next)
P (Previous) F (Finish) C (Cancel) H (Help)
Select [S, N, P, F, C, H]: [F] N
Create Server Cluster
Creates a new application server cluster.
1. Cluster Configuration (clusterConfig)
2. Replication Domain (replicationDomain)
3. Convert Server (convertServer)
4. Configure the event service during cluster creation. (eventServiceConfig)
5. Promote Proxy Server Settings To Cluster (promoteProxyServer)
S (Select)
N (Next)
P (Previous) F (Finish) C (Cancel) H (Help)
Select [S, N, P, F, C, H]: [F] S Convert Server (convertServer)
Converted Server Node Name (serverNode): Converted Server Name (serverName): Member Weight (memberWeight): Node Group (nodeGroup):
enable data replication (replicatorEntry):
Select [C (Cancel), E (Edit)]: [E] E
Converted Server Node Name (serverNode): kcgg1f3Node01 Converted Server Name (serverName): server2 Member Weight (memberWeight):
Node Group (nodeGroup):
enable data replication (replicatorEntry): Create Server Cluster
Creates a new application server cluster.
1. Cluster Configuration (clusterConfig)
2. Replication Domain (replicationDomain)
3. Convert Server (convertServer)
4. Configure the event service during cluster creation (eventServiceConfig)
5. Promote Proxy Server Settings To Cluster (promoteProxyServer)
S (Select)
N (Next)
P (Previous)
F (Finish) C (Cancel) H (Help)
Select [S, N, P, F, C, H]: [F] F
WASX7278I: Generated command line: AdminTask.createCluster(‘[-clusterConfig [-clusterName testCluster2] — convertServer [-serverNode kcgg1f3Node01
-serverName server2]]’)
‘testCluster2(cells/kcgg1f3Cell01/clusters/testCluster2|cluster.xml#ServerClust er_1154374243841)’
wsadmin>AdminConfig.save()
Объект AdminConfig предоставляет разные методы создания кластеров. Используйте команду convertToCluster, чтобы создать кластер с добавленным в него существующим сервером. Используйте команду create для создания пустого кластера с типом объекта ServerCluster.