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:
2019-08-26 10:05:31 -04:00
parent 9b2e12e69b
commit ef9673de02
2 changed files with 35 additions and 2 deletions

View 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