5 stars based on
Learn more or hide this. With Sunziinstalling git-core on Linode is about 5 commands:. There are actually a number of cookbooks which have open pull requests to add OSX support to them. It's quite easy to add support yourself and contributing back to the project! There is definitely a steep learning curve with chef. Here are a couple of libraries that make it simpler:. Knife-Solo chef client rb options broker This allows you to remotely install chef on a blank machine using knife prepare and also allows you to push your recipes to your remote server using knife cook.
Librarian - This works like bundler for chef recipes. You define a Cheffile and list chef client rb options broker what cookbooks you need, and it will download them and their dependencies into your cookbooks directory.
If you have custom recipes, it is good to move them into a site-cookbooks folder so they don't get overwritten by librarian when you import your cookbooks. When you're ready, you can go back to knife-solo to push them out to your server. Hey, thanks for the comment. I've been playing around with chef using the hosted version.
I realized that some of the opscode cookbooks are a bit outdated, so I've turned to github to find cookbooks. My problem now is how to mix these cookbooks with the ones I've already downloaded using knife cookbook install site install. I think Librarian should help, but I'm lost after you mentioned bundler.
What does bundler have to do with chef? So having covered Capistrano and Chef, can Chef be used without Capistrano for regularly deploying Rails apps? Does moving to Chef obviate Cap? I know I could find out myself but I'm really looking for confirmation that zsh history search for a long command is giving me less than these tools.
I think chef is more for provisioning the server, I would still stick with capistrano for deployment. You'll want to provision the server s with Chef or similar tools like Puppet to prepare it for deployment.
Then use Capistrano to do the actual deployment s. Chef has a deployment resource to deploy out of SVN or Git - it acts similar to what you're familiar with in Chef client rb options broker. Because Chef's job is to control state of a node, it's actually an anti-pattern to use Capistrano for service control or deployments. I use chef server open source and got rid of Capistrano for my deploys.
Chef has a "deploy resource" http: Chef client rb options broker things I really like: But from the cli knife you can chef client rb options broker the search feature and chef client rb options broker whatever command you want. So for testing env I use it like cap and essentially have a push deploy. Recipes etc are also usually maintained in a git repo. I use it to setup my laptop which runs ubuntu, virtual machines for testing environments, and a physical hosted server.
I have also started to play with it in the cloud a little. If you write your recipes to scale and add monitoring I have been playing with it for the last 6 chef client rb options broker or so on and off. I will say that chef like rails has a learning curve, but it gets easier And its very easy to see the power.
Infrastructure as Code gotta love it. After you read the wiki at http: I see Ryan uses the old Ruby-symbol syntax to access node data. As far as I remember this was deprecated in favour of the typical 'string'-keys syntax: I hope, some day, the opscode guys will also provide an "official" tool that makes life with chef-solo easier without having to use 3rd party tools Daaamn Chef is serious.
It doesn't even make sense to use it for the tiny one-server example you gave; it's power only really starts to make sense once you see how Chef Server works to let you implement an EC2-type setup on your own infrastructure.
I've seen the value of it for a long time, but two different attempts to ease into it were thwarted by the bad introductory materials. This is a great introduction. I look forward to using this as a jumping off point to actually get into Chef someday. Even large chef users e.
If you rely on a hosted chef-server and it goes chef client rb options broker, you can't reconfigure existing or launch new servers. A big no-go imho. Sure, for a couple of unimportant VMs it's awesome to play and get a feeling with.
A decent number of large users are not using chef-solo and there are definitely approaches that you can take to resiliency with the chef-server infrastructure. Obviously Engine Yard is one of the poster children of chef-solo but last time I spoke to anyone from over there, they are also still on 0. They're probably not the best example of a "large scale" user unless your needs marry closely with what they wanted.
Speaking personally, the benefits provided by Search are more than worth any hassle involved in making sure the API calls always get answered! What do chef client rb options broker do if your chef-server vm crashes and you need to provision new app servers to keep your main business running? So either you have a redundant chef-server setup OR you'll get into trouble.
It's just a matter of time. Chef client rb options broker you really provision new servers that often, that you don't have time to reboot your chef-server, then have as many chef-servers as chef client rb options broker need. I don't see why the preferred solution would be to exclusively use chef-solo. If you have some reason to prefer chef client rb options broker approach, please do tell. Dear Ryan, Use use rsync -r. Is there any way to do it with one command?
Create a file deploy. I don't think enabling the root user is a good option. You need to rsync using ssh and your keyfile like that: You can use Chef to install Ruby on the server instead of having to log in and set it up yourself. You can use knife bootstrap host instead of logging in and installing everything chef needs manually.
Chef even allows you to build your own custom bootstrap script based chef client rb options broker what type of Linux machine your using. Joshua Sierles is from 37signals. His cookbook at https: The 37signals cookbook was last updated 2 years ago, by jsierles jsierles cookbooks was updated 14 days ago.
Thanks for posting the link to Joshua's cookbooks. It looks like 37Signals cookbook has been removed from their Git account, or made private. A good practice is to place site specific cookbooks in a folder called site-cookbooks instead of putting them all in cookbooks. Thanks for this screencast, during my migration to chef-solo I started working on a solution which makes it super easy to install a more or less standard rails stack so that you can start deploying via capistrano:.
I had to end up installing the following packages:. So the useradd failed. I ended up doing:. This worked for me. But anyone know if this is because of a difference in distros from the one used on the Railscast? Is admin usually a pre-created default group? Just in case someone is interested to know, in Ubuntu versions The power that be are favouring the "sudo" group instead of "admin" group.
If you're upgrading from a lower version, your "admin" group will persist but on a fresh install "admin" group will be missing. So if you get an error that "admin" group does not exist, simply replace it with "sudo". Credits to Aditya Sanghi, here: Installing Ruby on CentOS: I got inspired by your screencast, and wrote a comprehensive guide to Chef Solo and Vagrant: Since those cookbooks are designed to be multi-operating system CentOS, Ubuntu, Solaris, etc they also aren't necessarily the simplest designs.
The site-cookbooks method of separating your own cookbooks has also been deprecated in favor of using berkshelf:. Thanks for the update lamont. I agree, things have changed and it's hard to find good documentation. I'm chef client rb options broker in learning how to use berkshelf and chef-solo together but can't find a good tutorial. Can you chef client rb options broker one? There's a lot you can do chef client rb options broker that and some sage knowledge on the sudo command to write a fairly well locked down server that's ready to rock the world.
Combine this with knowledge on OpenBSD and how it works and you have a tank of a server that's going to be near impossible to break into. You have mentioned that for minimal proposes installing chef you compile ruby from source and later on RVM can be installed with recipe.
Is there a common method to install RVM through chef?