Commit Graph

74 Commits

Author SHA1 Message Date
hbdgr 7d723b7c7b builder/digitalocean: add snapshotTimeout option 2019-07-04 16:25:42 +02:00
Megan Marsh c03c3f4410 replace duplicate commHost functions with a single communicator helper that checks for ssh_host and does a statebag lookup for a given key 2019-07-03 13:30:29 -07:00
Megan Marsh eb8c74bf85 allow ssh_host config option to override host logic for all builders 2019-07-02 13:56:28 -07:00
Adrien Delorme a4bf94dd3c change Builder to be passed a context for cancellation
we have to to give it to our hook
2019-04-03 15:55:55 +02:00
Adrien Delorme 9f82b75e57 Use the hashicorp/go-getter to download files
* removed packer.Cache and references since packer.Cache is never used except in the download step. The download step now uses the new func packer.CachePath(targetPath) for this, the behavior is the same.
* removed download code from packer that was reimplemented into the go-getter library: progress bar, http download restart, checksuming from file, skip already downloaded files, symlinking, make a download cancellable by context.
* on windows if packer is running without symlinking rights and we are getting a local file, the file will be copied instead to avoid errors.
* added unit tests for step_download that are now CI tested on windows, mac & linux.
* files are now downloaded under cache dir `sha1(filename + "?checksum=" + checksum) + file_extension`
* since the output dir is based on the source url and the checksum, when the checksum fails, the file is auto deleted.
* a download file is protected and locked by a file lock,
* updated docs
* updated go modules and vendors
2019-03-13 12:11:58 +01:00
Andrew Starr-Bochicchio c0c5c6afac Add DigitalOcean post-processor. 2018-11-29 21:00:57 -05:00
Adrien Delorme 5389ab1694 pass config as a pointer so that ssh configuration is correctly set 2018-09-18 11:36:21 +02:00
Megan Marsh 38cc525ec7 new option allowing user to clean up the ephemeral ssh key from the authorized_keys file 2018-09-14 11:06:38 -07:00
Adrien Delorme 41f6e0334d refactor all copy pasted sshConfig with into communicator.Config.SSHConfigFunc
* still need to append the auth methods into an array for gracefullness
2018-08-22 17:02:23 +02:00
Matthew Hooker 366dc3da0a
move multistep imports to helper.
gomvpkg -from "github.com/mitchellh/multistep" -to "github.com/hashicorp/packer/helper/multistep"
2018-01-24 17:09:15 -08:00
Matthew Hooker 06c7136e30
compare regions against valid regions 2017-05-16 21:00:13 -07:00
Luke Farnell 3afd77a5e4
fixed logic error and fixed suggestion 2017-05-16 21:00:13 -07:00
Luke Farnell 0f354614c0
Region Validation 2017-05-16 21:00:13 -07:00
Luke Farnell abf2e618b5
Wait for snapshot transfer and change artifact output 2017-05-16 21:00:13 -07:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Orivej Desh 6762965696 Add -on-error command line argument to allow preserving artifacts on builder errors
Resolves #409
2016-09-16 12:15:00 +00:00
Vasiliy Tolstov ec4e95493d builder/digitalocean: add ability to specify api url
This is useful in case of using DigitalOcean compatibility api hosting.

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-02-06 14:15:32 +00:00
Mitchell Hashimoto 115d583cff helper/communicator: make host more generic 2015-06-13 19:23:33 -04:00
Mitchell Hashimoto 669f301881 builder/digitalocean: use helper/comm 2015-06-13 18:26:13 -04:00
Mitchell Hashimoto c9c9e2871c builder/digitalocean: fix build 2015-06-10 18:58:50 -07:00
Mitchell Hashimoto 7dc59677f9 Merge branch 'do_certificate' of https://github.com/ColinHebert/packer into ColinHebert-do_certificate 2015-06-10 18:57:56 -07:00
Mitchell Hashimoto 5da56d2aa6 builder/digitalocean: image, region, etc. required 2015-06-10 18:54:51 -07:00
Mitchell Hashimoto d9c48e82fb builder/digitalocean: switch to new lib 2015-06-10 14:02:06 -07:00
Mitchell Hashimoto 1d3a4d6aa2 packer: remove ConfigTemplate 2015-05-27 17:56:45 -07:00
Mitchell Hashimoto 7d0f94834e builder/digitalocean: interpolation change 2015-05-27 12:50:43 -07:00
Colin Hebert 42d05368ae Save the generated SSH key as a file in debug mode 2015-01-10 23:52:45 +11:00
Ryan Uber 010c77d05f builder/digitalocean: default to nyc3 2014-12-10 00:26:56 -08:00
Vasiliy Tolstov a5dc41a730 fix digitalocean v2 api content-type when using json
In case of using json we need to set content-type header.

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2014-11-02 01:47:04 +03:00
Vasiliy Tolstov f4c756a2cb fix copy/paste error
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2014-10-03 00:02:46 +04:00
Vasiliy Tolstov 6c6f3c24a5 add v2 api support
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2014-09-05 18:49:37 +04:00
Mitchell Hashimoto 90d4bcdbe8 builder/digitalocean: region supports vars [GH-1452] 2014-09-02 11:16:39 -07:00
Vasiliy Tolstov 4166c63732 add ability to set api url in template
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2014-08-28 16:53:07 +04:00
Mitchell Hashimoto 5c5d62733f fmt 2014-05-01 14:24:19 -07:00
Ross Smith II 2bcd9a304e builder/digitalOcean: use names/slugs as well as IDs for image/region/size 2014-04-29 20:33:31 -07:00
Ross Smith II 9cf76ff338 builder/digitalocean: updated default image_id, per #1032 2014-04-13 16:43:43 -07:00
Jack Pearkes 7a956e1a11 builder/digitalocean: add private_networking option for droplets 2013-12-27 10:26:27 -08:00
Chris Kozak f5d6df6416 Updated DigitalOcean default image id
It looks like DigitalOcean replaced the "Ubuntu 12.04" image with "Ubuntu 12.04.3".  We've updated the ImageID to point to the new image.
2013-12-17 17:41:47 +00:00
Ross Smith II 2cad46aa1f post-processor/vagrant: Adds vagrant support for digitalocean
Conflicts:
	post-processor/vagrant/post-processor.go
