Deploy flink in docker swarm mode
Deploy flink in docker swarm mode
docker network create -d overlay --attachable --scope=swarm flink
(if your network is named differently you have to adjust deploy.sh
)Build the images withcd worker && docker build -t docker-swarm-flink-worker .
andcd master && docker build -t docker-swarm-flink-master .
Adjust deploy.sh
by setting MASTER_NODE
to the address of your master node
Deploy using deploy.sh up
Remove using deploy.sh down
--endpoint-mode dnsrr
in the script and because you cannot to this with stack deploy
this deploy script is necessary in the first place.deploy.sh --javaopts "-XX:+UseG1GC" up
, because I’ve encountered some problems using java’s default garbage collection.