How to install flink-1.10 on centos7 within Docker

Flink May 19, 2020

Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale. Flink is very fast with low latency and high throughout.

download flink from https://mirrors.tuna.tsinghua.edu.cn/apache/flink/flink-1.10.1/flink-1.10.1-bin-scala_2.11.tgz, here we use scala 2.11 version.

Start centos7 docker container

We want to install flink on three centos7 nodes, so we need to start three docker containers.

docker run --name flink.1 -itd --network ideras --restart always --privileged=true --ip 172.18.0.11 centos:7 /usr/sbin/init
docker run --name flink.2 -itd --network ideras --restart always --privileged=true --ip 172.18.0.12 centos:7 /usr/sbin/init
docker run --name flink.3 -itd --network ideras --restart always --privileged=true --ip 172.18.0.13 centos:7 /usr/sbin/init

Edit /home/app/flink-1.10.1/conf/flink-conf.yaml , setting

jobmanager.rpc.address: 172.18.0.11, 

Edit /home/app/flink-1.10.1/conf/masters

172.18.0.11:8081

Edit /home/app/flink-1.10.1/conf/slaves

172.18.0.12
172.18.0.13

Now copy the flink files from 172.18.0.11 to 172.18.0.12 and 172.18.0.13

Config 172.18.0.11 passwordless ssh login to 172.18.0.12 and 172.18.0.13, if you don't know how to do it, please google it.

/home/app/flink-1.10.1/bin/start-cluster.sh

Now open https://172.18.0.11:8081/, you can see flink's dashboard page.

What's next

Next i will write post about how to setup elasticsearch7 cluster with docker, please wait for it.

Shaoyang Liu

Founder of https://ideras.com and https://blog.ideras.com, write blog about java and node.js technology.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.