[chef] Re: Re: Re: Rails Recommendations


Chronological Thread 
  • From: Vladimir Skubriev < >
  • To:
  • Subject: [chef] Re: Re: Re: Rails Recommendations
  • Date: Mon, 1 Sep 2014 21:13:42 +0400




2014-09-01 19:03 GMT+04:00 Angus Buchanan < " target="_blank"> >:
Hi Vladimir,


On Mon, Sep 1, 2014 at 11:16 AM, Vladimir Skubriev < " target="_blank"> > wrote:

You can use them. But you need to remember that you will spend a decent amount of time with testing and learning this cookbooks. Other case - use chef and write you own recipe based on default HOW_TO to setup rails application and what you need. Everywhere when you use chef cookbook's - add time to their study and testing. Automating needed in those places where it is absolutely necessary and can save a time.

Most of the how-to docs I see are very much focussed on a development setup, rather than something in production.  But it seems pretty straightforward.  One question would be whether to have a deploy user if using capistrano, or just to deploy as the user created for running the app.  Any suggestions?
 
I would choose the second method(just deploy as the user), because I think capistrano is the next high level abstraction, which involves additional time. I think you dont't know what use case is choose, then lakely capistrano not necessar at this time.
 
That's good approach, but you should learn packaging system policy's documents. This is not easy way. But it's is you right.

I think with Omnibus I can just shove everything in /opt, and update the vhost... this also solves Ruby problems.  I'm quite convinced this is a good idea, but I couldn't find any article or example of packaging Ruby, and some Gems, and the app itself.  I guess I could try to make Jenkins build the package too.... this seems quite a nice approach.  What do you think? 
Jenkins for package building/updating is cool idea. I cannot advice in package building in you use case. But I can suggest you. I think that you myst start from simple application cookbook, that includes very minimal of community cookbooks as much as possible in the beginning. Write deploy as you see it for yourself. If you want to use community cookbooks you is always free in this. But ensure, that complexity level is will grow. Best of all, when it happens gradually. As required. So you can control the workflow and conduct normal work planning. The work should be gradual.The main thing to consider the process of updating a running system. It must be the most transparent to you as a professional who serves the application. 

3) What's the recommended way to get Ruby on the system?  I am not very keen on the idea of using rvm on servers, but system packages tend to lag too.  What is recommended?
 
You don't have a another way except using rvm or rbenv. Better to use rvm and install them for the user. Why better - because rvm more elegant way to use ruby on the system. There are a good cookbook chef-rvm to do it.

Well... in Omnibus the Ruby is built for me... problem solved!

If you already used this approach - then that's right for you.
 
Passenger is a default app server (Should be enough).
See passenger cookbook if you wish to install them with chef. But in simple approach I recommend to install them manually with chef bash scripts. You can see a redmine cookbook for example.

OK cool.  What about unicorn and puma?  Why are these so popular if passenger is so simple?  I prefer the simple approach, I think.
 
As far as I've heard - Unicorn faster and very simple.
Passenger (Firefox), Unicorn (Chrome) ;)
 
5) What about database stuff?  I see there's a database cookbook with some powerful tools, and a mysql cookbook, but should I try to seed the database with Chef or do that manually?

You can use database cookbook, but you pay for that you time. In a simple production  case just create a db manually and connect to it from you application. If you need to create a test environment then use database cookbook (recipe) for complete deploy test environment in vagrant machine with kitchen.ci for example. I think this is a very simple use case.

I don't really understand this... but never mind.

-aob



--
Faithfully yours,

CVision Lab System Administrator
Vladimir Skubriev




Archive powered by MHonArc 2.6.16.

§