Skip to content

Commit

Permalink
MINOR: update AWS test setup guide
Browse files Browse the repository at this point in the history
Author: Matthias J. Sax <[email protected]>

Reviewers: Joseph Rea <[email protected]>, Ewen Cheslack-Postava <[email protected]>

Closes apache#2575 from mjsax/minor-update-system-test-readme
  • Loading branch information
mjsax authored and ewencp committed Jun 22, 2017
1 parent b62cccd commit ac53979
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
13 changes: 10 additions & 3 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,15 @@ Preparation
In these steps, we will create an IAM role which has permission to create and destroy EC2 instances,
set up a keypair used for ssh access to the test driver and worker machines, and create a security group to allow the test driver and workers to all communicate via TCP.

* [Create an IAM role](http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SettingUpUser.html#Using_CreateUser_console). We'll give this role the ability to launch or kill additional EC2 machines.
* [Create an IAM role](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html). We'll give this role the ability to launch or kill additional EC2 machines.
- Create role "kafkatest-master"
- Role type: Amazon EC2
- Attach policy: AmazonEC2FullAccess (this will allow our test-driver to create and destroy EC2 instances)

* If you haven't already, [set up a keypair to use for SSH access](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html). For the purpose
of this quickstart, let's say the keypair name is kafkatest, and you've saved the private key in kafktest.pem

* Next, create a security group called "kafkatest".
* Next, create a EC2 security group called "kafkatest".
- After creating the group, inbound rules: allow SSH on port 22 from anywhere; also, allow access on all ports (0-65535) from other machines in the kafkatest group.

Create the Test Driver
Expand Down Expand Up @@ -423,7 +423,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
$ sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get install -y python-pip git
$ pip install ducktape

* Get Kafka:
Expand Down Expand Up @@ -469,6 +469,13 @@ the test driver machine.
$ cd kafka/tests
$ ducktape kafkatest/tests

* Update Worker VM

If you change code in a branch on your driver VM, you need to update your worker VM to pick up this change:

$ ./gradlew systemTestLibs
$ vagrant rsync

* To halt your workers without destroying persistent state, run `vagrant halt`. Run `vagrant destroy -f` to destroy all traces of your workers.

Unit Tests
Expand Down
16 changes: 11 additions & 5 deletions vagrant/aws/aws-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,22 @@
# or bring up your mini Kafka cluster.

# Install dependencies
sudo apt-get install -y maven openjdk-6-jdk build-essential \
ruby-dev zlib1g-dev realpath python-setuptools
sudo apt-get install -y \
maven \
openjdk-8-jdk-headless \
build-essential \
ruby-dev \
zlib1g-dev \
realpath \
python-setuptools

base_dir=`dirname $0`/../..

if [ -z `which vagrant` ]; then
echo "Installing vagrant..."
wget https://releases.hashicorp.com/vagrant/1.7.2/vagrant_1.7.2_x86_64.deb
sudo dpkg -i vagrant_1.7.2_x86_64.deb
rm -f vagrant_1.7.2_x86_64.deb
wget https://releases.hashicorp.com/vagrant/1.9.3/vagrant_1.9.3_x86_64.deb
sudo dpkg -i vagrant_1.9.3_x86_64.deb
rm -f vagrant_1.9.3_x86_64.deb
fi

# Install necessary vagrant plugins
Expand Down

0 comments on commit ac53979

Please sign in to comment.