-
Followed the Gist available here to install RVM the correct way
-
Called
brew update
but it gave an error related to Git. Following code snippet fixed it.cd `brew --prefix` git remote add origin https://github.com/mxcl/homebrew.git git fetch origin git reset --hard origin/master
-
Fire
brew tap homebrew/dupes
-
Fire
brew install apple-gcc42
-
Firing
CC=/usr/local/opt/local/bin/gcc-apple-4.2 rvm install ruby-1.9.3-p194 --enable-shared --without-tk --without-tcl
gave an error that the gcc-apple in not in path. Referred to an alternate link -
Install the command line tools from XCode. It can done by going to the preferences
Command + ,
-> Downloads -
Updated RVM -
rvm get head
-
rvm install 1.9.3 --with-gcc=clang
-
Fix the RVM and Ruby installation as given above
-
Go to the downloaded chef-repo and do
gem install chef
- Follow till step 4 as mentioned here
- Start configuring EC2 as mentioned here
- Since the work-station is setup so now its the time to install knife on it. The doc above defines the steps for Ubuntu 12.04. The following steps were followed for
installation on MacOSX Mountain Lion
sudo gem install knife-ec2 --no-rdoc --no-ri
sudo /opt/chef/embedded/bin/gem install knife-ec2
sudo gem install net-ssh net-ssh-multi fog highline --no-rdoc --no-ri --verbose
from heresudo gem install knife-ec2 --no-rdoc --no-ri --verbose
- Finally create a server -
knife ec2 server create -i <path of the Amazon's PEM file> -S <name of pem file without extension> -I ami-2d4aa444 --flavor m1.small --region us-east-1 -G default -x ubuntu -N server01
- Login to your Opscode account and verify this node
Solution Available here
- Installs Ruby and packages to support installing RubyGems with native extensions.
- Installs RubyGems from source.
- Installs Chef from RubyGems.
- Creates the /etc/chef directory.
- Writes your validation certificate to /etc/chef/validation.pem.
- Writes an /etc/chef/client.rb config file.
- Writes a JSON file, /etc/chef/first-boot.json with the roles and recipes specified as the run list.
- Executes chef-client with the first-boot.json, connecting to the server in the client.rb.