Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[contrib] systemd: add systemd unit example #970

Merged
merged 3 commits into from
Sep 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if we should include the config flag within this ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah damn good catch, opened #974

Restart=on-failure
RestartSecs=10s
SuccessExitStatus=0
LimitNOFILE=500000

[Install]
WantedBy=multi-user.target