Skip to content

Commit

Permalink
Instructions to setup as systemd service (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnasrinivas authored Jun 4, 2020
1 parent c76b5de commit 631b830
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
34 changes: 34 additions & 0 deletions systemd-service/README.md
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.
28 changes: 28 additions & 0 deletions systemd-service/sidekick.service
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

0 comments on commit 631b830

Please sign in to comment.