hpc-cloud/roles/cassandra/templates/cassandra.service

20 lines
554 B
SYSTEMD
Raw Permalink Normal View History

2017-06-13 12:08:41 +02:00
[Unit]
Description=Cassandra Container
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker stop %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStartPre=/usr/bin/docker pull cassandra:3.10
ExecStart=/usr/bin/docker run --name %n -v /srv/lib/cassandra:/var/lib/cassandra \
-p 7000:7000 -p 7001:7001 -p 7199:7199 -p 9042:9042 -p 9160:9160 \
-e CASSANDRA_BROADCAST_ADDRESS={{ansible_default_ipv4.address}} \
-e CASSANDRA_START_RPC=True \
2017-07-31 13:21:03 +02:00
cassandra:3.10
2017-06-13 12:08:41 +02:00
[Install]
WantedBy=multi-user.target