2015-09-23 20:03:57 +00:00
|
|
|
{
|
|
|
|
"variables": {
|
|
|
|
"bin_url": "{{ env `NOMAD_URL` }}"
|
|
|
|
},
|
|
|
|
"builders": [
|
|
|
|
{
|
|
|
|
"type": "digitalocean",
|
|
|
|
"image": "ubuntu-12-04-x64",
|
|
|
|
"region": "nyc3",
|
2015-09-23 20:48:45 +00:00
|
|
|
"size": "512mb",
|
|
|
|
"snapshot_name": "nomad-{{timestamp}}"
|
2015-09-23 20:03:57 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"provisioners": [
|
|
|
|
{
|
|
|
|
"type": "shell",
|
|
|
|
"inline": [
|
|
|
|
"sudo apt-get -y update",
|
|
|
|
"sudo apt-get -y install unzip",
|
2015-09-24 02:49:02 +00:00
|
|
|
"curl -o /tmp/nomad.zip -L {{ user `bin_url` }}",
|
2015-09-24 00:55:31 +00:00
|
|
|
"sudo unzip -d /usr/local/bin /tmp/nomad.zip",
|
|
|
|
"mkdir -p /usr/local/etc/nomad"
|
2015-09-23 20:03:57 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": "upstart.nomad",
|
2015-09-23 23:52:38 +00:00
|
|
|
"destination": "/etc/init/nomad.conf"
|
2015-09-23 20:07:17 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": "default.hcl",
|
2015-09-23 20:48:45 +00:00
|
|
|
"destination": "/usr/local/etc/nomad/nomad.hcl"
|
2015-09-23 20:03:57 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|