github.com/marksheahan/packer@v0.10.2-0.20160613200515-1acb2d6645a0/website/source/docs/builders/digitalocean.html.md (about) 1 --- 2 description: | 3 The `digitalocean` Packer builder is able to create new images for use with 4 DigitalOcean. The builder takes a source image, runs any provisioning necessary 5 on the image after launching it, then snapshots it into a reusable image. This 6 reusable image can then be used as the foundation of new servers that are 7 launched within DigitalOcean. 8 layout: docs 9 page_title: DigitalOcean Builder 10 ... 11 12 # DigitalOcean Builder 13 14 Type: `digitalocean` 15 16 The `digitalocean` Packer builder is able to create new images for use with 17 [DigitalOcean](https://www.digitalocean.com). The builder takes a source image, 18 runs any provisioning necessary on the image after launching it, then snapshots 19 it into a reusable image. This reusable image can then be used as the foundation 20 of new servers that are launched within DigitalOcean. 21 22 The builder does *not* manage images. Once it creates an image, it is up to you 23 to use it or delete it. 24 25 ## Configuration Reference 26 27 There are many configuration options available for the builder. They are 28 segmented below into two categories: required and optional parameters. Within 29 each category, the available configuration keys are alphabetized. 30 31 In addition to the options listed here, a 32 [communicator](/docs/templates/communicator.html) can be configured for this 33 builder. 34 35 ### Required: 36 37 - `api_token` (string) - The client TOKEN to use to access your account. It 38 can also be specified via environment variable `DIGITALOCEAN_API_TOKEN`, 39 if set. 40 41 - `image` (string) - The name (or slug) of the base image to use. This is the 42 image that will be used to launch a new droplet and provision it. See 43 [https://developers.digitalocean.com/documentation/v2/\#list-all-images](https://developers.digitalocean.com/documentation/v2/#list-all-images) for 44 details on how to get a list of the the accepted image names/slugs. 45 46 - `region` (string) - The name (or slug) of the region to launch the 47 droplet in. Consequently, this is the region where the snapshot will 48 be available. See 49 [https://developers.digitalocean.com/documentation/v2/\#list-all-regions](https://developers.digitalocean.com/documentation/v2/#list-all-regions) for 50 the accepted region names/slugs. 51 52 - `size` (string) - The name (or slug) of the droplet size to use. See 53 [https://developers.digitalocean.com/documentation/v2/\#list-all-sizes](https://developers.digitalocean.com/documentation/v2/#list-all-sizes) for 54 the accepted size names/slugs. 55 56 ### Optional: 57 58 - `api_url` (string) - Non standard api endpoint URL. Set this if you are 59 using a DigitalOcean API compatible service. It can also be specified via 60 environment variable `DIGITALOCEAN_API_URL`. 61 62 - `droplet_name` (string) - The name assigned to the droplet. DigitalOcean 63 sets the hostname of the machine to this value. 64 65 - `private_networking` (boolean) - Set to `true` to enable private networking 66 for the droplet being created. This defaults to `false`, or not enabled. 67 68 - `snapshot_name` (string) - The name of the resulting snapshot that will 69 appear in your account. This must be unique. To help make this unique, use a 70 function like `timestamp` (see [configuration 71 templates](/docs/templates/configuration-templates.html) for more info) 72 73 - `state_timeout` (string) - The time to wait, as a duration string, for a 74 droplet to enter a desired state (such as "active") before timing out. The 75 default state timeout is "6m". 76 77 - `user_data` (string) - User data to launch with the Droplet. 78 79 ## Basic Example 80 81 Here is a basic example. It is completely valid as soon as you enter your own 82 access tokens: 83 84 ``` {.javascript} 85 { 86 "type": "digitalocean", 87 "api_token": "YOUR API KEY", 88 "image": "ubuntu-12-04-x64", 89 "region": "nyc2", 90 "size": "512mb" 91 } 92 ```