Giter Site home page Giter Site logo

Comments (12)

ddollar avatar ddollar commented on May 29, 2024

Would you be interested in putting together a pull request for this?

from foreman.

mlangenberg avatar mlangenberg commented on May 29, 2024

+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.

mrrooijen avatar mrrooijen commented on May 29, 2024

@joevandyk @mlangenberg any of you use Arch Linux with Runit?

from foreman.

mlangenberg avatar mlangenberg commented on May 29, 2024

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.

mrrooijen avatar mrrooijen commented on May 29, 2024

@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.

mlangenberg avatar mlangenberg commented on May 29, 2024

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.

mrrooijen avatar mrrooijen commented on May 29, 2024

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.

mlangenberg avatar mlangenberg commented on May 29, 2024

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.

joevandyk avatar joevandyk commented on May 29, 2024

To run multiple services with runit, I usually just call them resque_1, resque_2, etc.

from foreman.

mlangenberg avatar mlangenberg commented on May 29, 2024

@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.

joevandyk avatar joevandyk commented on May 29, 2024

@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.

mlangenberg avatar mlangenberg commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.