Rickard von Essen
96e9a8e6e9
Removed default value for ssh_username
2016-11-17 22:30:34 +01:00
Matthew Hooker
d920b3fbf4
run gofmt
2016-11-01 14:08:04 -07:00
Michael Nikitochkin
343c594bb3
Added UserDataFile support for DigitalOcean builder config.
2016-09-28 15:00:57 +02: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
Rickard von Essen
f446c1a1b7
builders/digitalocean: fixes timeout waiting for snapshot #3853
2016-09-08 10:32:43 +02:00
Toby Jaffey
37ef03c41c
Use config StateTimeout for DigitalOcean unlock and off transitions. ( #3444 )
...
Use config StateTimeout for DigitalOcean unlock and off transitions.
When DigitalOcean's API is responding slowly, the hardcoded timeouts are too short.
2016-08-14 21:12:30 +02:00
Andrew Starr-Bochicchio
6d31470757
Look up snapshot ID based by Droplet, not user.
2016-02-09 11:29:06 -05: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
Chris Bednarski
d6c02f5aeb
Change test to use something that looks like a real region code
2016-01-21 11:29:39 -08:00
Chris Bednarski
7b468af6b8
Merge pull request #2939 from bitrise-io/digitalocean_timeout_increase
...
increased DigitalOcean unlock wait timeouts
2016-01-13 14:11:09 -08:00
Andrew Starr-Bochicchio
2212125f46
Return DigitalOcean image ID in output.
2015-12-15 12:00:04 -05:00
Viktor Benei
eda2c9c605
actually make it 20 mins
2015-11-14 14:14:33 +01:00
Viktor Benei
7e568644a5
increased DigitalOcean unlock wait timeouts
2015-11-14 12:11:44 +01:00
Andy Williams
d36b653d3f
Make DigitalOcean artifact ID match AWS format
...
The Vagrant post processor expects the DO artifact ID to look like an
AWS artifact ID (region_id:snapshot_id). This commit makes the DO
artifact Id() function output this format.
2015-11-08 14:38:56 -05:00
Chris Bednarski
32b714e085
Update code.google.com/gosshold/ssh to point to golang.org/x/crypto/ssh, since this has been moved into core now
...
Fixes #2515
2015-07-30 19:19:59 -07:00
Chris Bednarski
51804e9132
Find a public IP address to provision a digital ocean box
2015-06-29 14:47:28 -07:00
Mitchell Hashimoto
84189f7a28
builder/*: properly save interpolation context
2015-06-22 09:22:42 -07: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
Mark Peek
16320372d6
Make some builder config usage more consistent with other builders
2015-06-12 14:02:09 -07:00
Mitchell Hashimoto
3933cc3217
Merge pull request #2208 from mitchellh/b-do-user
...
builder/digitalocean: user data support [GH-2113]
2015-06-11 16:57:04 -04:00
Mitchell Hashimoto
dcf140f99f
builder/digitalocean: more robust wait for pending
2015-06-10 19:53:07 -07:00
Mitchell Hashimoto
0e0cd28071
builder/digitalocean: fix failing unit tests
2015-06-10 19:31:48 -07:00
Mitchell Hashimoto
5cfd26a0d3
builder/digitalocean: user data support [GH-2113]
2015-06-10 19:29:48 -07: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
311c9eb5c2
builder/digitalocean: fix unit tests
2015-06-10 14:28:05 -07:00
Mitchell Hashimoto
9a393a5601
builder/digitalocean: only list user images
2015-06-10 14:18:38 -07:00
Mitchell Hashimoto
486c7e4ae6
builder/digitalocean: remove unused things
2015-06-10 14:07:24 -07:00
Mitchell Hashimoto
d9c48e82fb
builder/digitalocean: switch to new lib
2015-06-10 14:02:06 -07:00
Mitchell Hashimoto
23a48d6619
go fmt
2015-06-08 21:34:20 -07:00
Mitchell Hashimoto
60b60d9f75
Merge pull request #2036 from mojotalantikite/digitalocean_private
...
Fix digitalocean provider for private images [fixes mitchellh/packer#1792 ]
2015-06-08 21:18:33 -07:00
jszwedko
b1497b951c
code.google.com/p/go.crypto/ssh -> golang.org/x/crypto/ssh
...
code.google.com/p/go.crypto/ssh is now at golang.org/x/crypto/ssh as of
https://code.google.com/p/go/source/detail?spec=svn.crypto.69e2a90ed92d03812364aeb947b7068dc42e561e&repo=crypto&r=8fec09c61d5d66f460d227fd1df3473d7e015bc6
Using the code.google.com import redirects properly, but runs into
issues if you try to use a subpackage of `ssh`, e.g. `agent` which
refers to golang.org/x/crypto/ssh causing conflicts if your types expect
code.google.com/p/go.crypto/ssh.
This is a precursor to a PR for #1066 .
2015-05-28 08:17:49 -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
Mojo Talantikite
d174ffe1fa
Fix digitalocean provider for private images [ fixes mitchellh/packer#1792 ]
2015-03-12 19:01:51 -04:00
Emil Hessman
413b84af6b
builder/digitalocean: fix incorrect printf verb types
...
Fixes the following vet reports:
builder/digitalocean/builder_test.go:267: arg b.config.SSHUsername for printf verb %d of wrong type: string
builder/digitalocean/builder_test.go:300: arg b.config.RawSSHTimeout for printf verb %d of wrong type: string
builder/digitalocean/builder_test.go:341: arg b.config.RawStateTimeout for printf verb %d of wrong type: string
builder/digitalocean/builder_test.go:382: arg b.config.PrivateNetworking for printf verb %s of wrong type: bool
builder/digitalocean/builder_test.go:397: arg b.config.PrivateNetworking for printf verb %s of wrong type: bool
2015-02-25 05:29:53 +01:00
Ryan Uber
78d6dda005
builder/digitalocean: fix response decoding after api changes
2015-01-26 13:19:46 -08: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
Armon Dadgar
dd5de1e342
Merge pull request #1692 from nitrous-io/digitalocean-image-id
...
Use DigitalOcean image ID for artifact Id()
2014-12-08 11:16:08 -08:00
Cheah Chu Yeow
3d6865fafc
builder/digitalocean: use DigitalOcean image ID for artifact Id().
2014-11-24 08:14:05 +00:00
Vasiliy Tolstov
1e87e796dc
fix using private ip address in digitalocean builder
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2014-11-12 22:57:29 +03:00
Vasiliy Tolstov
8af85df822
add error code for failed auth
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2014-11-02 18:47:11 +03: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
e5ea82f920
fix digitalocean v2 api size response
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2014-10-30 22:16:21 +03:00
Mitchell Hashimoto
0db6cd3533
Merge pull request #1330 from qur/qemu-vagrant
...
Qemu vagrant
2014-10-28 08:42:17 -07:00
Vasiliy Tolstov
10612b5d89
try to avoid pagination
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2014-10-28 16:05:37 +03:00
Vasiliy Tolstov
e614a8c3d5
remove debug output
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2014-10-03 01:47:51 +04: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
Julian Phillips
90a57c411f
Expand Artifact API to expose build state
...
In order that something consuming an artifact can have access to extra
builder specific data add the State method which allows the caller to
ask for arbitary values by name.
2014-09-22 11:15:47 +01: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
e18f0f7f5b
fix missing parts
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2014-08-28 22:24:31 +04: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
Mitchell Hashimoto
e84e5e4f2c
Merge branch 'update-ssh-package' of github.com:higebu/packer into higebu-update-ssh-package
...
Conflicts:
builder/amazon/common/ssh.go
builder/digitalocean/ssh.go
builder/googlecompute/ssh.go
builder/openstack/ssh.go
communicator/ssh/communicator_test.go
communicator/ssh/keychain.go
communicator/ssh/keychain_test.go
2014-04-26 11:12:06 -07:00
Ross Smith II
203f85bfb0
Merge pull request #1034 from rasa/patch-1
...
builder/digitalocean: updated default image_id, per #1032
2014-04-16 22:36:31 -07:00
higebu
f087ce16dc
Fix the build problem by updating ssh package
2014-04-15 10:17:26 +09:00
Ross Smith II
9cf76ff338
builder/digitalocean: updated default image_id, per #1032
2014-04-13 16:43:43 -07:00
Ross Smith II
27491f93f8
use old ssh code until higebu's branch is ready, see #1019
2014-04-11 08:23:12 -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
c6392481f9
fixed artifact test
2013-11-05 14:27:42 -08: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
Mitchell Hashimoto
79f7936d66
Remove dependency on identifier package, use time ordered UUID [GH-541]
2013-10-16 16:21:14 -10: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
4067bab3d4
builder/digitalocean: don't panic if error contains no message [GH-492]
2013-10-04 10:44:04 -07:00
Jack Pearkes
26278a7c72
builder/digitalocean: error message key is "message" not "error_message"
2013-09-29 11:01:30 +02:00
Jason A. Beranek
71358222f0
communicator/ssh, builder/digitalocean: fix new SSH API from upstream
2013-09-19 23:30:22 -05:00
Mitchell Hashimoto
eaba28a370
communicator/ssh, builder/digitalocean: fix new SSH API from upstream
2013-09-15 12:21:21 -07:00
Mitchell Hashimoto
1df0735713
builder/digitalocean: retry longer and don't retry shutdown
2013-09-04 23:01:37 -07:00
Mitchell Hashimoto
362c32015d
builder/digitalocean: retry pending events a lot more
2013-09-04 23:00:54 -07:00
Mitchell Hashimoto
78302f2071
builder/digitalocean: get compilation working again
2013-09-04 22:53:37 -07:00
Mitchell Hashimoto
94d369f558
builder/digitalocean: give up on graceful shutdown more quickly
2013-09-04 22:51:28 -07:00
Mitchell Hashimoto
8643c70e35
builder/digitalocean: proper timeouts so poweroff retries
2013-09-04 22:26:05 -07:00
Mitchell Hashimoto
aedd1555d3
builder/digitalocean: properly cleanup goroutines for status checking
2013-09-04 22:21:59 -07:00
Mitchell Hashimoto
4af230a4dc
builder/digitalocean: actually, we want to try hard on shutdown
2013-09-04 22:14:30 -07:00
Mitchell Hashimoto
39f7a5a617
builder/digitalocean: break loop if we reach off state
...
Otherwise we get stuck in a long loop. Whoops.
2013-09-04 22:07:19 -07:00
Mitchell Hashimoto
82b46816d3
builder/digitalocean: retry power off a number of times
...
See comment.
2013-09-04 21:59:58 -07:00
Mitchell Hashimoto
306ebcf042
builder/digitalocean: looser pending event string matching.
...
Most APIs return "has a pending event" but power off seems to return
"already a pending event". WTF. Also, just wtf at the DigitalOcean API.
I can't wait until they change their english and this breaks. Because
it is definitely going to happen, and it's going to be such a fun time.
2013-09-04 21:29:07 -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
d8b048662f
builder/digitalocean: retry destroy a few times
2013-08-31 21:32:35 -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
45f3ca13cb
builder/digitalocean: use HTTP proxy if in env
2013-08-18 20:29:54 -06:00
Jack Pearkes
0dce7086dc
builder/digitalocean: better handling of url params in api requests
2013-08-16 19:47:22 +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
Mitchell Hashimoto
16d102d055
builder/*: switch to MultiErrorAppend
2013-07-19 19:08:25 -04:00
Mitchell Hashimoto
42059f9b07
builder/*: extract to common the config decoding
2013-07-19 15:00:32 -04:00
Mitchell Hashimoto
8e1e40c096
builder/*: convert to common StepProvision
2013-07-16 15:44:41 +09:00
Mitchell Hashimoto
3bf49d1c66
builder/digitalocean: use common connect ssh
2013-07-15 14:14:23 +09:00
Mitchell Hashimoto
05acb7b461
builder/digitalocean: unexport calcaulted settings
2013-07-14 21:20:29 +09:00
Mitchell Hashimoto
a0f1667df1
communicator/ssh: tweakable timeout on retry connection
2013-07-14 21:05:22 +09:00
Mitchell Hashimoto
9718a4656c
communicator/ssh: have a Connection func so we can re-establish
...
[GH-152]
2013-07-14 20:22:57 +09:00
Mitchell Hashimoto
3b4ef72e47
Unused keys are invalid in templates [GH-104]
2013-07-14 09:28:56 +09:00
Jack Pearkes
490279c6b9
builder/digitalocean: add tests for credentials via env vars
2013-07-12 09:47:45 +02:00
Jack Pearkes
d701adb3e0
builder/digitalocean: use detected env variables for credentials
2013-07-11 11:31:09 +02:00
Jack Pearkes
e11fbcdad2
builder/digitalocean: display friendler API error messages
...
Fixes #85
2013-07-01 09:29:45 +02:00
Mitchell Hashimoto
8a609b67c1
builder/*: Fail if provisioning fails [GH-33]
2013-06-26 17:54:57 -07:00
Mitchell Hashimoto
fd44adf2aa
builder/digitalocean: Make tests pass again
2013-06-24 09:25:00 -07:00
Jack Pearkes
76c2fcee87
website: update digitalocean state_timeout default
2013-06-24 09:07:33 +02:00
Jack Pearkes
513c8bc4bb
builder/digitalocean: raised state_timeout default to 6 minutes [GH-26]
2013-06-24 09:03:25 +02:00
Jack Pearkes
ba8fbc8621
builder/digitalocean: add configurable state_timeout
...
The state_timeout config allows you to determine the timeout
for "waiting for droplet to become [active, off, etc.]".
This still defaults to 3 minutes.
2013-06-23 12:51:51 +02:00
Mitchell Hashimoto
1da55ab4b6
builder/digitalocean: Reattempt SSH handshake a few times
...
I ran into a few cases where the droplet was active and a TCP connection
could be made, but SSH wasn't running yet and the handshake failed. A
race condition with the machine boot. This will retry the SSH handshake
a few times.
/cc @pearkes
2013-06-21 23:02:13 -07:00
Mitchell Hashimoto
da4dfbcd12
builder/digitalocean: Properly return errors
2013-06-19 21:00:51 -07:00
Mitchell Hashimoto
867e9d1c8f
builder/digitalocean: timeout TCP connections to SSH
2013-06-19 13:26:08 -07:00
Mitchell Hashimoto
b78fd17a0a
builder/digitalocean: compile with scrub changes
2013-06-19 13:26:03 -07:00
Mitchell Hashimoto
a775c97907
builder/digitalocean: Scrub sensitive information out of logs
...
/cc @pearkes
2013-06-19 13:18:53 -07:00
Mitchell Hashimoto
70fa3fbaac
builder/digitalocean: fmt
2013-06-18 22:02:09 -07:00
Mitchell Hashimoto
264e59d75d
builder/digitalocean: Implement Artifact destroy
...
/cc @pearkes
2013-06-18 21:54:15 -07:00
Mitchell Hashimoto
b9fb065d27
packer: Add Destroy method to artifact
...
[GH-18]
2013-06-18 16:01:14 -07:00
Jack Pearkes
4236ffc8eb
builder/digitalocean: only execute the snapshotname template if parsed
2013-06-18 00:06:59 +02:00
Jack Pearkes
e62bcefcb8
builder/digitalocean: check for err parsing template for snapshot name
2013-06-17 23:54:28 +02:00
Jack Pearkes
6eb0568f07
builder/digitalocean: print bad status code as string
2013-06-17 14:54:24 +02:00
Jack Pearkes
341cfb2c2d
builder/digitalocean: improve error messages from DO api
2013-06-17 14:54:18 +02:00
Jack Pearkes
477ac8cd31
builder/digitalocean: use text/template for the snapshot name
2013-06-17 14:21:15 +02:00
Jack Pearkes
1e17e90acd
builder/digitalocean: add configurable "event_delay" for sleeps
2013-06-17 13:28:21 +02:00
Jack Pearkes
c12e9ff9a8
builder/digitalocean: implement artifacts with the snapshot name
2013-06-17 13:01:42 +02:00
Jack Pearkes
25d5874042
builder/digitalocean: generate temp rsa keypairs for ssh communication
2013-06-15 22:43:18 +02:00
Mitchell Hashimoto
d8cdc88cbe
builder/digitalocean: Make tests pass
...
/cc @pearkes
2013-06-15 11:11:03 -07:00
Mitchell Hashimoto
f289ddce60
builder/digitalocean: Add support for -debug mode
...
/cc @pearkes
2013-06-15 11:09:26 -07:00
Mitchell Hashimoto
03d7a7f6b5
builder/digitalocean: Adhere to new interface, make default in Packer
...
@pearkes: I added "digital-ocean" to the default config since it will
be shipping with Packer. :)
2013-06-15 11:06:39 -07:00
Jack Pearkes
8ba8932552
builder/digitalocean: No need for destroy steps, builder works!
2013-06-14 15:26:03 +02:00
Jack Pearkes
a774e2b444
builder/digitalocean: completed initial pass at all steps.
2013-06-13 19:56:34 +02:00
Jack Pearkes
dd6e4e4933
builder/digitalocean: connect_ssh, create_droplet, droplet_info
2013-06-13 18:48:19 +02:00
Jack Pearkes
4e6993909c
builder/digitalocean: builder config tests and create_ssh_key step
2013-06-13 17:58:06 +02:00
Jack Pearkes
787a3178b3
builder/digitalocean: WIP commit of api interface and initial config
2013-06-13 16:03:10 +02:00