0
votes

I've installed Apache Flink cluster with Job Manger and 2 Task Manager machines on Debian. Documentation says that bin/start-cluster.sh should be run to start the cluster, which works just fine. However, what is the best way to start the cluster when server boots up?

I can think of 3 options: use supervisord, use init.d script, make it a service

Suggestions?

1
We run it as a systemd service and it works well for us. The init.d vs systemd decision should be based on what your machines are already using. I assume it will probably be systemd on recent versions of Debian - Frank Lauterwald
Thanks @FrankLauterwald, this is exactly what I was leaning towards. - Ivan Naumenko

1 Answers

2
votes

For completion an example script running on Ubuntu 16.04. .

[Unit]
Description=Apache Flink
Requires=network.target remote-fs.target
After=network.target remote-fs.target


[Service]
Type=forking
User=flink
ExecStart=/opt/flink/bin/start-cluster.sh
ExecStop=/opt/flink/bin/stop-cluster.sh
Restart=always

[Install]
WantedBy=multi-user.target