Moved aws scripts to vagrant directory

This commit is contained in:
Geoff Anderson 2015-06-12 15:17:26 -07:00
parent 5af88fc1d9
commit 4f476fec65
5 changed files with 20 additions and 14 deletions

View File

@ -39,9 +39,7 @@ installing dependencies and updates on every vm.):
* Install ducktape:
$ git clone https://github.com/confluentinc/ducktape
$ cd ducktape
$ python setup.py install
$ pip install ducktape
* Run the system tests using ducktape:
@ -93,9 +91,7 @@ the test driver machine.
* Start by making sure you're up to date, and install git and ducktape:
$ sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get install -y git
$ git clone https://github.com/confluentinc/ducktape.git
$ cd ducktape
$ python setup.py install
$ pip install ducktape
* Get Kafka:
@ -104,7 +100,7 @@ the test driver machine.
* Install some dependencies:
$ cd kafka
$ aws/aws-init.sh
$ kafka/vagrant/aws/aws-init.sh
$ . ~/.bashrc
* An example Vagrantfile.local has been created by aws-init.sh which looks something like:

View File

@ -1,3 +0,0 @@
export AWS_ACCESS_KEY=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/ducttape-master | grep AccessKeyId | awk -F\" '{ print $4 }'`
export AWS_SECRET_KEY=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/ducttape-master | grep SecretAccessKey | awk -F\" '{ print $4 }'`
export AWS_SESSION_TOKEN=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/ducttape-master | grep Token | awk -F\" '{ print $4 }'`

View File

@ -0,0 +1,13 @@
if [ -z "$AWS_IAM" ];then
echo "Warning: AWS_IAM is not set"
fi
export AWS_ACCESS_KEY=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/$AWS_IAM | grep AccessKeyId | awk -F\" '{ print $4 }'`
export AWS_SECRET_KEY=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/$AWS_IAM | grep SecretAccessKey | awk -F\" '{ print $4 }'`
export AWS_SESSION_TOKEN=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/$AWS_IAM | grep Token | awk -F\" '{ print $4 }'`
if [ -z "$AWS_ACCESS_KEY" ]; then
echo "Failed to populate environment variables AWS_ACCESS_KEY, AWS_SECRET_KEY, and AWS_SESSION_TOKEN."
echo "AWS_IAM is currently $AWS_IAM. Double-check that this is correct. If not set, add this command to your .bashrc file:"
echo "export AWS_IAM=<my_aws_iam> # put this into your ~/.bashrc"
fi

View File

@ -1,13 +1,13 @@
#!/bin/bash
# This script should be run once on your aws test driver machine before
# attempting to run any ducktape tests
# This script can be used to set up a driver machine on aws from which you will run tests
# or bring up your mini Kafka cluster.
# Install dependencies
sudo apt-get install -y maven openjdk-6-jdk build-essential \
sudo apt-get install -y maven openjdk-7-jdk build-essential \
ruby-dev zlib1g-dev realpath python-setuptools
base_dir=`dirname $0`/..
base_dir=`dirname $0`/../..
if [ -z `which vagrant` ]; then
echo "Installing vagrant..."