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

Add example systemd unit files #14

Merged
merged 1 commit into from
Nov 10, 2016
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/admin_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The Web UI (Web Console) is a rails application.

All kuroko2 daemons backend is [serverengine gem](https://github.com/fluent/serverengine).

Example systemd unit files are available [here](systemd).


#### job-scheduler

Expand Down
15 changes: 15 additions & 0 deletions docs/systemd/kuroko2-executor.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=Kuroko2 executor

[Service]
Environment=LANG=en_US.UTF-8
Environment=RAILS_ENV=production
Environment=NUM_WORKERS=8
Environment=QUEUE=@default
User=kuroko2
WorkingDirectory=/home/kuroko2/kuroko2/current
ExecStart=/usr/bin/bundle exec rails runner 'Kuroko2::Servers::CommandExecutor.new(log: nil, daemonize: false).run'
KillMode=process

[Install]
WantedBy=multi-user.target
13 changes: 13 additions & 0 deletions docs/systemd/kuroko2-processor.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Kuroko2 processor

[Service]
Environment=LANG=en_US.UTF-8
Environment=RAILS_ENV=production
User=kuroko2
WorkingDirectory=/home/kuroko2/kuroko2/current
ExecStart=/usr/bin/bundle exec rails runner 'Kuroko2::Servers::WorkflowProcessor.new(log: nil, daemonize: false).run'
KillMode=process

[Install]
WantedBy=multi-user.target
13 changes: 13 additions & 0 deletions docs/systemd/kuroko2-scheduler.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Kuroko2 scheduler

[Service]
Environment=LANG=en_US.UTF-8
Environment=RAILS_ENV=production
User=kuroko2
WorkingDirectory=/home/kuroko2/kuroko2/current
ExecStart=/usr/bin/bundle exec rails runner 'Kuroko2::Servers::JobScheduler.new(log: nil, daemonize: false).run'
KillMode=process

[Install]
WantedBy=multi-user.target