Scale your containers with Docker compose and Docker swarm
Aside from the classic all-in-memory deployment, that is available in the docker image javert899/pm4pyws:latest and could be used with the following instructions:
docker pull javert899/pm4pyws:latest
docker run -d -p 80:80 javert899/pm4pyws:latest
We included the possibility to scalably deploy several containers of PM4Py-WS, sharing the same logs and the same database, and not acting in-memory to support a large number of requests and logs.
The scalable deployment is based on the javert899/pm4pyws:multiNode image. It can be deployed using Docker compose and Docker swarm, moreover it can be used in a Minikube/Kubernetes installation.
Steps to use Docker compose to scale the number of containers:
- Pull the image using docker pull javert899/pm4pyws:multiNode
- On Linux, copy the files directory into /opt/files (this is the default path specified in docker compose, if not change it to a path that you like)
- Reach the folder containing the docker-compose.yml file (in the default setting, it is the multinode_compose directory).
- The compose file is thought for the exposition of at most 4 containers, hence the listening (on the same machine) of the ports 80-83 and their re-direction to the port 80 of UWSGI is configured. If you would like to deploy more containers, please change the number accordingly.
- Use the following command to start the three containers: docker-compose up –scale pm4pyws=3
The docker-compose.yml file can be used also to deploy the services into a Docker swarm (the Docker’s default orchestration). Follow the tutorial:
Further information about Kubernetes/Minikube: