7

I need to:

sudo apt-get install rubygems
sudo gem install <lots of gems>

does the bootstrap action have sudo access?

2 Answers 2

5

The answer is yes. You can test your bootstrap script like this:

elastic_mapreduce --create --alive --ssh

This will create a node and give you a ssh connection to it, from which you can test your bootstrap script.

UPDATE: For reference here is what I'm running:

#!/bin/bash
sudo apt-get -y -V install irb1.8 libreadline-ruby1.8 libruby libruby1.8 rdoc1.8 ruby ruby1.8 ruby1.8-dev
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.11.zip
unzip rubygems-1.8.11.zip
cd rubygems-1.8.11
sudo ruby setup.rb
sudo gem1.8 install bson bson_ext json tzinfo i18n activesupport --no-rdoc --no-ri

UPDATE2: to install aws-sdk

#!/bin/bash

# ruby developer packages
sudo apt-get -y -V  install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8
sudo apt-get -y -V  install libreadline-ruby1.8 libruby1.8 libopenssl-ruby
# nokogiri requirements
sudo apt-get -y -V  install libxslt-dev libxml2-dev

wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.11.zip
unzip rubygems-1.8.11.zip
cd rubygems-1.8.11
sudo ruby setup.rb

sudo gem1.8 install aws-sdk --no-rdoc --no-ri

-y on apt-get makes it not prompt you

I wget rubygems because the version you get with apt-get is way out of date, and some gems won't build using an old version.

2

Yup, and here is a list of commands that I ran to setup my instance (for all the people who google for this question later):

sudo apt-get update
sudo apt-get -y install emacs
sudo apt-get -y install rubygems
sudo gem install fastercsv --source http://rubygems.org
sudo gem install crack --source http://rubygems.org
sudo gem install json_pure --source http://rubygems.org
exit

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.