-
Notifications
You must be signed in to change notification settings - Fork 117
installation/running instructions #45
Comments
It's a standard ruby rack application, installation depends on many many factors like what webserver you use - but its installed just like any other sinatra or rack application so its not needed to document that here when there are 100s of other good docs about this already. The specific stuff that needs to be done to configure the application once deployed like any other rack app is documented here. We publish a gdash gem to rubygems already. |
Try this: http://yehudakatz.com/2010/04/02/using-gemspecs-as-intended/ I had to add some lines to the top of the gdash.gemspec to get it to work.
Then you just build it and install it:
And then I run it like this:
And you are good to go. |
@ripienaar IMHO you shouldn't expect of your users they should research and familiarize themselves with the entire build and installation process of ruby apps (if they don't want to). isn't this application targeted at people who just want to run a dashboard for graphite? I think it would make sense to just document the needed steps to get it up and running, so that those of us who are not familiar with ruby can get it running quickly. If it wasn't for @dillera (thanks btw!) it would have taken me much time to have figured out those missing lines in the gemspec, because without these lines it didn't work indeed. i got this error:
and do I have to install the gem as root? I'm getting this:
(notice also how the gem that is built is 0.0.2 but it tries to install 0.0.4) |
you dont need to build the gem, its on rubygems, just gem install gdash and it will pull in whatever dependencies it needs. Like I pointed out the install process varies massively between webservers, local deploy methods, do you use bundler or not. It's a problem with the ruby ecosystem, too many options and no real single direction. I cannot document every possible install process. The general ruby trend now is to use bundler, the gem is setup for bundler. But as you can see from above examples not everyone does it this way - some dont use bundler as there are many methods some people even think they need to edit libdirs and whatever but its not needed. How you do it will also differ based on what you want to run the app in, I use apache and passenger for my production deploy othrs use nginx, or unicorn or just webrick, many many ways. So for me I chose the bundler method so install bundler with "gem install bundler". So I create a new empty directory where i want to isntall it and set it up like: % ls config config.ru Gemfile graph_templates the config is as per the readme as is graph_templates, config.ru is the one in the top of the github repo. The Gemfile is here: source 'http://rubygems.org' gem 'gdash' Now all you have to do to install gdash, the graph dsl and every dependency it needs: % bundle install --deployment Installing graphite_graph (0.0.4) Using redcarpet (2.1.1) Using rack (1.4.1) Using rack-protection (1.2.0) Using tilt (1.3.3) Using sinatra (1.3.2) Installing gdash (0.0.4) Using bundler (1.1.3) Updating .gem files in vendor/cache Your bundle is complete! It was installed into ./vendor/bundle Note this can be run as a normal user and it installs into vendor all the dependnecies, no need to use root or modify the system in any way Run it: % bundle exec rackup [2012-07-12 19:12:57] INFO WEBrick 1.3.1 [2012-07-12 19:12:57] INFO ruby 1.8.7 (2011-06-30) [x86_64-linux] [2012-07-12 19:12:57] INFO WEBrick::HTTPServer#start: pid=12297 port=9292 |
Its very useful to be able to edit some things locally in the source, then build your own gem and use it. This is what I need to do, and pulling the gem from rubygems is not a good solution in all cases. |
@dillera yeah, not against it and wont do anything to stop it - but it just shows further that everyone has their way, no generic install method exist |
You should definitely use rbenv: (and then you won't have to use root) https://gist.github.com/2760597 This will allow you to keep multiple Rubies in your home dir/user space and leave the system ruby alone. Also, you are building 0.0.4 if you clone this and built it. Perhaps 0.0.2 is on rubygems? |
Guys I have no experience in Ruby, can I ask that if anyone has a configuration that works on Centos can they share the instructions please. |
@alrighttheresham This is a fair criticism. @ripienaar A simple paragraph in the README on how to build/install would be helpful. Not being a ruby-ite I'm of little use here :/ |
He gave a fine example above, the most generic install is one command:
If you are asking for directions on how to use it, that is another thing. |
I also explained why it's not possible - there are literally 10s of ways to deploy a ruby application. It varies massively from distro to distro, rvm to rbenv to chruby and every other crazy thing people do with ruby. It's just not possible - however this application complies with the design of any other Rack application so any guide about Rack and your distribution should apply just fine. |
ripienaar I understand your position, problem is there is nowhere that shows how to quickly put all this together with even one use case / combination. Since I commented on this, I have a found a solution that works on centos 6.3. For people like me that dont understand the nuances of ruby please see below. Hopefully this is helpful to others, I recognise that there are things here that may be done better, but it works and allows me to continue evaluating gdash as a solution. The passenger module part of the apache config is brittle, but other than that its probably ok. Again ripienaar thanks for the product, so far it looks like its a great fit for our needs. Graphite dependencies
|
@alrighttheresham do you want to contribute a README.redhat.md or something similar into the project? I'd be glad to merge something like that. Or if you have a blog - blog about it and we'll link to that. However, you're example shows how a "A simple paragraph in the README" just won't cut it :) |
@ripienaar no blog, too old ;-) I put what I did recently on github, which was a Vargrant based CentOS VM with gdash / statsd / graphite on github. Link is available here. Feel free to use / copy / promote any way you feel appropriate. |
would be great if you send a pull request with your work in it - then you'll get the right credit etc |
This is great stuff guys. I was thinking a paragraph just for gdash :). e.g: cd gdash/
sudo gem update # go read War and Peace
sudo gem install bundler
sudo gem install foreman
bundle install --deployment
cp config/gdash.yaml-sample config/gdash.yaml
# edit config/gdash.yaml
# add some graphs
# create a Procfile: http://ddollar.github.com/foreman/
foreman start Or something to that effect |
No, do not recommend 'sudo gem update'. |
@sodabrew - understood. As this is an operations-centric tool, whereby you really don't need to be a rubyist to desire to use it, or even need to modify it, a yellow-brick road of instructions based on current ruby best practices would go a long way to making it broadly accessible. |
Ok, you don't understand. As part of setting up one application, you would update gems in the local bundle. Not the entire system. Period. |
Indeed, that seems to be true. Thanks for pointing that out. Your point reenforces my earlier suggestion: advise a handful commands to Graphite, while being python project, doesn't require that you know python On Thu, Dec 13, 2012 at 10:20 AM, Aaron Stone notifications@github.comwrote:
|
I totally agree that there should be a "here's one simple way of getting this running, see also { other links } for larger installations" README-style doc, +1 to that. Sorry for the strong response, yes it can be a steep learning curve to deploy a Ruby app. |
please provide instructions on how to install this, which dependencies are needed, and how to run it.
do we have to build a gem first and then install the gem? what's the command to execute the server?
The text was updated successfully, but these errors were encountered: