Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is chef an overkill for my simple IT infrastructure needs?

I'm a full stack developer that owns a few Ruby on Rails applications. Currently I use Capistrano to provision the few (~5) VPS where my apps run, but I'm looking for alternatives to have a more reliable automation process (Capistrano is much better suited for deployment).

The obvious choice was chef (because I already know Ruby) but after toying around a few days it's not clear that it's the best choice: Chef client-server architecture looks like an overkill for my needs. I don't want to run a server.

I've read a book (Reliably Deploying Rails Applications) that suggest chef-solo, but when then I go to the homepage and it's says it's deprecated and I don't want to learn something that will get out of date fast. Still I get it running, I try bundle exec knife cookbook create (version 13) and says that it doesn't work any more, that I should download chefDK. I just installed chef by my Gemfile that was fine but ChefDK it's big, I just want something simple to reliable deploy a few boxes. It looks like there are a lot of moving parts, stuff that is getting out of date, etc.

So, I know that Chef is great software for managing big infrastructure, but it looks like it's too complex for my use case. What do you think? Do you suggest me to proceed or try for something else (ansible is marketed as being simpler for example)? Thanks

like image 884
pragmatic_programmer Avatar asked Dec 16 '25 12:12

pragmatic_programmer


2 Answers

There is always advantage to using orchestration for the sake of repeatability alone - doesn't matter what the scale is. Once you hook your testing\development orchestration workflow into Vagrantfiles you won't ever want to go back!

I've used both Chef and Ansible working with Rails apps in the past and it really depends on what you're going for.

What is worth mentioning though that both Chef and Puppet are intended to be agent based (as opposed to Ansible), so it's overkill if your scale is always going to be small in my opinion as there is a little bit of a learning curve to it.

So I'm going to say for your case that Ansible might be a better choice if you are mainly looking to automate infrastructure provisioning due to the fact that it's simple, agentless and runs over SSH.

That said Ansible tends to be more of a sysad tool and makes better glue, whereas Chef is better for dealing with specific nuances of development such as version control. If you're ruby developer it might be up your ally as it's code driven.

The way I'd look at it would be:

I'm using a hosting provider and want to configure a few servers, then Ansible would be my choice.

If I'm running a hosting provider, and need to manage a very large amount of servers then Puppet would be my choice.

If I'm running a sophisticated set of integrated web applications with a decent sized team of software engineers then my choice would be Chef.

like image 195
264nm Avatar answered Dec 19 '25 06:12

264nm


So chef-solo is not deprecated, we're still tracking down some older docs that claim it is.

Deploying a rails app with solo and Berkshelf is pretty easy, I've got an example recipe over at https://github.com/poise/application_examples/blob/master/recipes/todo_rails.rb

As for it it's overkill, that's hard to answer. It's a lot to learn but the actual overhead of extra stuff in your stack isn't that big so it's mostly a question of if you have to time to spare to learn Chef.

like image 40
coderanger Avatar answered Dec 19 '25 05:12

coderanger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!