중앙 ZooKeeper 클러스터 구성
여러 환경에 중앙 Apache ZooKeeper를 사용하려면 각 ThingWorx 고가용성 클러스터에 대한 ZooKeeper 구성에 네임스페이스를 지정해야 합니다. 그렇지 않으면 모든 구성 요소가 서로 볼 수 있으며 원하지 않을 때에도 잠재적으로 함께 조인될 수 있습니다.
* 
새 ZooKeeper 네임스페이스 설정은 ThingWorx 9.3.0 이상에만 적용할 수 있습니다.
ThingWorx 설정
ThingWorx와 Apache Ignite 둘 다의 네임스페이스를 사용하여 ThingWorx Platform을 구성해야 합니다.
ClusterModeSettings 섹션에서 ZkNamespace를 추가하거나 변경해야 합니다. 자세한 내용은 ThingWorx HA를 위한 플랫폼 설정을 참조하십시오.
"ClusteredModeSettings": {
"ZKNamespace" : "/mycluster",
}
address-resolver 섹션에서 basePath를 업데이트합니다. 이름이 클러스터 모드 이름과 일치할 필요는 없지만 일치하도록 지정할 수는 있습니다.
"cache": {
"provider-type": "com.thingworx.cache.ignite.IgniteCacheProvider",
"ignite": {
"address-resolver" : {
"type": "zookeeper",
"basePath" : "/mycluster"
}
}
}
Ignite 설정
config.xml에서 Ignite를 시작하는 데 사용되는 basePath를 설정합니다. 이름은 ThingWorx 캐시 address-resolver 섹션에서 사용되는 이름과 일치해야 합니다.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.zk.TcpDiscoveryZookeeperIpFinder">
<property name="zkConnectionString" value="zookeeper:2181"/>
<property name="basePath" value="/mycluster"/>
</bean>
</property>
</bean>
</property>
Connection Server 설정
Connection Server의 경우 Connection Server 구성의 discovery 섹션에서 서비스 검색에 사용되는 basePath를 설정할 수 있습니다. 값 접두사는 ThingWorx 클러스터 설정 섹션에서 사용된 값과 일치해야 하며 /services로 끝나야 합니다. 이는 AlwaysOn, eMessage 및 Azure IoT에 적용됩니다.
discovery {
connectionString = "zookeeper:2181"
basePath = "/mycluster/services"
}
컨테이너의 경우
ThingWorx 설정
환경 변수 ZOOKEEPER_BASE_PATHIGNITE_ZK_BASE_PATH를 설정합니다.
ZOOKEEPER_BASE_PATH=/mycluster
IGNITE_ZK_BASE_PATH=/mycluster
Ignite 설정
환경 변수 ZOOKEEPER_BASE_PATH를 설정합니다.
ZOOKEEPER_BASE_PATH=/mycluster
Connection Server 설정
환경 변수 SERVICE_DISCOVERY_BASE_PATH를 아래와 같이 설정합니다. /services는 구성에 내장되어 있기 때문에 지정할 필요가 없습니다. 이는 AlwaysOn, eMessage 및 Azure IoT에 적용됩니다.
SERVICE_DISCOVERY_BASE_PATH=/mycluster
도움이 되셨나요?