Add custom systemd unit for Zookeeper
We're 100% systemd here, and the lack of control/information that the old-school ZK initscript provides is frustrating. Replace it with our own simple unit file.
This commit is contained in:
23
roles/pvc/templates/zookeeper/zookeeper.service.j2
Normal file
23
roles/pvc/templates/zookeeper/zookeeper.service.j2
Normal file
@ -0,0 +1,23 @@
|
||||
# Zookeeper unit - replaces zookeeperd package/initscript
|
||||
# {{ ansible_managed }}
|
||||
|
||||
[Unit]
|
||||
Description = Zookeeper centralized coordination service
|
||||
After = remote-fs.target network.target
|
||||
AssertPathExists = /var/lib/zookeeper
|
||||
|
||||
[Service]
|
||||
Type = simple
|
||||
User = zookeeper
|
||||
Group = zookeeper
|
||||
EnvironmentFile = -/etc/zookeeper/conf/environment
|
||||
EnvironmentFile = -/etc/default/zookeeper
|
||||
ExecStart = /usr/bin/java \
|
||||
-cp $CLASSPATH \
|
||||
$JAVA_OPTS \
|
||||
-Dzookeeper.log.dir=${ZOO_LOG_DIR} \
|
||||
-Dzookeeper.root.logger=${ZOO_LOG4J_PROP} \
|
||||
$ZOOMAIN $ZOOCFG
|
||||
|
||||
[Install]
|
||||
WantedBy = multi-user.target
|
Reference in New Issue
Block a user