Report this

What is the reason for this report?

packer.io wont work with DO

Posted on April 28, 2016

Hello, I have been following the instructions for Packer.io here:

https://www.digitalocean.com/community/tutorials/how-to-install-and-get-started-with-packer-on-an-ubuntu-12-04-vps

I have not deviated from the directions that I know of. All of the example packer.io templates I have found have failed validation.

root@packer:~/packer# packer validate foo.json
Failed to parse template: Error parsing JSON: invalid character '"' after object key:value pair
At line 6, column 6 (offset 158):
    5:     "region": "NYC3"
    6:     "
           ^

Here is the code I used right from the sample (excluding my API key)

{
  "builders": [{
    "type": "digitalocean",
    "api_token": "YOUR API TOKEN",
    "region": "nyc3"
    "size": "512mb"
    "image": "ubuntu-14-04-x64"
  }],

  "provisioners": [{
    "type": "shell",
    "inline": [
      "sleep 30",
      "sudo apt-get update",
      "sudo apt-get install -y apache2"
    ]
  }]

}

Anyone have a working packer.io template I can try? Or know why I can not get past packer validation?

Regards, James

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.