github.com/mattyr/nomad@v0.3.3-0.20160919021406-3485a065154a/demo/digitalocean/packer/statsite/packer.json (about) 1 { 2 "variables": { 3 "bin_url": "{{ env `STATSITE_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-statsite-{{timestamp}}" 12 } 13 ], 14 "provisioners": [ 15 { 16 "type": "shell", 17 "inline": [ 18 "sudo apt-get -y update", 19 "sudo apt-get -y install unzip build-essential scons", 20 "curl -o /tmp/statsite.zip -L {{ user `bin_url` }}", 21 "mkdir -p /tmp/statsite", 22 "unzip -d /tmp/statsite /tmp/statsite.zip", 23 "cd /tmp/statsite/* && make", 24 "mv /tmp/statsite/*/statsite /usr/local/bin", 25 "rm -rf /tmp/statsite" 26 ] 27 }, 28 { 29 "type": "file", 30 "source": "upstart.statsite", 31 "destination": "/etc/init/statsite.conf" 32 }, 33 { 34 "type": "file", 35 "source": "default.conf", 36 "destination": "/usr/local/etc/statsite.conf" 37 } 38 ], 39 "post-processors": [ 40 { 41 "type": "atlas", 42 "artifact": "hashicorp/nomad-demo-statsite", 43 "artifact_type": "digitalocean.image" 44 } 45 ], 46 "push": { 47 "name": "hashicorp/nomad-demo-statsite", 48 "vcs": true 49 } 50 }