forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add systemd service-file for clickhouse-keeper
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[Unit] | ||
Description=ClickHouse Keeper - zookeeper compatible distributed coordination server | ||
Requires=network-online.target | ||
# NOTE: that After/Wants=time-sync.target is not enough, you need to ensure | ||
# that the time was adjusted already, if you use systemd-timesyncd you are | ||
# safe, but if you use ntp or some other daemon, you should configure it | ||
# additionaly. | ||
After=time-sync.target network-online.target | ||
Wants=time-sync.target | ||
|
||
[Service] | ||
Type=simple | ||
User=clickhouse | ||
Group=clickhouse | ||
Restart=always | ||
RestartSec=30 | ||
RuntimeDirectory=%p # %p is resolved to the systemd unit name | ||
ExecStart=/usr/bin/clickhouse-keeper --config=/etc/clickhouse-keeper/keeper_config.xml --pid-file=%t/%p/%p.pid | ||
# Minus means that this file is optional. | ||
EnvironmentFile=-/etc/default/%p | ||
LimitCORE=infinity | ||
LimitNOFILE=500000 | ||
CapabilityBoundingSet=CAP_NET_ADMIN CAP_IPC_LOCK CAP_SYS_NICE CAP_NET_BIND_SERVICE | ||
|
||
[Install] | ||
# ClickHouse should not start from the rescue shell (rescue.target). | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters