2014-05-08 00:42:57 +00:00
|
|
|
{
|
2016-11-29 20:00:30 +00:00
|
|
|
"variables": {
|
|
|
|
"do_size": "16gb",
|
|
|
|
"do_image": "ubuntu-14-04-x64",
|
|
|
|
"do_region": "nyc3"
|
|
|
|
},
|
|
|
|
"builders": [
|
|
|
|
{
|
|
|
|
"type": "digitalocean",
|
|
|
|
"region": "{{ user `do_region` }}",
|
|
|
|
"size": "{{ user `do_size` }}",
|
|
|
|
"image": "{{ user `do_image` }}",
|
|
|
|
"snapshot_name": "bench-bootstrap-{{ isotime }}",
|
|
|
|
"name": "bootstrap"
|
2014-05-08 00:42:57 +00:00
|
|
|
},
|
|
|
|
{
|
2016-11-29 20:00:30 +00:00
|
|
|
"type": "digitalocean",
|
|
|
|
"region": "{{ user `do_region` }}",
|
|
|
|
"size": "{{ user `do_size` }}",
|
|
|
|
"image": "{{ user `do_image` }}",
|
|
|
|
"snapshot_name": "bench-server-{{ isotime }}",
|
|
|
|
"name": "server"
|
2014-05-08 00:42:57 +00:00
|
|
|
},
|
|
|
|
{
|
2016-11-29 20:00:30 +00:00
|
|
|
"type": "digitalocean",
|
|
|
|
"region": "{{ user `do_region` }}",
|
|
|
|
"size": "{{ user `do_size` }}",
|
|
|
|
"image": "{{ user `do_image` }}",
|
|
|
|
"snapshot_name": "bench-worker-{{ isotime }}",
|
|
|
|
"name": "worker"
|
2014-05-08 00:42:57 +00:00
|
|
|
}
|
2016-11-29 20:00:30 +00:00
|
|
|
],
|
|
|
|
"provisioners":[
|
2014-05-08 00:42:57 +00:00
|
|
|
{
|
2016-11-29 20:00:30 +00:00
|
|
|
"type": "file",
|
|
|
|
"source": "conf/upstart.conf",
|
|
|
|
"destination": "/etc/init/consul.conf"
|
2014-05-08 00:42:57 +00:00
|
|
|
},
|
|
|
|
{
|
2016-11-29 20:00:30 +00:00
|
|
|
"type": "shell",
|
|
|
|
"inline": [
|
|
|
|
"mkdir /etc/consul.d",
|
|
|
|
"apt-get update",
|
|
|
|
"apt-get install -y unzip make",
|
|
|
|
"wget https://releases.hashicorp.com/consul/0.7.1/consul_0.7.1_linux_amd64.zip",
|
|
|
|
"unzip consul_*_linux_amd64.zip",
|
|
|
|
"mv consul /usr/local/bin/consul",
|
|
|
|
"chmod +x /usr/local/bin/consul"
|
|
|
|
]
|
2014-05-08 00:42:57 +00:00
|
|
|
},
|
|
|
|
{
|
2016-11-29 20:00:30 +00:00
|
|
|
"type": "file",
|
|
|
|
"source": "conf/common.json",
|
|
|
|
"destination": "/etc/consul.d/common.json"
|
2014-05-08 00:42:57 +00:00
|
|
|
},
|
|
|
|
{
|
2016-11-29 20:00:30 +00:00
|
|
|
"type": "file",
|
|
|
|
"source": "conf/bootstrap.json",
|
|
|
|
"destination": "/etc/consul.d/bootstrap.json",
|
|
|
|
"only": ["bootstrap"]
|
2014-05-08 00:42:57 +00:00
|
|
|
},
|
|
|
|
{
|
2016-11-29 20:00:30 +00:00
|
|
|
"type": "file",
|
|
|
|
"source": "conf/server.json",
|
|
|
|
"destination": "/etc/consul.d/server.json",
|
|
|
|
"only": ["server"]
|
2014-05-08 00:42:57 +00:00
|
|
|
},
|
|
|
|
{
|
2016-11-29 20:00:30 +00:00
|
|
|
"type": "shell",
|
|
|
|
"inline": [
|
|
|
|
"curl https://s3.amazonaws.com/hc-ops/boom_linux_amd64 -o /usr/local/bin/boom",
|
|
|
|
"chmod +x /usr/local/bin/boom"
|
|
|
|
]
|
2014-05-08 00:42:57 +00:00
|
|
|
},
|
|
|
|
{
|
2016-11-29 20:00:30 +00:00
|
|
|
"type": "file",
|
|
|
|
"source": "Makefile",
|
|
|
|
"destination": "/Makefile"
|
2014-05-08 00:42:57 +00:00
|
|
|
}
|
2016-11-29 20:00:30 +00:00
|
|
|
]
|
2014-05-08 00:42:57 +00:00
|
|
|
}
|