bench: Fixing benchmark address on some systems

This commit is contained in:
Armon Dadgar 2014-05-24 15:45:30 -07:00
parent c51089353e
commit cb8cac40f3
3 changed files with 99 additions and 1 deletions

View File

@ -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

93
bench/bench-aws.json Normal file
View File

@ -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"
]
}
]
}

View File

@ -0,0 +1,5 @@
{
"data_dir": "/mnt/consul",
"enable_debug": true,
"log_level": "info"
}