Comments (12)
Would you be interested in putting together a pull request for this?
from foreman.
+1
I don't need the support right now, since the single process that is additional to Apache/Passenger already has a nice runit script, but I would use it in the future.
from foreman.
@joevandyk @mlangenberg any of you use Arch Linux with Runit?
from foreman.
Sorry, I am using it on a Debian machine. Shouldn't be much different,
right?
On Wed, Jul 6, 2011 at 1:36 PM, meskyanichi <
[email protected]>wrote:
@joevandyk @mlangenberg any of you use Arch Linux with Runit?
Reply to this email directly or view it on GitHub:
#28 (comment)
from foreman.
@mlangenberg Arch uses Inittab by default, but I'm not sure how to replace that with Upstart or Runit. Not too much of a sys-admin myself. :)
from foreman.
I choose the use Runit because I did not want to replace the default init
system at all. ;-)
Since I am using Runit next to init, I don't think I will be of much help.
Sorry for that.
On Wed, Jul 6, 2011 at 2:35 PM, meskyanichi <
[email protected]>wrote:
@mlangenberg Arch uses Inittab by default, but I'm not sure how to replace
that with Upstart or Runit. Not too much of a sys-admin myself. :)Reply to this email directly or view it on GitHub:
#28 (comment)
from foreman.
Oh, I didn't know you could run it "next" to inittab. (Yeah, not really a sys-admin, I thought you would have to replace it). The only reason I want to use Runit is so I don't have to use inittab with Foreman. I guess if I could install it separately then that would be fine. Don't care about replacing inittab with runit if I can use runit with foreman regardless.
from foreman.
Okay I looked a bit into this and I would not directly say it is fairly simple. Of course it is not impossible either.
The way runit works is that you need to setup a very specific directory structure, with executable files for a run
script and additional hooks. To enable logging, add a log
subdir with a run
script that wraps around svlogd
. To set environment variables, create an env
directory with a file for every variable you want to set. It's actually pretty simple and straightforward.
I really like the way runit works. No messing around with pid files. And it handles stdout and logging well. It only gets annoying when you actually need more than one instance of the same process running. As far as I know, there is no easy way to do this.
After you copy a service
directory tree. To add, let's say, a new Resque worker. You need to make tiny modifications to things like the log location. There is no easy way to add a few more workers, without doing a bunch of manual work. If you have multiple app servers, this is a real pain.
So I might put some effort into this feature request this week. It looks promising to be able to generate the whole runit services directory for my app automatically.
By the way, how do the current exports handle namespacing? For instance our application servers run multiple Rails applications in multiple environments. That means a unique service name could be myapp-staging-worker-2
, right? Is that possible already?
from foreman.
To run multiple services with runit, I usually just call them resque_1, resque_2, etc.
from foreman.
@joevandyk Are you willing post your resque runit configuration to serve as an example?
How do you currently handling scaling the number of Resque workers on multiple app servers? I think it would ease the pain if foreman could export the configuration to runit, what are your ideas?
from foreman.
@mlangenberg there's not much to it, really. Append _1, _2, etc to the names and paths to the job's directory and to the log paths.
from foreman.
Alright I made a first version of the Runit export today. It is working pretty well. The only thing that you have to do yourself is to manage the creation and removing of symlinks in the /etc/service directory. I will provide some capistrano scripts for this, since I don't think it should be part of Foreman.
Let me work on some specs before I ask for a pull request.
from foreman.
Related Issues (20)
- Odd error message when you skip the 'start' command and include a -f
- Using RuboCop?
- issue killing subprocesses using `cd` with failure at startup HOT 1
- breakpoint vscode not work to Ruby
- After the foreman finishes, the ruby process continues to exist HOT 2
- Release 1.0? HOT 1
- About link is broken HOT 1
- Foreman does not terminate child process HOT 3
- Forman doesn't show errors and logs of Procfile commands HOT 3
- Change https://ddollar.github.com/foreman to https://ddollar.github.io/foreman on repo description link
- Port 5000 taken by Mac OSX HOT 1
- When launching rails via foreman, rails asset pipeline errors
- Support for x64-mingw-ucrt platform
- Version Optimize
- Document that Foreman secretly sets the PORT environment variable to 5000 HOT 1
- Error after running command "foreman start"
- foreman export systemd raises undefined method `exists?' for File:Class (NoMethodError) HOT 1
- Security CVE-2022-3874 HOT 4
- Usage Error: Unrecognized or legacy configuration settings found
- Ruby32-x64/lib/ruby/gems/3.2.0/gems/foreman-0.87.2/lib/foreman/engine.rb:201:in `kill': Invalid argument (Errno::EINVAL)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foreman.