JRuby deployment options that support multiple versions of JRuby

*爱你&永不变心* 提交于 2019-12-12 02:49:58

问题


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:

  1. solutions that allow git pull deployment
  2. solutions that are rvm friendly
  3. solutions that are not Tomcat based
  4. solutions that are clustering friendly
  5. solutions that handle daemonization, routing, resource management and monitoring on their own
  6. solutions that are mature and actively supported

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, ....) etc


回答1:


probably your best choice would be to do it the "Java-way" using https://github.com/jruby/warbler

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)




回答2:


In the end I opted for a reverse proxy + puma + a process monitoring tool, but it feels like this must 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 jetpack as an alternative, but I haven't had a chance to play with it



来源:https://stackoverflow.com/questions/26585102/jruby-deployment-options-that-support-multiple-versions-of-jruby

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!