god icon indicating copy to clipboard operation
god copied to clipboard

Enable multiple gods on one system, run by non-root users.

Open lansing opened this issue 13 years ago • 4 comments
trafficstars

The primary change in this pull request causes god to create and use a socket file in a user-specific directory when /var/run/god is not writable. Without this change, spinning up a second god on a box that already has one running will either clobber the first god's socket file, or fail to create a socket file and die at startup.

With this change, each user on a system can run its own independent god. I've been using this patch since February in order to run staging deployments for multiple apps on one server, while reusing the same god configs that are used in these apps' production deployments.

This pull request also includes tests for the changes.

lansing avatar Oct 21 '12 21:10 lansing

Thanks, I really needed this. However, I felt it was really hampered by the need to specify the -p all the time so I added support for a GOD_PORT environment variable. By setting this to 0, one user's instance of god will never clash with another's. I also rebased your changes against the latest. Check it out at chewi/god@0230ddac26dc43c1280730f7dd512c7416a4c8f0.

chewi avatar Apr 24 '13 09:04 chewi

Fixing the location of the socket file to no longer be /tmp is definitely something we've talked about, but I'm definitely concerned with the upgrade path for something like this.

It seems like we need a way to gracefully handle the /tmp location when someone updates the gem on a running system.

Would be interested in input from @mojombo, @jnewland, @tmm1.

eric avatar Jun 03 '13 18:06 eric

I've just rebased my branch against 0.13.3. I'm keen to see this merged as deploying a non-standard version is a real PITA. I can't rely on bundler's ability to use git because that doesn't install the god script to bin. I'm not sure what to do about this migration issue.

chewi avatar Oct 09 '13 15:10 chewi

http://developers.google.com/on system

nima22 avatar May 25 '15 22:05 nima22