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.
./deploy.sh <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:
./deploy.sh ... 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 ./deploy.sh
script, use ./install.sh
as:
[sudo] bash ./install.sh <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
In order to be able to use same chef-solo repository with multiple custom setups place your configuration in profiles
subdirectory.
TBD
Before using Chef on a server it is bootstrapped by install.sh script. Chapter below describes install.sh
in more details.
- MacOS (Darwin)
- Debian (Same group as Ubuntu)
- RHEL/CentOS with Rpmforge
-
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 install.sh 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.