I'd like to startup an Apache Spark cluster after boot using the following command:
sudo ./path/to/spark/sbin/start-all.sh
Then run this command when the system prepares to reboot/shutdown:
sudo ./path/to/spark/sbin/stop-all.sh
How can I get started? Is there a basic template I can build on?
I've tried to use an extremely simple (file: /lib/systemd/system/spark.service
):
[Unit]
Description=Spark service
[Service]
ExecStart=sudo ./path/to/spark/sbin/start-all.sh
Which doesn't work.