ThingWorx 고가용성 > ThingWorx HA의 ThingWorx Flow
ThingWorx HA의 ThingWorx Flow
ThingWorx Flow를 위해 ThingWorx Foundation HA 인스턴스 준비 완료
ThingWorx Flow를 위해 고가용성 ThingWorx Foundation 인스턴스를 준비하려면 다음 단계를 완료하십시오.
1. ThingWorx Foundation 시스템에서 ThingWorx-Foundation 서비스를 중지합니다.
2. ThingWorx Foundation 시스템에서 HTTPS_PORT 환경 변수를 설정합니다. 자세한 내용은 ThingWorx Platform에 대한 SSL/TLS 구성을 참조하십시오.
ThingWorx HA의 ThingWorx Flow와 관련된 설치 단계
ThingWorx HA 환경에서 ThingWorx Flow를 설치할 경우 ThingWorx Flow 설치 관리자의 ThingWorx Flow 구성 정보 화면에 관련된 다음 사항에 유의하십시오. 전체 ThingWorx Flow 설치 프로세스는 여기서 확인할 수 있습니다.
사전 요구 사항
ThingWorx Foundation 시스템 중 하나에서 ThingWorx Flow 시스템으로 platform-settings.json 파일을 복사합니다.
단계
1. ThingWorx Foundation의 IP 주소 또는 호스트 이름 필드에서 부하 분산(HAProxy)의 호스트 이름을 지정합니다.
2. ThingWorx Foundation의 로컬 포트 필드에서 ThingWorx Foundation가 배포되는 HTTPS 포트를 지정합니다. 기본값은 8443입니다.
3. Foundation 액세스용 프로토콜에서 HTTPS(보안)를 선택합니다.
4. ThingWorx Foundation 설정 파일 경로(platform-settings.json) 필드에서 을 클릭하여 ThingWorx Flow 시스템에서 로컬 platform-settings.json 파일의 위치를 지정합니다.
사후 설치 단계
1. ThingWorx Foundation 시스템에서는 ThingWorx Flow 시스템에서 사용할 수 있는 platform-settings.json 파일에서 OrchestrationSettings 섹션(ThingWorx Flow 설정)을 복사합니다. 자세한 내용은 platform-settings.json 파일에서 ThingWorx Flow 설정을 참조하십시오.
2. ThingWorx Foundation 시스템에서는 ThingWorx Foundation 키 저장소에 ThingWorx Flow 비밀 키를 저장하여 ThingWorx FlowThingWorx Foundation 간의 보안 통신을 설정합니다. 이 작업을 수행하는 자세한 단계는 여기에서 확인할 수 있습니다.
ThingWorx HA에서 ThingWorx Flow 구성
다음 파일에서 모든 <NGinx 호스트>:<NGinx 포트> 항목을 <부하 분산 호스트>:<부하 분산 포트>로 대체합니다.
1. <ThingWorx Flow 설치 폴더>\modules\ux\deploymentConfig.json 파일에서 다음을
"api_endpoint": "https://<NGinx 호스트>:<NGinx 포트>/Thingworx/Flow",
"ENDPOINT": "http://localhost:8003",
"view": {
"oauth_server": "https://<NGinx 호스트>:<NGinx 포트>/Thingworx/Oauths"
},
"oauth": {
"host": "http://localhost:7070"
},
"service_api_endpoint": "https://<NGinx 호스트>:<NGinx 포트>/Thingworx/Lookups",
"lookup": {
"host": "http://localhost:8077"
},
"trigger_server": {
"host": "http://localhost:8004"
},
"twx_endpoint": "https://<부하 분산 호스트>:<부하 분산 포트>/Thingworx"
다음으로 변경합니다.
"api_endpoint": "https://<부하 분산 호스트>:<부하 분산 포트>/Thingworx/Flow",
"ENDPOINT": "http://localhost:8003",
"view": {
"oauth_server": "https://<부하 분산 호스트>:<부하 분산 포트>/Thingworx/Oauths"
},
"oauth": {
"host": "http://localhost:7070"
},
"service_api_endpoint": "https://<부하 분산 호스트>:<부하 분산 포트>/Thingworx/Lookups",
"lookup": {
"host": "http://localhost:8077"
},
"trigger_server": {
"host": "http://localhost:8004"
},
"twx_endpoint": "https://<부하 분산 호스트>:<부하 분산 포트>/Thingworx"
2. <ThingWorx Flow 설치 폴더>\modules\lookup\deploymentConfig.json 파일에서 다음을
"ENDPOINT": "https://<NGinx 호스트>:<NGinx 포트>/Thingworx/Lookups"
다음으로 변경합니다.
"ENDPOINT": https://<부하 분산 호스트>:<부하 분산 포트>/Thingworx/Lookups
3. <ThingWorx Flow 설치 폴더>\modules\oauth\deploymentConfig.json 파일에서 다음을 수행합니다.
a. 다음을
"UI_ENDPOINT": "https://<NGinx 호스트>:<NGinx 포트>/Thingworx/Composer/apps/flow",
"ENDPOINT": "https://<NGinx 호스트>:<NGinx 포트>/Thingworx/Oauths"
다음으로 변경합니다.
"UI_ENDPOINT": "https://<부하 분산 호스트>:<부하 분산 포트>/Thingworx/Composer/apps/flow",
"ENDPOINT": "https://<부하 분산 호스트>:<부하 분산 포트>/Thingworx/Oauths"
b. 부하 분산 호스트 이름이 WHITE_LIST_DOMAINS 섹션:
"WHITE_LIST_DOMAINS": [
"<NGinx 호스트>",
"<부하 분산 호스트>",
"localhost"
에 나타나는지 확인합니다.
4. <ThingWorx Flow 설치 폴더>\modules\trigger\deploymentConfig.json 파일에서 다음을
"DOMAIN": "https://<NGinx 호스트>:<NGinx 포트>/Thingworx/Triggers",
"LISTENER_URL": "http://localhost:8004",
"TRIGGER_HOST": "https://<NGinx 호스트>:<NGinx 포트>/Thingworx/Triggers"
다음으로 변경합니다.
"DOMAIN": "https://<부하 분산 호스트>:<부하 분산 포트>/Thingworx/Triggers",
"LISTENER_URL": "http://localhost:8004",
"TRIGGER_HOST":https://<부하 분산 호스트>:<부하 분산 포트>/Thingworx/Triggers"
ThingWorx Flow에 대한 부하 분산 구성
사전 요구 사항
ThingWorx Flow의 경우 부하 분산을 HTTPS로 설치해야 합니다. 자세한 내용은 HAProxy에 대한 SSL/TLS 구성을 참조하십시오.
단계
1. 라우팅을 ThingWorx Flow로 이동할 수 있도록 부하 분산을 구성합니다. 자세한 내용은 ThingWorx 고가용성을 위한 부하 분산을 참조하십시오.
2. ThingWorx HA 환경에 ThingWorx Flow를 설치한 경우 frontend 섹션에서 포트 및 인증서를 바인딩합니다. 자세한 내용은 ThingWorx Flow에 대한 프런트엔드 정보를 참조하십시오.
3. ThingWorx Flow backend 구성 정보를 추가합니다. 자세한 내용은 ThingWorx Flow에 대한 백엔드 정보를 참조하십시오.
4. 부하 분산을 위한 자체 서명된 인증서를 만듭니다. 자세한 내용은 자체 서명된 인증서 만들기를 참조하십시오.
ThingWorx Flow에 대한 frontendbackend 구성 예는 HAProxy 예제에서 확인할 수 있습니다.
서버 시작
다음 순서로 서버를 시작합니다.
1. RabbitMQ를 시작합니다.
RabbitMQ 로그 파일을 검사하여 RabbitMQ가 시작되었는지 확인합니다.
Windows: <ThingWorx Flow 설치 위치>\modules\RabbitMQ\log
Linux: /var/log/rabbitmq
2. ZooKeeper를 시작합니다. 두 개 이상의 Zookeeper가 있는 경우 다른 Zookeeper 서버를 시작합니다.
명령 프롬프트/터미널을 사용하여 Zookeeper 서버가 시작되었는지 확인합니다.
3. ThingWorx 플랫폼 인스턴스를 하나씩 시작합니다. 예를 들면 platform1, platform 2 등입니다.
<공유 스토리지 경로>/ThingworxStorage/logs/ApplicationLog.log 파일을 검사하여 ThingWorx 플랫폼 인스턴스가 시작되었는지 확인합니다. 특정 ThingWorx 플랫폼 인스턴스에 대한 로그 파일에는 플랫폼 인스턴스 이름이 포함되어 있습니다.
4. Nginx 서버를 시작합니다.
Nginx 로그 파일을 검사하여 Nginx 서버가 시작되었는지 확인합니다.
Windows: C:\Program Files\nginx-<버전>\logs
Linux: /var/log/nginx
5. ThingWorx Flow 서버를 시작합니다.
확인하려면 명령 프롬프트 또는 터미널을 관리자 권한으로 시작하고 다음 명령을 실행합니다.
Windows: pm2 ls
Linux: sudo pm2 ls
6. HAProxy(부하 분산)를 시작합니다.
HAProxy(부하 분산)의 통계 보고서에 액세스하여 모든 항목이 실행 중인지 확인합니다.
http://{load_balancer_host_with_full_domain}:1936/
haproxy.cfg에서 구성한 <통계 사용자><통계 암호>를 제공하여 로그인합니다.
도움이 되셨나요?