Skip to content

Commit

Permalink
[integrations] systemd: add systemd unit example (#970)
Browse files Browse the repository at this point in the history
Users will likely have to change this to reflect where their binaries
are located, but provides a base example.

Fixes #959.
  • Loading branch information
schallert authored Sep 28, 2018
1 parent 8f46fd4 commit cece4ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/how_to/cluster_hard_way.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ your_m3db_user hard nofile 500000
your_m3db_user soft nofile 500000
```

Alternatively, if you wish to have `m3dbnode` run under `systemd` you can use our [service example](https://github.com/m3db/m3/tree/master/integrations/systemd/m3dbnode.service) which will set sane defaults.

Before running the process make sure the limits are set, if running manually you can raise the limit for the current user with `ulimit -n 500000`.

## Config files
Expand Down
15 changes: 15 additions & 0 deletions integrations/systemd/m3dbnode.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description="M3DB Timeseries Database"
Documentation=http://m3db.github.io/m3/
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/m3dbnode
Restart=on-failure
RestartSecs=10s
SuccessExitStatus=0
LimitNOFILE=500000

[Install]
WantedBy=multi-user.target

0 comments on commit cece4ea

Please sign in to comment.