Skip to content

Commit

Permalink
Moved aws scripts to vagrant directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoff Anderson committed Jun 12, 2015
1 parent 5af88fc commit 4f476fe
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
10 changes: 3 additions & 7 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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:

Expand All @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions tests/aws/aws-access-keys-commands

This file was deleted.

13 changes: 13 additions & 0 deletions vagrant/aws/aws-access-keys-commands
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
8 changes: 4 additions & 4 deletions tests/aws/aws-init.sh → vagrant/aws/aws-init.sh
Original file line number Diff line number Diff line change
@@ -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..."
Expand Down

0 comments on commit 4f476fe

Please sign in to comment.