Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

86 lines
2.2 KiB

{
"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",
"size_id": "61",
"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",
"size_id": "61",
"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",
"size_id": "61",
"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",
"wget https://dl.bintray.com/mitchellh/consul/0.2.0_linux_amd64.zip",
"unzip 0.2.0_linux_amd64.zip",
"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": [
"curl https://s3.amazonaws.com/hc-ops/boom_linux_amd64 -o /usr/bin/boom",
"chmod +x /usr/bin/boom"
]
},
{
"type": "file",
"source": "Makefile",
"destination": "/Makefile"
}
]
}