2014-05-08 00:42:57 +00:00
|
|
|
{
|
|
|
|
"variables": {
|
|
|
|
"do_client_id": "",
|
|
|
|
"do_api_key": ""
|
|
|
|
},
|
|
|
|
"builders": [
|
|
|
|
{
|
|
|
|
"type": "digitalocean",
|
|
|
|
"api_key": "{{ user `do_api_key` }}",
|
|
|
|
"client_id": "{{ user `do_client_id` }}",
|
|
|
|
"region_id": "1",
|
2014-05-09 03:45:17 +00:00
|
|
|
"size_id": "66",
|
2014-05-08 00:42:57 +00:00
|
|
|
"image_id": "3101045",
|
|
|
|
"snapshot_name": "bench-bootstrap-{{ isotime }}",
|
|
|
|
"name": "bootstrap"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "digitalocean",
|
|
|
|
"api_key": "{{ user `do_api_key` }}",
|
|
|
|
"client_id": "{{ user `do_client_id` }}",
|
|
|
|
"region_id": "1",
|
2014-05-09 03:45:17 +00:00
|
|
|
"size_id": "66",
|
2014-05-08 00:42:57 +00:00
|
|
|
"image_id": "3101045",
|
|
|
|
"snapshot_name": "bench-server-{{ isotime }}",
|
|
|
|
"name": "server"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "digitalocean",
|
|
|
|
"api_key": "{{ user `do_api_key` }}",
|
|
|
|
"client_id": "{{ user `do_client_id` }}",
|
|
|
|
"region_id": "1",
|
2014-05-09 03:45:17 +00:00
|
|
|
"size_id": "66",
|
2014-05-08 00:42:57 +00:00
|
|
|
"image_id": "3101045",
|
|
|
|
"snapshot_name": "bench-worker-{{ isotime }}",
|
|
|
|
"name": "worker"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"provisioners":[
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": "conf/upstart.conf",
|
|
|
|
"destination": "/etc/init/consul.conf"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "shell",
|
|
|
|
"inline": [
|
|
|
|
"mkdir /etc/consul.d",
|
|
|
|
"apt-get update",
|
|
|
|
"apt-get install unzip make",
|
2014-06-13 17:11:53 +00:00
|
|
|
"wget https://dl.bintray.com/mitchellh/consul/0.3.0_linux_amd64.zip",
|
|
|
|
"unzip 0.3.0_linux_amd64.zip",
|
2014-05-08 00:42:57 +00:00
|
|
|
"mv consul /usr/local/bin/consul",
|
|
|
|
"chmod +x /usr/local/bin/consul"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": "conf/common.json",
|
|
|
|
"destination": "/etc/consul.d/common.json"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": "conf/bootstrap.json",
|
|
|
|
"destination": "/etc/consul.d/bootstrap.json",
|
|
|
|
"only": ["bootstrap"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": "conf/server.json",
|
|
|
|
"destination": "/etc/consul.d/server.json",
|
|
|
|
"only": ["server"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "shell",
|
|
|
|
"inline": [
|
2014-05-09 03:45:17 +00:00
|
|
|
"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
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": "Makefile",
|
|
|
|
"destination": "/Makefile"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|