OW2 Consortium elastic-grid

Rev

Rev 505 | Rev 508 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
325 jeje 1
#
182 jeje 2
# Elastic Grid
325 jeje 3
# Copyright (C) 2008-2009 Elastic Grid, LLC.
117 jeje 4
#
182 jeje 5
# This program is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU Affero General Public License as
65 jeje 7
# published by the Free Software Foundation, either version 3 of the
182 jeje 8
# License, or (at your option) any later version.
48 jeje 9
#
182 jeje 10
# This program is distributed in the hope that it will be useful,
65 jeje 11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
182 jeje 13
# GNU Affero General Public License for more details.
65 jeje 14
#
182 jeje 15
# You should have received a copy of the GNU Affero General Public License
16
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
325 jeje 17
#
48 jeje 18
 
19
 
20
# Create a Elastic Grid AMI. Runs on the EC2 instance.
480 jeje 21
# Inspired by Hadoop (http://svn.apache.org/viewvc/hadoop/common/trunk/src/contrib/ec2/bin/)
48 jeje 22
 
23
# Your Amazon Account Number.
51 jeje 24
AWS_ACCOUNT_ID=
48 jeje 25
 
26
# Your Amazon AWS access key.
51 jeje 27
AWS_ACCESS_KEY_ID=
48 jeje 28
 
29
# Your Amazon AWS secret access key.
51 jeje 30
AWS_SECRET_ACCESS_KEY=
48 jeje 31
 
32
# Location of EC2 keys.
33
# The default setting is probably OK if you set up EC2 following the Amazon Getting Started guide.
34
EC2_KEYDIR=`dirname "$EC2_PRIVATE_KEY"`
35
 
36
# The EC2 key name used to launch instances.
37
# The default is the value used in the Amazon Getting Started guide.
49 jeje 38
KEY_NAME=eg-keypair
48 jeje 39
 
40
# Where your EC2 private key is stored (created when following the Amazon Getting Started guide).
41
# You need to change this if you don't store this with your other EC2 keys.
477 dennisreedy 42
PRIVATE_KEY_PATH=`echo "$EC2_KEYDIR"/"id-$KEY_NAME"`
48 jeje 43
 
44
# SSH options used when connecting to EC2 instances.
45
SSH_OPTS=`echo -i "$PRIVATE_KEY_PATH" -o StrictHostKeyChecking=no -o ServerAliveInterval=30`
46
 
47
# The version of Elastic Grid to use.
507 jeje 48
EG_VERSION=0.9.2.1
48 jeje 49
 
50
# The Amazon S3 bucket where the Elastic Grid AMI is stored.
51
# The default value is for public images, so can be left if you are using running a public image.
52
# Change this value only if you are creating your own (private) AMI
53
# so you can store it in a bucket you own.
54
S3_BUCKET=elastic-grid-distributions
55
 
56
# The EC2 instance type: m1.small, m1.large, m1.xlarge
57
INSTANCE_TYPE="m1.small"
58
#INSTANCE_TYPE="m1.large"
59
#INSTANCE_TYPE="m1.xlarge"
60
 
61
#
62
# The following variables are only used when creating an AMI.
63
#
64
 
65
# The version number of the installed JDK.
505 jeje 66
JAVA_VERSION=1.6.0_15
48 jeje 67
 
68
# SUPPORTED_ARCHITECTURES = ['i386', 'x86_64']
69
# 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".
480 jeje 70
if [ "$INSTANCE_TYPE" == "m1.small" -o "$INSTANCE_TYPE" == "c1.medium" ]; then
48 jeje 71
  ARCH='i386'
430 jeje 72
  BASE_AMI_IMAGE="ami-5647a33f"  # ec2-public-images/fedora-8-i386-base-v1.08.manifest.xml
50 jeje 73
  JAVA_BINARY_URL=""
48 jeje 74
else
75
  ARCH='x86_64'
468 jeje 76
  BASE_AMI_IMAGE="ami-2547a34c"  # ec2-public-images/fedora-8-x86_64-base-v1.08.manifest.xml
50 jeje 77
  JAVA_BINARY_URL=""
477 dennisreedy 78
fi
480 jeje 79
 
80
if [ "$AMI_KERNEL" != "" ]; then
81
  KERNEL_ARG="--kernel ${AMI_KERNEL}"
82
fi