Useful scripts to help you get all set up with EMR, such as bootstrap actions
- Installing Ganglia <ganglia/install_ganglia.rb>
- Installing Screen and some other utilities <config/install_screen_tree_and_config_s3.sh>
Place the script somewhere in you S3 buckets... I keep a bucket for bootstrap-actions.
I use the run-if
script written by the EMR team to determine whether or not i am installing the master or slave version of Ganglia.
Then when launching the cluster with the EMR client, add the following bootstrap actions:
--bootstrap-action s3://elasticmapreduce/bootstrap-actions/run-if --args "instance.isMaster=true,s3://<your-emr-bucket>/bootstraps/install_ganglia.rb,master" \
--bootstrap-action s3://elasticmapreduce/bootstrap-actions/run-if --args "instance.isMaster!=true,s3://<your-emr-bucket>/bootstraps/install_ganglia.rb,slave" \
Modify as needed
This can obviously be broken out if needed, but was simple enough to just do in one file
Use as:
--bootstrap-action s3://<your-emr-bucket>/bootstraps/install_screen_tree_and_config_s3.sh
Simple as that.
Just don't forget to replace your ACCESS_KEY AND SECRET_KEY AND PASSWORD
Abstract this out for other cloud services and test on EC2 without EMR
Jason Amster jayamster@gmail.com
This code was brought together from the following 2 blog posts
- https://docs.google.com/Doc?id=dgmmft5s_45hr7hmggr
- http://www.manamplified.org/archives/2008/03/notes-on-using-ec2-s3.html
and some tips for the EMR team.