github.com/mattyr/nomad@v0.3.3-0.20160919021406-3485a065154a/demo/digitalocean/packer/nomad/packer.json (about) 1 { 2 "variables": { 3 "bin_url": "{{ env `NOMAD_URL` }}" 4 }, 5 "builders": [ 6 { 7 "type": "digitalocean", 8 "image": "ubuntu-12-04-x64", 9 "region": "nyc3", 10 "size": "512mb", 11 "snapshot_name": "nomad-demo-{{timestamp}}" 12 } 13 ], 14 "provisioners": [ 15 { 16 "type": "shell", 17 "inline": [ 18 "apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D", 19 "echo 'deb https://apt.dockerproject.org/repo ubuntu-precise main' > /etc/apt/sources.list.d/docker.list", 20 "sudo apt-get -y update", 21 "sudo apt-get -y install unzip docker-engine curl", 22 "curl -o /tmp/nomad.zip -L {{ user `bin_url` }}", 23 "sudo unzip -d /usr/local/bin /tmp/nomad.zip", 24 "mkdir -p /usr/local/etc/nomad" 25 ] 26 }, 27 { 28 "type": "file", 29 "source": "upstart.nomad", 30 "destination": "/etc/init/nomad.conf" 31 }, 32 { 33 "type": "file", 34 "source": "default.hcl", 35 "destination": "/usr/local/etc/nomad/nomad.hcl" 36 } 37 ], 38 "post-processors": [ 39 { 40 "type": "atlas", 41 "artifact": "hashicorp/nomad-demo", 42 "artifact_type": "digitalocean.image" 43 } 44 ], 45 "push": { 46 "name": "hashicorp/nomad-demo", 47 "vcs": true 48 } 49 }