How to build logstash into a jar

Hi all, I want to build logstash into a jar, and deploy this jar to my cluster. I found "warble" to be able to build jruby code into jar. I managed to get logstash.jar using warble, but when I run the jar file I got this error (bin/bundle is missing...) :

Any help ? Thanks!

$ java -jar ./hcd_logstash.jar -f ./test1.conf
LoadError: no such file to load -- hcd_logstash/bin/bundle
load at org/jruby/RubyKernel.java:1059
(root) at file:/Users/shawn/codelab/hcd_logstash/hcd_logstash.jar!/META-INF/main.rb:1
require at org/jruby/RubyKernel.java:1040
(root) at /var/folders/rc/49k763cs3yn3d242qb3yfl2r0000gn/T/jruby5771743501305508191extract/jruby-stdlib-1.7.22.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
require at /var/folders/rc/49k763cs3yn3d242qb3yfl2r0000gn/T/jruby5771743501305508191extract/jruby-stdlib-1.7.22.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54
ERROR: org.jruby.embed.EvalFailedException: (LoadError) no such file to load -- hcd_logstash/bin/bundle

1 Like

This is not currently a supported deployment model.

Even when it is not a supported deployment model, I am wondering whether it is possible to reuse parts of logstash code in other projects.

My intention is to reuse the grok parser code (from logstash-plugins/logstash-filter-grok) in other parts of a project I need to make compatible with logstash. Is that something doable? Any pointers would be much appreciated.