Created
November 4, 2012 22:56
-
-
Save gansbrest/4014217 to your computer and use it in GitHub Desktop.
Rvm install chef-solo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
Getting errors like this
ruby-1.9.3-p286 - #configure
ruby-1.9.3-p286 - #download
ruby-1.9.3-p286 - #extract
tar: ruby-1.9.3-p286: Cannot mkdir: Permission denied
tar: ruby-1.9.3-p286: Cannot mkdir: Permission denied
tar: ruby-1.9.3-p286/bin: Cannot mkdir: No such file or directory
tar: ruby-1.9.3-p286: Cannot mkdir: Permission denied
tar: ruby-1.9.3-p286/bin/testrb: Cannot open: No such file or directory
tar: ruby-1.9.3-p286: Cannot mkdir: Permission denied
tar: ruby-1.9.3-p286/bin/ri: Cannot open: No such file or directory
tar: ruby-1.9.3-p286: Cannot mkdir: Permission denied
tar: ruby-1.9.3-p286/bin/rake: Cannot open: No such file or directory
tar: ruby-1.9.3-p286: Cannot mkdir: Permission denied
tar: ruby-1.9.3-p286/bin/erb: Cannot open: No such file or directory
tar: ruby-1.9.3-p286: Cannot mkdir: Permission denied
tar: ruby-1.9.3-p286/bin/ruby: Cannot open: No such file or directory
tar: ruby-1.9.3-p286: Cannot mkdir: Permission denied
tar: ruby-1.9.3-p286/bin/gem: Cannot open: No such file or directory