Skip to content

Instantly share code, notes, and snippets.

@gansbrest
Created November 4, 2012 22:56
Show Gist options
  • Save gansbrest/4014217 to your computer and use it in GitHub Desktop.
Save gansbrest/4014217 to your computer and use it in GitHub Desktop.
Rvm install chef-solo
#!/bin/bash
# Install RVM
\curl -L https://get.rvm.io | sudo bash -s stable
# Add user to a group
# Todo: Remove hardcoding
sudo usermod -a -G rvm ubuntu
# Trying to avoid logout / login part here
newgrp rvm <<FOO
source "/usr/local/rvm/scripts/rvm"
# Install ruby
command rvm install 1.9.3
# Switch to currently installed ruby
rvm use 1.9.3
# Install chef
command gem install --no-rdoc --no-ri chef
FOO
# Run chef-solo on server
[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
sudo chef-solo -c solo.rb -j solo.json
@gansbrest
Copy link
Author

ruby-1.9.3-p286 - #configure
ruby-1.9.3-p286 - #download
ruby-1.9.3-p286 - #extract
ruby-1.9.3-p286 - #validate
ruby-1.9.3-p286 - #setup
'ruby' was not found, cannot install rubygems unless ruby is present (Do you have an RVM ruby installed & selected?)
Saving wrappers to '/usr/local/rvm/bin'.
ruby-1.9.3-p286 - #importing default gemsets (/usr/local/rvm/gemsets/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment