elastic-grid
Rev 505 | Rev 508 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#
# Elastic Grid
# Copyright (C) 2008-2009 Elastic Grid, LLC.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Create a Elastic Grid AMI. Runs on the EC2 instance.
# Inspired by Hadoop (http://svn.apache.org/viewvc/hadoop/common/trunk/src/contrib/ec2/bin/)
# Your Amazon Account Number.
AWS_ACCOUNT_ID=
# Your Amazon AWS access key.
AWS_ACCESS_KEY_ID=
# Your Amazon AWS secret access key.
AWS_SECRET_ACCESS_KEY=
# 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"`
# The EC2 key name used to launch instances.
# The default is the value used in the Amazon Getting Started guide.
KEY_NAME=eg-keypair
# Where your EC2 private key is stored (created when following the Amazon Getting Started guide).
# You need to change this if you don't store this with your other EC2 keys.
PRIVATE_KEY_PATH=`echo "$EC2_KEYDIR"/"id-$KEY_NAME"`
# SSH options used when connecting to EC2 instances.
SSH_OPTS=`echo -i "$PRIVATE_KEY_PATH" -o StrictHostKeyChecking=no -o ServerAliveInterval=30`
# The version of Elastic Grid to use.
EG_VERSION=0.9.2.1
# The Amazon S3 bucket where the Elastic Grid AMI is stored.
# The default value is for public images, so can be left if you are using running a public image.
# Change this value only if you are creating your own (private) AMI
# so you can store it in a bucket you own.
S3_BUCKET=elastic-grid-distributions
# The EC2 instance type: m1.small, m1.large, m1.xlarge
INSTANCE_TYPE="m1.small"
#INSTANCE_TYPE="m1.large"
#INSTANCE_TYPE="m1.xlarge"
#
# The following variables are only used when creating an AMI.
#
# The version number of the installed JDK.
JAVA_VERSION=1.6.0_15
# SUPPORTED_ARCHITECTURES = ['i386', 'x86_64']
# The download URL for the Sun JDK. Visit http://java.sun.com/javase/downloads/index.jsp and get the URL for the "Linux self-extracting file".
if [ "$INSTANCE_TYPE" == "m1.small" -o "$INSTANCE_TYPE" == "c1.medium" ]; then
ARCH='i386'
BASE_AMI_IMAGE="ami-5647a33f" # ec2-public-images/fedora-8-i386-base-v1.08.manifest.xml
JAVA_BINARY_URL=""
else
ARCH='x86_64'
BASE_AMI_IMAGE="ami-2547a34c" # ec2-public-images/fedora-8-x86_64-base-v1.08.manifest.xml
JAVA_BINARY_URL=""
fi
if [ "$AMI_KERNEL" != "" ]; then
KERNEL_ARG="--kernel ${AMI_KERNEL}"
fi