The Amazon Elastic MapReduce Ruby Client is used for executing Apache Hadoop jobs using Amazon Elastic MapReduce service. We will show how to install it in this article.

The Amazon Elastic MapReduce Ruby Client requires ruby 1.8.7 and is not compatible with later versions.

A credentials.json file will need to be set up to hold your AWS credentials. See HowTo: Install AWS CLI - Security Credentials for how to set it up.

Install Script

If you’re running Linux, this script will do everything this article covers: install_elastic-mapreduce.sh from our aws_scripts collection. Be sure to run it as root or use sudo.

Git Repository

Checkout the repository. This only needs to be done once throughout this series of articles.

Console - user@hostname ~ $

1
git clone https://bitbucket.org/dowdandassociates/aws_scripts.git

Run install script

Console - user@hostname ~ $

1
sudo aws_scripts/install_aws_cli/install_elastic-mapreduce.sh

Direct Download of Script

Console - user@hostname ~ $

1
curl -L https://bitbucket.org/dowdandassociates/aws_scripts/raw/master/install_aws_cli/install_elastic-mapreduce.sh | sudo bash

Install Process

Create the directory in which to download the software if it does not already exist.

Console - root@hostname ~ #

1
mkdir -p /tmp/aws

Create the directory in which to install the software if it does not already exist.

Console - root@hostname ~ #

1
mkdir -p /opt/aws

Download the software.

Console - root@hostname ~ #

1
2
3
curl --silent \
--output /tmp/aws/elastic-mapreduce-ruby.zip \
http://elasticmapreduce.s3.amazonaws.com/elastic-mapreduce-ruby.zip

Delete any previous unzips of the software that may exist.

Console - root@hostname ~ #

1
rm -fR /tmp/aws/elastic-mapreduce-ruby

Unzip the software.

Console - root@hostname ~ #

1
2
3
4
mkdir -p /tmp/aws/elastic-mapreduce-ruby
unzip \
-d /tmp/aws/elastic-mapreduce-ruby \
/tmp/aws/elastic-mapreduce-ruby.zip

Delete any previously installed versions.

Console - root@hostname ~ #

1
rm -fR /opt/aws/elastic-mapreduce-ruby

Move the unzipped directory into the install directory.

Console - root@hostname ~ #

1
mv /tmp/aws/elastic-mapreduce-ruby /opt/aws/elastic-mapreduce-ruby

Delete the .zip file.

Console - root@hostname ~ #

1
rm -f /tmp/aws/elastic-mapreduce-ruby.zip

Set AWS_ELASTIC_MAPREDUCE_HOME, and put the tools into the path.

Console - root@hostname ~ #

1
2
3
4
cat <<'EOF'>/etc/profile.d/elastic-mapreduce-ruby.sh
export AWS_ELASTIC_MAPREDUCE_HOME=/opt/aws/elastic-mapreduce-ruby
export PATH=$PATH:$AWS_ELASTIC_MAPREDUCE_HOME
EOF

References

Parts in this series

Comments