From c8f9f2912adc85115cf3eb9327bea26e03bdffec Mon Sep 17 00:00:00 2001 From: Ryan Uber Date: Wed, 23 Sep 2015 13:48:45 -0700 Subject: [PATCH] demo/digitalocean: updates --- demo/digitalocean/packer/default.hcl | 11 +---------- demo/digitalocean/packer/nomad.packer.json | 6 +++--- demo/digitalocean/packer/upstart.nomad | 4 +++- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/demo/digitalocean/packer/default.hcl b/demo/digitalocean/packer/default.hcl index 3e426d6a6..ac3b9da83 100644 --- a/demo/digitalocean/packer/default.hcl +++ b/demo/digitalocean/packer/default.hcl @@ -1,14 +1,5 @@ -data_dir = "/tmp/nomad" +data_dir = "/opt/nomad" log_level = "DEBUG" enable_debug = true bind_addr = "0.0.0.0" disable_update_check = true -server { - enabled = true - bootstrap_expect = 1 -} -client { - enabled = true - servers = ["127.0.0.1:4647"] - node_class = "linux-64bit" -} diff --git a/demo/digitalocean/packer/nomad.packer.json b/demo/digitalocean/packer/nomad.packer.json index 394c89f92..296a78fcf 100644 --- a/demo/digitalocean/packer/nomad.packer.json +++ b/demo/digitalocean/packer/nomad.packer.json @@ -1,6 +1,5 @@ { "variables": { - "role": "{{ env `NOMAD_ROLE` }}", "bin_url": "{{ env `NOMAD_URL` }}" }, "builders": [ @@ -8,7 +7,8 @@ "type": "digitalocean", "image": "ubuntu-12-04-x64", "region": "nyc3", - "size": "512mb" + "size": "512mb", + "snapshot_name": "nomad-{{timestamp}}" } ], "provisioners": [ @@ -36,7 +36,7 @@ { "type": "file", "source": "default.hcl", - "destination": "/usr/local/etc/nomad.hcl" + "destination": "/usr/local/etc/nomad/nomad.hcl" } ] } diff --git a/demo/digitalocean/packer/upstart.nomad b/demo/digitalocean/packer/upstart.nomad index 1e61515c2..f716df212 100644 --- a/demo/digitalocean/packer/upstart.nomad +++ b/demo/digitalocean/packer/upstart.nomad @@ -6,5 +6,7 @@ stop on runlevel [!2345] respawn script - exec /usr/local/bin/nomad -config /usr/local/etc/nomad.hcl >> /var/log/nomad.log 2>&1 + CONFIG_DIR=/usr/local/etc/nomad + mkdir -p $CONFIG_DIR + exec /usr/local/bin/nomad -config $CONFIG_DIR >> /var/log/nomad.log 2>&1 end script