open-nomad/demo/digitalocean/packer/nomad/packer.json

50 lines
1.1 KiB
JSON
Raw Normal View History

{
"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",
2015-09-24 19:15:34 +00:00
"snapshot_name": "nomad-demo-{{timestamp}}"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"sudo apt-get -y update",
"sudo apt-get -y install unzip",
"curl -o /tmp/nomad.zip -L {{ user `bin_url` }}",
"sudo unzip -d /usr/local/bin /tmp/nomad.zip",
2015-09-24 20:19:48 +00:00
"mkdir -p /usr/local/etc/nomad",
"curl -s https://get.docker.com/gpg | sudo apt-key add -",
"curl -s https://get.docker.com/ | sudo sh"
]
},
{
"type": "file",
"source": "upstart.nomad",
2015-09-23 23:52:38 +00:00
"destination": "/etc/init/nomad.conf"
},
{
"type": "file",
"source": "default.hcl",
2015-09-23 20:48:45 +00:00
"destination": "/usr/local/etc/nomad/nomad.hcl"
}
2015-09-24 17:11:46 +00:00
],
"post-processors": [
{
"type": "atlas",
"artifact": "hashicorp/nomad-demo",
2015-09-24 17:51:23 +00:00
"artifact_type": "digitalocean.image"
2015-09-24 17:11:46 +00:00
}
],
"push": {
"name": "hashicorp/nomad-demo",
"vcs": true
}
}