From fe4b25705175a8413c397ef3ebf47491a5ad57df Mon Sep 17 00:00:00 2001 From: Andrew Kyle Purtell Date: Mon, 16 Nov 2009 20:00:57 +0000 Subject: [PATCH] HBASE-1961 HBase EC2 scripts; tighten up configuration a bit and document configuration required in hbase-ec2-env.sh git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@880937 13f79535-47bb-0310-9956-ffa450edef68 --- src/contrib/ec2/README.txt | 19 +++++++++++++++++++ src/contrib/ec2/bin/create-hbase-image | 4 ++-- src/contrib/ec2/bin/hbase-ec2-env.sh | 6 ++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/contrib/ec2/README.txt b/src/contrib/ec2/README.txt index cb9a2cd7b4e..539ec54d85a 100644 --- a/src/contrib/ec2/README.txt +++ b/src/contrib/ec2/README.txt @@ -15,3 +15,22 @@ You need both the EC2 API and AMI tools http://developer.amazonwebservices.com/connect/entry.jspa?externalID=368&categoryID=88 installed and on the path. For Ubuntu, "apt-get install ec2-ami-tools ec2-api-tools". + +The hbase-ec2-env.sh script requires some configuration: + +- Fill in AWS_ACCOUNT_ID with your EC2 account number + +- Fill in AWS_ACCESS_KEY_ID with your EC2 access key + +- Fill in AWS_SECRET_ACCESS_KEY with your EC2 secret access key + +- Fill in KEY_NAME with the SSH keypair you will use + +- Fill in EC2_PRIVATE_KEY with the location of your AWS private key file -- + must begin with 'pk' and end with '.pem' + +- Fill in EC2_CERT with the location of your AWS certificate -- must begin + with 'cert' and end with '.pem' + +- Make sure the private part of your AWS SSH keypair exists in the same + directory as EC2_PRIVATE_KEY with the name id_rsa_${KEYNAME} diff --git a/src/contrib/ec2/bin/create-hbase-image b/src/contrib/ec2/bin/create-hbase-image index a8eb6cb986a..7fa4b72ea61 100755 --- a/src/contrib/ec2/bin/create-hbase-image +++ b/src/contrib/ec2/bin/create-hbase-image @@ -65,8 +65,8 @@ scp $SSH_OPTS "$bin"/image/create-hbase-image-remote "root@$HOSTNAME:/mnt" scp $SSH_OPTS "$bin"/image/ec2-run-user-data "root@$HOSTNAME:/etc/init.d" # Copy private key and certificate (for bundling image) -scp $SSH_OPTS $EC2_KEYDIR/pk*.pem "root@$HOSTNAME:/mnt" -scp $SSH_OPTS $EC2_KEYDIR/cert*.pem "root@$HOSTNAME:/mnt" +scp $SSH_OPTS $EC2_PRIVATE_KEY "root@$HOSTNAME:/mnt" +scp $SSH_OPTS $EC2_CERT "root@$HOSTNAME:/mnt" # Connect to it ssh $SSH_OPTS "root@$HOSTNAME" "sh -c \"INSTANCE_TYPE=$INSTANCE_TYPE /mnt/create-hbase-image-remote\"" diff --git a/src/contrib/ec2/bin/hbase-ec2-env.sh b/src/contrib/ec2/bin/hbase-ec2-env.sh index 437e7fe1a7c..3f1c7e23c64 100644 --- a/src/contrib/ec2/bin/hbase-ec2-env.sh +++ b/src/contrib/ec2/bin/hbase-ec2-env.sh @@ -24,6 +24,12 @@ AWS_ACCESS_KEY_ID= # Your Amazon AWS secret access key. AWS_SECRET_ACCESS_KEY= +# Your AWS private key file -- must begin with 'pk' and end with '.pem' +EC2_PRIVATE_KEY= + +# Your AWS certificate file -- must begin with 'cert' and end with '.pem' +EC2_CERT= + # Location of EC2 keys. # The default setting is probably OK if you set up EC2 following the Amazon Getting Started guide. EC2_KEYDIR=`dirname "$EC2_PRIVATE_KEY"`