From cb8cac40f31f19ff13b323ae1f0e0ac4b6eb2ce3 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Sat, 24 May 2014 15:45:30 -0700 Subject: [PATCH] bench: Fixing benchmark address on some systems --- bench/Makefile | 2 +- bench/bench-aws.json | 93 ++++++++++++++++++++++++++++++++++++++ bench/conf/common-aws.conf | 5 ++ 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 bench/bench-aws.json create mode 100644 bench/conf/common-aws.conf diff --git a/bench/Makefile b/bench/Makefile index fab574396d..e766e77044 100644 --- a/bench/Makefile +++ b/bench/Makefile @@ -1,6 +1,6 @@ REQ=20480 CLIENTS=64 -ADDR=http://localhost:8500/v1/kv/bench +ADDR=http://127.0.0.1:8500/v1/kv/bench DATA="74a31e96-1d0f-4fa7-aa14-7212a326986e" MAXPROCS=4 diff --git a/bench/bench-aws.json b/bench/bench-aws.json new file mode 100644 index 0000000000..bbc6de97d1 --- /dev/null +++ b/bench/bench-aws.json @@ -0,0 +1,93 @@ +{ + "variables": { + "aws_access_key": "", + "aws_secret_key": "", + "source_ami": "ami-018c9568" + }, + "builders": [ + { + "type": "amazon-ebs", + "access_key": "{{ user `aws_access_key` }}", + "secret_key": "{{ user `aws_secret_key` }}", + "region": "us-east-1", + "instance_type": "m1.small", + "source_ami": "{{ user `source_ami` }}", + "ssh_username": "ubuntu", + "ami_name": "bench-bootstrap-{{ timestamp }}", + "name": "bootstrap" + }, + { + "type": "amazon-ebs", + "access_key": "{{ user `aws_access_key` }}", + "secret_key": "{{ user `aws_secret_key` }}", + "region": "us-east-1", + "instance_type": "m1.small", + "source_ami": "{{ user `source_ami` }}", + "ami_name": "bench-server-{{ timestamp }}", + "ssh_username": "ubuntu", + "name": "server" + }, + { + "type": "amazon-ebs", + "access_key": "{{ user `aws_access_key` }}", + "secret_key": "{{ user `aws_secret_key` }}", + "region": "us-east-1", + "instance_type": "m1.small", + "source_ami": "{{ user `source_ami` }}", + "ami_name": "bench-worker-{{ timestamp }}", + "ssh_username": "ubuntu", + "name": "worker" + } + ], + "provisioners":[ + { + "type": "file", + "source": "conf/upstart.conf", + "destination": "/tmp/upstart-consul.conf" + }, + { + "type": "shell", + "inline": [ + "sudo mv /tmp/upstart-consul.conf /etc/init/consul.conf", + "mkdir /tmp/consul.d", + "sudo mkdir /etc/consul.d", + "sudo apt-get update", + "sudo apt-get install unzip make", + "wget https://dl.bintray.com/mitchellh/consul/0.2.1_linux_amd64.zip", + "unzip 0.2.1_linux_amd64.zip", + "sudo mv consul /usr/local/bin/consul", + "chmod +x /usr/local/bin/consul" + ] + }, + { + "type": "file", + "source": "conf/common.json", + "destination": "/tmp/consul.d/common-aws.json" + }, + { + "type": "file", + "source": "conf/bootstrap.json", + "destination": "/tmp/consul.d/bootstrap.json", + "only": ["bootstrap"] + }, + { + "type": "file", + "source": "conf/server.json", + "destination": "/tmp/consul.d/server.json", + "only": ["server"] + }, + { + "type": "file", + "source": "Makefile", + "destination": "/tmp/Makefile" + }, + { + "type": "shell", + "inline": [ + "sudo curl https://s3.amazonaws.com/hc-ops/boom_linux_amd64 -o /usr/local/bin/boom", + "sudo chmod +x /usr/local/bin/boom", + "sudo mv /tmp/consul.d /etc/consul.d" + ] + } + ] +} diff --git a/bench/conf/common-aws.conf b/bench/conf/common-aws.conf new file mode 100644 index 0000000000..774058eab0 --- /dev/null +++ b/bench/conf/common-aws.conf @@ -0,0 +1,5 @@ +{ + "data_dir": "/mnt/consul", + "enable_debug": true, + "log_level": "info" +}