2015-09-24 19:03:28 +00:00
|
|
|
{
|
|
|
|
"variables": {
|
|
|
|
"bin_url": "{{ env `STATSITE_URL` }}"
|
|
|
|
},
|
|
|
|
"builders": [
|
|
|
|
{
|
|
|
|
"type": "digitalocean",
|
|
|
|
"image": "ubuntu-12-04-x64",
|
|
|
|
"region": "nyc3",
|
|
|
|
"size": "512mb",
|
2015-09-24 19:15:34 +00:00
|
|
|
"snapshot_name": "nomad-demo-statsite-{{timestamp}}"
|
2015-09-24 19:03:28 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"provisioners": [
|
|
|
|
{
|
|
|
|
"type": "shell",
|
|
|
|
"inline": [
|
|
|
|
"sudo apt-get -y update",
|
|
|
|
"sudo apt-get -y install unzip build-essential scons",
|
|
|
|
"curl -o /tmp/statsite.zip -L {{ user `bin_url` }}",
|
|
|
|
"mkdir -p /tmp/statsite",
|
|
|
|
"unzip -d /tmp/statsite /tmp/statsite.zip",
|
|
|
|
"cd /tmp/statsite/* && make",
|
|
|
|
"mv /tmp/statsite/*/statsite /usr/local/bin",
|
|
|
|
"rm -rf /tmp/statsite"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": "upstart.statsite",
|
|
|
|
"destination": "/etc/init/statsite.conf"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": "default.conf",
|
|
|
|
"destination": "/usr/local/etc/statsite.conf"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"post-processors": [
|
|
|
|
{
|
|
|
|
"type": "atlas",
|
2015-09-24 19:31:06 +00:00
|
|
|
"artifact": "hashicorp/nomad-demo-statsite",
|
2015-09-24 19:03:28 +00:00
|
|
|
"artifact_type": "digitalocean.image"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"push": {
|
|
|
|
"name": "hashicorp/nomad-demo-statsite",
|
|
|
|
"vcs": true
|
|
|
|
}
|
|
|
|
}
|