Question
Dell USA L.P.
BR
Last activity: 26 Sep 2018 9:27 EDT
Clustering PEGA 7.4 on Docker
Greetings everyone!
We are following the guide https://community1.pega.com/community/pega-support/question/how-run-pega-74-docker in order to install PEGA on docker running on Tomcat.
Right now it is working when we have one container for the web application and other container for the database(Postgres). The application works, we can login and navigate on the web application.
When we scale the web application for 2 containers, the container web_1 recognizes the container web_2 and forms a cluster with 2 nodes. But after the cluster is formed, i cannot access the web application anymore and after some time one of the containers stops suddently. And if we try to bring a 3rd web container, automatically other web container goes down.
We tried to set the property on the prconfig.xml file on the web containers with the ip of the docker container to see if this can help, but we still have the same problems:
<env name="identification/cluster/public/address" value="<ip of the container>" />
Here is our docker-compose file to bring up the application:
Greetings everyone!
We are following the guide https://community1.pega.com/community/pega-support/question/how-run-pega-74-docker in order to install PEGA on docker running on Tomcat.
Right now it is working when we have one container for the web application and other container for the database(Postgres). The application works, we can login and navigate on the web application.
When we scale the web application for 2 containers, the container web_1 recognizes the container web_2 and forms a cluster with 2 nodes. But after the cluster is formed, i cannot access the web application anymore and after some time one of the containers stops suddently. And if we try to bring a 3rd web container, automatically other web container goes down.
We tried to set the property on the prconfig.xml file on the web containers with the ip of the docker container to see if this can help, but we still have the same problems:
<env name="identification/cluster/public/address" value="<ip of the container>" />
Here is our docker-compose file to bring up the application:
version: '3'
services:
postgres:
image: "pega74db_baseline"
ports:
- "5432:5432"
environment:
- POSTGRES_USER=pega
- POSTGRES_PASSWORD=pegasys
web:
image: "pega7-tomcat"
ports:
- "5701"
- "5702"
- "5703"
- "5704"
- "5705"
- "5706"
- "5707"
- "5708"
- "5709"
- "5710"
- "8080"
- "8090"
- "9001"
- "47100"
depends_on:
- postgres
environment:
- DB_HOST=pega7dockerimagebuild_postgres_1
We exposed the ports 5701-5710 because the hazelcast use them to comunicates with the other nodes. One curious thing is, when we have the cluster formed with 2 modes, we can see on the logs the property "mode" on the json which represents the cluster, and for both nodes this property has the value "SERVER", is this correct?
We was wondering one node should be the "SERVER" and the other should be something else.
By the way, we saw the disclaimer warning about the image of PEGA 7.4 with tomcat on docker is not ready for run in cluster. There is any image which is ready to run in cluster? There is any guide which shows how to install and configure the PEGA application to run in cluster mode?
"Disclaimer: The image has not been configured to support production system and would not work as-is in a cluster environment. In production, there are many factors to consider when using docker for keeping permanent data safely, especially in swarm mode, or in clusters."
Thanks in advance,
Victor Mota