Improve EC2 setup scripts. Remove dependency on external environment variables.

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1053166 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jsdelfino 2010-12-27 19:54:31 +00:00
parent 1c0d8a7ab8
commit ddee608e43
7 changed files with 13 additions and 13 deletions

View file

@ -19,5 +19,5 @@
host=$1
# Download and execute Tuscany SCA install script
ssh -i $HOME/.ec2/ec2-tuscany-keypair.pem ubuntu@$host "wget http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image; chmod 700 ./ubuntu-bin-all-image; ./ubuntu-bin-all-image"
ssh -i $HOME/.ec2/ec2-keypair.pem ubuntu@$host "wget http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image; chmod 700 ./ubuntu-bin-all-image; ./ubuntu-bin-all-image"

View file

@ -17,7 +17,7 @@
# Configure EC2 for use with Tuscany SCA
here=`readlink -f $0`; here=`dirname $here`
$here/uec2-setenv
. $here/uec2-setenv
# Display commands as they are executed
set -x
@ -27,9 +27,9 @@ set -x
sudo apt-get install ec2-api-tools
# Create an EC2 SSH keypair if necessary
if [ ! -f $HOME/.ec2/ec2-tuscany-keypair.pem ]; then
ec2-add-keypair ec2-tuscany-keypair --region us-west-1 > $HOME/.ec2/ec2-tuscany-keypair.pem
chmod 600 $HOME/.ec2/ec2-tuscany-keypair.pem
if [ ! -f $HOME/.ec2/ec2-keypair.pem ]; then
ec2-add-keypair ec2-keypair --region us-west-1 > $HOME/.ec2/ec2-keypair.pem
chmod 600 $HOME/.ec2/ec2-keypair.pem
fi
# Authorize SSH, HTTP and HTTPS access to EC2 instances

View file

@ -19,5 +19,5 @@
host=$1
# Download and execute Tuscany SCA install script
ssh -i $HOME/.ec2/ec2-tuscany-keypair.pem ubuntu@$host "wget http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-dev-all-image; chmod 700 ./ubuntu-dev-all-image; ./ubuntu-dev-all-image"
ssh -i $HOME/.ec2/ec2-keypair.pem ubuntu@$host "wget http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-dev-all-image; chmod 700 ./ubuntu-dev-all-image; ./ubuntu-dev-all-image"

View file

@ -17,5 +17,5 @@
# SSH to an EC2 instance
host=$1
ssh -i $HOME/.ec2/ec2-tuscany-keypair.pem ubuntu@$host
ssh -i $HOME/.ec2/ec2-keypair.pem ubuntu@$host

View file

@ -18,7 +18,7 @@
# Start an Ubuntu 10.10 64-bit EC2 instance for use with Tuscany
here=`readlink -f $0`; here=`dirname $here`
$here/uec2-setenv
. $here/uec2-setenv
# Here are the AMI IDs you can use in the different EC2 regions:
# Ubuntu 10.10 64-bit (elastic block storage)
@ -32,7 +32,7 @@ $here/uec2-setenv
# t1.micro
# m1.large
#ec2-run-instances "ami-ca1f4f8f" -t m1.large -k ec2-tuscany-keypair --region us-west-1
#ec2-run-instances "ami-ca1f4f8f" -t t1.micro -k ec2-tuscany-keypair --region us-west-1
ec2-run-instances "ami-ca1f4f8f" -t t1.micro -k ec2-tuscany-keypair --region us-west-1
#ec2-run-instances "ami-ca1f4f8f" -t m1.large -k ec2-keypair --region us-west-1
#ec2-run-instances "ami-ca1f4f8f" -t t1.micro -k ec2-keypair --region us-west-1
ec2-run-instances "ami-ca1f4f8f" -t t1.micro -k ec2-keypair --region us-west-1

View file

@ -17,7 +17,7 @@
# Display the status of EC2 instances
here=`readlink -f $0`; here=`dirname $here`
$here/uec2-setenv
. $here/uec2-setenv
ec2-describe-instances --region us-west-1

View file

@ -18,7 +18,7 @@
# Terminate an EC2 instance
instance=$1
here=`readlink -f $0`; here=`dirname $here`
$here/uec2-setenv
. $here/uec2-setenv
ec2-terminate-instances $instance --region us-west-1