집합체 join 명령의 genDeployVariables
옵션을 사용하여 멤버 서버를 집합체에 참여시킬 때 배치 변수(포트)를 할당할 수 있습니다.
genDeployVariables 옵션은 배치 변수를
집합체 저장소에 등록하고 멤버
$WLP_USER_DIR/servers/server_name/configDropins/overrides/deployVariables.xml
파일에 배치 변수를 생성합니다.
프로시저
- 집합체 제어기 server.xml 파일에서 배치 변수를
지정하십시오.
할당되기 원하는 각 포트에 대한 제어기 server.xml 파일에
deployVariable 요소를 추가하십시오. deployVariable은 일반적으로
배치 변수의 이름, 초기 포트 값 및 포트 값을 증분할 양을
지정합니다.
<featureManager>
<feature>servlet-3.0</feature>
<feature>collectiveController-1.0</feature>
</featureManager>
<deployVariable name="PortBase1" value="7000" increment="20"/>
<deployVariable name="PortBase2" value="8000" increment="20"/>
- 집합체에 멤버로서 참여시키려는 서버의 server.xml 파일에서
배치 변수를 사용하는 포트 값을 지정하십시오.
다음 defaultHttpEndpoint 요소는 집합체에 참여시킬 서버의
server.xml 파일에서 배치 변수를 사용하는 포트 값 예를
보여줍니다.
<defaultHttpEndpoint id="httpEndpoint"
host="*"
httpPort="${PortBase1}"
httpsPort="${PortBase1}+1"
httpPort="${PortBase2}"
httpsPort="${PortBase2}+1" />
- 집합체 join 명령을 genDeployVariables
옵션과 함께 실행하십시오.
wlp/bin/collective join memberName --host=controllerHost --port=controllerHTTPSPort
--user=controllerAdminUser --password=controllerAdminUserPassword
--keystorePassword=memberKeystorePassword --genDeployVariables
결과
명령은 서버를 집합체에 멤버로서 참여시키고, 배치 변수를
집합체 저장소에 등록하고, 멤버
$WLP_USER_DIR/servers/serverName/configDropins/overrides/deployVariables.xml
파일에 배치 변수를 생성합니다. 생성된 파일에는 예제 값에 대한 다음 배치 변수가 들어 있습니다.
<server>
<variable name="PortBase1" value="7000"/>
<variable name="PortBase2" value="8000"/>
</server>