-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instructions to setup as systemd service (#30)
- Loading branch information
1 parent
c76b5de
commit 631b830
Showing
2 changed files
with
62 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,34 @@ | ||
# Systemd service for Sidekick | ||
|
||
Systemd script for Sidekick Load Balancer. | ||
|
||
## Installation | ||
|
||
- Systemd script is configured to run the binary from /usr/local/bin/ | ||
- Download the binary from https://github.com/minio/sidekick/releases | ||
|
||
## Create default configuration | ||
|
||
```sh | ||
$ cat <<EOF >> /etc/default/sidekick | ||
# Sidekick options | ||
SIDEKICK_OPTIONS="--health-path=/minio/health/ready --address :8000" | ||
# Sidekick sites | ||
SIDEKICK_SITES="http://172.17.0.{11...18}:9000 http://172.18.0.{11...18}:9000" | ||
EOF | ||
``` | ||
|
||
## Systemctl | ||
|
||
Download sidekick.service in /etc/systemd/system/ | ||
|
||
## Enable startup on boot | ||
|
||
``` | ||
systemctl enable sidekick.service | ||
``` | ||
|
||
## Note | ||
Replace User=nobody and Group=nobody in minio.service file with your local setup user. |
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,28 @@ | ||
[Unit] | ||
Description=Sidekick | ||
Documentation=https://github.com/minio/sidekick/blob/master/README.md | ||
Wants=network-online.target | ||
After=network-online.target | ||
AssertFileIsExecutable=/usr/local/bin/sidekick | ||
|
||
[Service] | ||
User=nobody | ||
Group=nogroup | ||
|
||
EnvironmentFile=/etc/default/sidekick | ||
|
||
ExecStart=/usr/local/bin/sidekick $SIDEKICK_OPTIONS $SIDEKICK_SITES | ||
|
||
# Let systemd restart this service always | ||
Restart=always | ||
|
||
# Specifies the maximum file descriptor number that can be opened by this process | ||
LimitNOFILE=65536 | ||
|
||
# Disable timeout logic and wait until process is stopped | ||
TimeoutStopSec=infinity | ||
SendSIGKILL=no | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|