Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
My chef-solo setup for deploying ruby on rails to a fresh server
Ruby Shell HTML

This branch is 40 commits ahead of msolovyov:master

Merge pull request #2 from dmytro/hotfix/use_native_rvm_package_insta…


Hotfix/use native rvm package installation
latest commit 6b97e423ac
@dmytro authored
Failed to load latest commit information.
lib/tasks Start rake task for librarian.
profiles Move sumbodule outide of chef-solo.
site-cookbooks mv ssh/config file creation from default to designer
.gitignore Add documentation for custom setups- WIP
.ruby-version Remove unused stuff, configure to use .ruby-version.
.yardopts Options file for YARD.
CentOS6.3-Vault.repo Support for Vault repositories for CentOS Information about rubygems fix. Add ability to use custom solo config root directory.
Rakefile Move sumbodule outide of chef-solo.
empty.json empty deploy file
install.conf Latest Chef. Use getent instead of grep.
run_roles.rb Generating networking config JSON for the hosts.
solo.rb Even less verbosity.


Bootstrapping Ruby or Ruby on Rails server on a Linux/MacOSX machine. Bootstrapping installs prerequisite for RVM, RVM itself, Ruby and Chef. At the end script executes chef-solo using provided JSON configuration file.



./ <user>@<host> <json>

json - This is optional. I've put this there so you can have different server setup config files. e.g.: web_server.json

There's empty JSON file, included now. If you need only install RVM, Ruby and Chef, run as:

./ ... empty.json


You can simply bootstrap your local machine if you need to. In this case you'd need root or sudo access and networking setup only. Instead of using ./ script, use ./ as:

[sudo] bash ./ <JSON>


  • Clean install server machine with password less SSH access and password less sudo for your user for remote installation.
  • curl
  • sudo


Script uses librarian gem to manage Chef cookbooks. Cookbook's are downloaded into ./cookbooks directory. You can also use own cookbooks, managed manually and installed in ./site-cookbooks.

To use librarian, after updating Cheffile file, run in the repository directory:

 bundle install                       # Installs librarian
 librarian-chef install               # Installs cookbooks

Customizing chef-solo

In order to be able to use same chef-solo repository with multiple custom setups place your configuration in profiles subdirectory.

Integrating chef-solo with Capistrano



Before using Chef on a server it is bootstrapped by script. Chapter below describes in more details.

Supported by


  • MacOS (Darwin)
  • Debian (Same group as Ubuntu)
  • RHEL/CentOS with Rpmforge

Tested with

  • OS

    • MacOSX 10.7.x
    • CentOS 5.8
    • Debian 6.x
    • Ubuntu 10.x, 12.x
  • Ruby

    • 1.9.3-pXXX
    • 2.0.0-p0, p195
  • Chef

    • 0.10.x, 10.x
    • 11.4.x



File install.conf Contains fallowing configuration for script:

  • RVM version
  • Ruby version
  • Chef version
  • RPM forge release for CentOS/RHEL
  • Rubygems - as of may/2013, Rubygems need to be downgraded when used with Ruby 2.x and Chef 11. Corresponding section added.


Solo.rb is configuration file for chef-solo binary. Contains PATH information for cookbooks, roles, logs.

Something went wrong with that request. Please try again.