ripienaar / gdash

A dashboard for Graphite
http://www.devco.net/
Apache License 2.0
754 stars 117 forks source link

Feature Request: Package with JRuby #58

Open falkenbt opened 12 years ago

falkenbt commented 12 years ago

Due to the miserable state of support for ruby > 1.8.5 on most linux distros (redhat, centos in our case) I would appreciate a JRuby packaging so gdash can be easily installed run in any environment that provides a JVM. I'm not a ruby expert so I don't know how much effort this would be (I have seen some native extensions that are being compiled within redcarpet). If someone would give me a heads-up on how to get started I would be happy to contribute.

alrighttheresham commented 12 years ago

+1

sodabrew commented 11 years ago

Please do investigate!

falkenbt commented 11 years ago

I have come up with something in my local repo, I will look further into it and create a PR soon.

keymon commented 11 years ago

Why don't just use rvm: https://rvm.io/rvm/install/. You can create a gdash user, install RVM for that user, install the passenger gem, clone the gdash repo and just run passenger there. Something like this:

sudo useradd gdash
curl -kL https://get.rvm.io | sudo -u gdash -i bash -s stable --gems=passenger
sudo -u gdash -i git clone http://github.com/ripienaar/gdash.git
sudo -u gdash -i 'cd gdash; passenger start'
falkenbt commented 11 years ago

This is certanly a nice and simple procedure if you have... a) root access / the ability to add users b) internet access on the machine c) trust in https://get.rvm.io d) no policies that prevent installation of e.g. rvm

In my case, none of these criteria are fulfilled unfortunately. Creating a simple jar would make things much easier for us. I did this with warble. The downside is that the config is inside the jar as well but I'm sure there is a way to have it outside of the jar or to pass cmd-line args.

Another way would be to just run in with jruby without packaging anything. But this requires you need to have jruby installed on the target machine.

keymon commented 11 years ago

I commented the part of creating the user just for simplicity, but it is no required, you can use your local user. Actually, no root access is one of the motivations to use RVM. About trusting get.rvm.io... well you are trusting gdash, jruby and all the gems required ;). Internet access: you can always generate the rvm subdirectory in a different box with same binary specs and copy it.

But I understand the frustration of these policies, and if bundle it in a .jar helps to be compliance, that is welcome.

falkenbt commented 11 years ago

I get your points and I'm also not sure if java bundling will be the way to go. But obviously there is a demand, so I gave it a shot: https://github.com/ripienaar/gdash/tree/jruby Deliberately in a separate branch because it's far from being final or stable - notice the README.md. But I would be glad if anyone would like to test and give feedback (or even better: improve :-) )