I'm looking for a way to deploy multiple JRuby apps on a single server, the apps are in different stages and hence use different versions of JRuby, in the long term it would be pretty complicated to try and sync all of the applications with all of the application servers, so I'm looking something akin to Phusion Passenger 4 in the Javaland.
Apparently Passenger allows something like this, but there's no documentation available how such a setup should work. Torquebox doesn't mention this use case in their docs.
Bonus points for:<ol><li>solutions that allow
git pulldeployment</li> <li>solutions that are
rvmfriendly</li> <li>solutions that are not Tomcat based</li> <li>solutions that are clustering friendly</li> <li>solutions that handle daemonization, routing, resource management and monitoring on their own</li> <li>solutions that are mature and actively supported</li> </ol>
So far everything I've looked at failed on some of the points, torquebox doesn't seem to support multiple jruby versions, trinidad is tomcat, puma requires some of hand-holding (process monitoring, reverse proxy, ....) etcAnswer1:
probably your best choice would be to do it the "Java-way" using <a href="https://github.com/jruby/warbler" rel="nofollow">https://github.com/jruby/warbler</a>
you'll end up with a .war that packs the JRuby's jars in the archive thus each app will have it's own version of JRuby. this of course requires you to setup a Java application server (such as Tomcat), the deployment process would usually mean copying the packaged .war into the server's deployment folder.
be aware that this will likely require a lot of memory since none of the libraries JRuby uses will be shared (also with some servers you need to make sure the class-loader does look at the war's jars first during a specific deployment configuration option)Answer2:
In the end I opted for a reverse proxy + puma + a process monitoring tool, but it feels like this <em>must</em> be simpler somehow - without three distinct pieces of software working together to make it happen.
Pros are that it's rvm compatible, can support multiple rubies through multiple puma processes and allows git pull deployments
There's also <a href="https://github.com/square/jetpack" rel="nofollow">jetpack</a> as an alternative, but I haven't had a chance to play with it