2013-11-05 14:27:28 -08:00
Jack Pearkes b13c25532c builder/digitalocean: add a droplet_name configuration value
Practically, this lets you set the hostname of the droplet
used for provisioning.
2013-11-03 17:35:58 +01:00
Mitchell Hashimoto a6150e6596 builder/all: update to warnings 2013-11-02 23:03:59 -05:00
Matthew Hooker 5315b19822 common/config: config filter function [GH-521]
Fixes #521
2013-10-13 11:01:12 -07:00
Matthew Hooker 7417748772 builder/digitalocean: Scrub config before logging [GH-516] 2013-10-10 15:04:42 -07:00
Mitchell Hashimoto 302871113a builder/digitalocean: retry on any pending event errors
/cc @pearkes - I hate this thing.
2013-09-04 21:20:41 -07:00
Mitchell Hashimoto 94b76036fc builder/digitalocean: new multistep API 2013-08-31 12:25:08 -07:00
Jack Pearkes 315d4ce5f5 builder/digitalocean: send a "shutdown" before snapshotting
Instead of pulling the plug on a droplet with the "poweroff" command,
we first send a soft shutdown to the API, then we poweroff to allow
the snapshot to properly complete.

Sending just a shutdown and then snapshotting wasn't as reliable as
sending the poweroff manually, for reasons unknown to me.

This fixes #332.
2013-08-24 13:04:51 +02:00
Mitchell Hashimoto 64d87bfaf3 *: switch to packer ConfigTemplate 2013-08-15 19:17:23 -07:00
Mitchell Hashimoto 332bdf6edc builder/*, provisioner/*: set user vars 2013-08-09 15:57:08 -07:00
Mitchell Hashimoto 0a31fac749 builder/digitalocean: use new template processing 2013-08-08 17:25:25 -07:00
Mitchell Hashimoto 5b7d8fbc74 rename builder/common to common since it is generally useful 2013-08-01 12:11:54 -07:00
Mitchell Hashimoto 56c3cbfb2a builder/common: common config struct for Packer configs 2013-07-23 22:48:31 -05:00