Megan Marsh
f7c1b5e940
add 30 minute timeout for destroying a VM
2019-04-23 12:55:59 -07:00
Calle Pettersson
65545073f8
Fix port number type
2019-04-21 08:33:34 +02:00
Aleksey Hariton
1bf3428263
Add tags to instance
2019-04-18 17:52:16 +03:00
Megan Marsh
105d3f8853
delete unencrypted temporary snapshot when encrypt_boot is true. Also, fix nil map error in region copy
2019-04-17 12:55:30 -07:00
Adrien Delorme
ad6d142e16
Merge pull request #7508 from displague/feature/add-linode
...
Add Linode Images builder
2019-04-17 10:59:42 +02:00
Megan Marsh
71f2017209
read stderr before we try to read the artchive.
2019-04-16 13:05:25 -07:00
Megan Marsh
8315be7e19
Merge pull request #7509 from hashicorp/investigate_7505
...
fix panic in StepConfigureVNC ( fix 7505 )
2019-04-16 11:24:55 -07:00
Adrien Delorme
56c7593725
fix panic in StepConfigureVNC
...
When the driver is the esx5 driver s.l won't be set at all. Meaning this will crash.
In the esx5 driver we try to dial possible ports to see if it works so it doesn't make sense to use packer's `net.ListenRangeConfig`. It could make sense to have a net.DialRangeConfig but this sounds a bit too specific and not broad enough to do.
fix #7505
2019-04-16 15:32:05 +02:00
Marques Johansson
99987c2d56
Add Linode Images builder
...
Packer Builder for [Linode Images](https://www.linode.com/docs/platform/disk-images/linode-images/ )
Adds the following builder:
* `linode`
Based on https://github.com/linode/packer-builder-linode (MPL/2)
(formerly maintained by @dradtke). Includes website docs and tests.
Relates to #174 , #3131
2019-04-15 20:40:59 -04:00
Megan Marsh
201c8c1332
make sure that you encrypt using the provided kms key id and not the default
2019-04-15 16:44:56 -07:00
Megan Marsh
45af9f0cbc
Merge pull request #7498 from hashicorp/do_7465
...
add keep_registered option to hyperv
2019-04-15 11:12:43 -07:00
Adrien Delorme
97f2914c6a
Merge pull request #7484 from yandex-cloud/yandex-cloud-builder
...
Builder for Yandex.Cloud
2019-04-15 14:02:43 +02:00
Megan Marsh
73205f3a91
add keep_registered option to hyperv
2019-04-12 15:59:09 -07:00
Adrien Delorme
d2f036ec44
Revert "Revert "Merge pull request #7391 from carlpett/proxmox-builder""
...
This reverts commit 032527ecfe
.
2019-04-12 12:26:34 +02:00
Gennady Lipenkov
ddd2106973
Remove LICENSE and THIRD-PARTY
2019-04-12 01:13:27 +03:00
Gennady Lipenkov
f9c7606452
Adopt new Builder interface signature
2019-04-12 01:10:52 +03:00
Gennady Lipenkov
8e4e314553
Bulk update 'yandex' builder
...
Squashed commit of the following:
commit ccc020231780179d241d46eef7c0ba103366aed0
Author: Yandex.Cloud Bot <ycloud-bot@yandex.ru>
Date: Tue Apr 9 14:38:30 2019 +0000
sync upstream
2019-04-12 01:00:54 +03:00
Gennady Lipenkov
a12c5d57ec
Bulk update builder (doc, acc test)
...
Squashed commit of the following:
commit 372db94a5c4bc81bd4149de5ea9c21946362f3f9
Author: Yandex.Cloud Bot <ycloud-bot@yandex.ru>
Date: Thu Apr 4 13:16:03 2019 +0000
sync upstream
2019-04-12 01:00:54 +03:00
Gennady Lipenkov
af333a5de0
Initial version
2019-04-12 01:00:51 +03:00
Adrien Delorme
63f5bbbc73
use our own copy of iochan.LineReader
2019-04-11 14:25:24 +02:00
Adrien Delorme
032527ecfe
Revert "Merge pull request #7391 from carlpett/proxmox-builder"
...
This reverts commit b7d62b2ae0
, reversing
changes made to c36eaf16f7
.
2019-04-11 14:19:25 +02:00
Adrien Delorme
aee73d745d
update code after go mod update
2019-04-11 14:19:24 +02:00
Adrien Delorme
6ff392d713
Update windows_container_communicator.go
...
after merge
2019-04-09 17:46:38 +02:00
Adrien Delorme
d72040f4fa
move retry code into the common/retry pkg and make retry context aware
2019-04-09 17:46:38 +02:00
Adrien Delorme
06941a86a3
make the file builder run provisioners for testing purposes
2019-04-08 20:09:21 +02:00
Adrien Delorme
f555e7a9f2
allow a provisioner to timeout
...
* I had to contextualise Communicator.Start and RemoteCmd.StartWithUi
NOTE: Communicator.Start starts a RemoteCmd but RemoteCmd.StartWithUi will run the cmd and wait for a return, so I renamed StartWithUi to RunWithUi so that the intent is clearer.
Ideally in the future RunWithUi will be named back to StartWithUi and the exit status or wait funcs of the command will allow to wait for a return. If you do so please read carrefully https://golang.org/pkg/os/exec/#Cmd.Stdout to avoid a deadlock
* cmd.ExitStatus to cmd.ExitStatus() is now blocking to avoid race conditions
* also had to simplify StartWithUi
2019-04-08 20:09:21 +02:00
Adrien Delorme
a81abd297b
Merge remote-tracking branch 'origin/master' into context_provisioner
2019-04-08 20:09:01 +02:00
Megan Marsh
b7d62b2ae0
Merge pull request #7391 from carlpett/proxmox-builder
...
Implement Proxmox builder
2019-04-08 09:54:11 -07:00
Calle Pettersson
65cd5bbd29
Change disk size config parameter name
2019-04-06 08:10:28 +02:00
Megan Marsh
3e72e65a6c
Merge pull request #7456 from hashicorp/do_5770
...
introduce the clean_resource_name to clean image/var names
2019-04-05 09:12:20 -07:00
Megan Marsh
04b57b3e32
fix tests; clean up ip file after build
2019-04-04 22:33:24 -07:00
Calle Pettersson
e9d5a1d272
Update to builder interface change
2019-04-04 15:20:46 -07:00
Calle Pettersson
2f754c38f8
Add validation of interface implementation for both proxmox.Client and mocks
2019-04-04 15:20:46 -07:00
Calle Pettersson
c4ce295f67
Add tests for step_start_vm cleanup
2019-04-04 15:20:46 -07:00
Calle Pettersson
4c1fbfdd61
Shifted special runes are already handled, simplify SendKey
2019-04-04 15:20:46 -07:00
Calle Pettersson
0765bc2283
Add tests for step_type_boot_command, fix found bug (shifted chars were not lower cased)
2019-04-04 15:20:46 -07:00
Calle Pettersson
28ca0f71b5
Add tests for step_convert_to_template
2019-04-04 15:20:46 -07:00
Calle Pettersson
3d5f433b22
Add more finalizetemplate tests, fix found bug
2019-04-04 15:20:46 -07:00
Calle Pettersson
5eb600bf88
Add draft of step test
2019-04-04 15:20:46 -07:00
Calle Pettersson
2e3086be5a
Initial tests
2019-04-04 15:20:46 -07:00
Calle Pettersson
9f8fc37fde
Implement Proxmox builder
2019-04-04 15:20:46 -07:00
Megan Marsh
196028a7ed
Merge pull request #7444 from hashicorp/docker_windows
...
Docker windows
2019-04-04 09:30:43 -07:00
Paul Meyer
7fc8901d8f
Merge pull request #7464 from paulmey/fix-snapshots
...
[azure] Fix: Power off before taking snapshot (windows)
2019-04-03 16:38:04 -07:00
Adrien Delorme
c4f3dccc14
rename interpolation context from ctx to ictx and contexts to ctx to avoid conflicts
2019-04-03 15:56:15 +02: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
9836dad0c9
introduce the clean_resource_name to clean image names and deprecate the old ones
2019-04-03 11:25:51 +02:00
Megan Marsh
17c14770a7
Merge pull request #7450 from AkshatM/rename_security_group_cidr_to_security_group_cidrs
...
Rename and change `temporary_security_group_source_cidr` to accept a list of strings (for Amazon builders).
2019-04-02 10:54:31 -07:00
Paul Meyer
eb274c4e87
Power off before shapshotting
2019-04-01 18:40:50 +00:00
Megan Marsh
874a4ff8c7
Merge pull request #7451 from bh9/master
...
Allow both ports and networks in openstack builder
2019-04-01 09:30:39 -07:00
Adrien Delorme
225f4bab1f
Merge pull request #7446 from hashicorp/do_6928
...
remove default ssh_username from oracle classic builder, but add note…
2019-04-01 17:24:36 +02:00
bh9
cbbbc451b5
Allow both ports and networks in openstack builder
...
Current code would throw an index out of range exception when trying to access `s.Networks[len(s.Networks)]` when `len(s.Ports)>0` and would ignore the first `len(s.Ports)` entries of `s.Networks`, fix by shifting access to `s.Networks` back by `len(s.Ports)` so that the final read is `networks[len(s.Networks)+len(s.Ports)-1].UUID=s.Networks[len(s.Networks)+len(s.Ports)-1-len(s.Ports)]` which is necessarily the last member of `s.Networks`
2019-04-01 11:43:21 +01:00
Akshat Mahajan
f07e4214cc
Addresses issues #5384 , #5494 : Rename and change `temporary_security_group_source_cidr`
...
to accept a list of strings (for Amazon builders).
Per this change, `temporary_security_group_source_cidr` in the configuration:
1. Will be renamed to `temporary_security_group_source_cidrs`.
2. Will accept a list of CIDRs.
3. Will have its documentation updated to reflect this change.
4. Will have a fixer attached for newer templates to avail of.
2019-03-30 15:47:03 -07:00
Megan Marsh
b3c6dd0baa
fix tests
2019-03-29 15:52:41 -07:00
Megan Marsh
bcacd331c3
change cpu to cpus and ram_size to memory in order to bring hyper v into line with other builder defaults
2019-03-29 15:12:51 -07:00
Megan Marsh
b764b1d7e1
fix tests
2019-03-29 15:05:51 -07:00
Megan Marsh
a84fc6bde9
remove default ssh_username from oracle classic builder, but add note in docs.
2019-03-29 14:24:12 -07:00
Megan Marsh
af06334114
fix tests
2019-03-29 11:37:23 -07:00
Megan Marsh
6407a579f0
Document why we need windows communicator in code
2019-03-29 11:21:07 -07:00
Megan Marsh
12b9004c76
reduce duplicated code
2019-03-29 11:14:01 -07:00
Megan Marsh
0860edeed8
fix mocks
2019-03-28 16:55:35 -07:00
Megan Marsh
70150ffa0f
set powershell entrypoint for windows containers
2019-03-28 16:46:07 -07:00
Megan Marsh
36f2634352
can't use docker cp so call powershell to do this natively. Fix implementation for upload, uploadDir, and download in windows container communicator
2019-03-28 16:20:05 -07:00
Megan Marsh
af01860fa9
remove old docker-toolbox limitation.
2019-03-27 15:29:22 -07:00
Megan Marsh
3b87f2a519
stop container before committing if windows
2019-03-27 15:25:51 -07:00
Megan Marsh
8f3313d81e
Create new docker communicator for windows containers
2019-03-27 15:25:32 -07:00
Megan Marsh
9f1a4e0fed
Merge pull request #7423 from hashicorp/lock_ports
...
Lock packer ports using a lock file
2019-03-26 10:35:18 -06:00
Adrien Delorme
ac92916b01
StepConfigureVNC: close listener only once
2019-03-26 10:58:51 +01:00
Megan Marsh
e97f864016
Merge pull request #7395 from josepand/openstack_force_delete
...
Expose force_delete for openstack builder
2019-03-25 17:34:00 -06:00
Megan Marsh
e5ddf3e56b
Merge pull request #7419 from vhaidamaka/vbox_check_none_communicator
...
Validate 'none' communicator in the virtualbox builder
2019-03-25 17:09:17 -06:00
Paul Meyer
e4bea87a20
Merge pull request #7211 from riezebosch/master
...
arm-builder: specify zone resilient image from config
2019-03-19 08:59:29 -07:00
Adrien Delorme
a3838ecfad
error on negative ports
2019-03-19 15:21:09 +01:00
Adrien Delorme
5a6dffde9a
use port as ints
2019-03-19 15:01:12 +01:00
Adrien Delorme
f828b72c10
step configure vnc: allow to use ESX5Driver again
2019-03-19 12:54:15 +01:00
Adrien Delorme
c214f6735b
make everything a uint
2019-03-19 12:54:15 +01:00
Adrien Delorme
ae182a7c20
qemu stepForwardSSH: use common/net pkg to find open port
2019-03-19 12:54:15 +01:00
Adrien Delorme
446105e384
quemu stepConfigureVNC: use common/net pkg to find open port
2019-03-19 12:54:15 +01:00
Adrien Delorme
f67b5ff59d
virtualbox StepConfigureVRDP: use common/net pkg to find open port
2019-03-19 12:54:15 +01:00
Adrien Delorme
59370986fb
virtualbox StepForwardSSH: use common/net pkg to find open port
2019-03-19 12:54:15 +01:00
Adrien Delorme
b5d78d47f5
vmware StepConfigureVNC: use common/net pkg to find open port
2019-03-19 12:54:15 +01:00
Vadym Haidamaka
414d0750f0
Add tests to validate 'none' communicator in the virtualbox builder
2019-03-16 18:18:29 +02:00
Vadym Haidamaka
0263503c45
Validate virtualbox_version_file and guest_additions_mode when communicator is none
2019-03-16 18:15:27 +02:00
Esten Rye
ba5385b224
Fix invalid character issue on Windows.
...
Output from driver includes a `\r` character. This change adds logic to
trim `\r` and `\n` values from parsed output.
#7414
2019-03-15 20:00:27 -05:00
Megan Marsh
d505bc59a0
Merge pull request #7415 from programmer04/improve-name-conflict-msg
...
fix 7403: Improve error message for conflicting images name
2019-03-15 16:01:41 -07:00
Megan Marsh
24c42e4a1f
Merge pull request #7397 from vhaidamaka/fix-7321
...
Add vagrant-cloud post-processor support for the vagrant builder
2019-03-15 16:00:05 -07:00
programmer04
596a9cc7ff
Improve error message for AWS and Alibaba
2019-03-15 23:38:05 +01: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
Megan Marsh
0196d7f835
Merge pull request #7370 from sargun/allow-users-to-specify-custom-block-device-mapping
...
amazon-chroot: Allow users to specify custom block device mapping
2019-03-12 14:21:23 -07:00
Vadym Haidamaka
4855bc79c9
Add vagrant-cloud post-processor support for the vagrant builder
2019-03-12 05:33:46 +02:00
josepand
f2b42f2b4b
Expose force_delete for openstack builder
...
Very similar to how its exposed in terraform adds an optional force_delete config entry on the openstack builder.
2019-03-11 18:39:47 +00:00
Megan Marsh
67fe820465
Merge pull request #7361 from hashicorp/fix_insecure_skip_tls_verify
...
fix proxy and tls
2019-03-07 09:21:06 -08:00
Lukas Kämmerling
633934369c
Use Context of run method and allow users to cancel the build
2019-03-07 11:41:39 +01:00
Lukas Kämmerling
cc2267fd2a
Fix usage of rescue system
2019-03-07 07:24:22 +01:00
Lukas Kämmerling
b6ee0ea736
Fix Format
2019-03-06 08:05:08 +01:00
Lukas Kämmerling
7730cdcb56
Fix usage of freebsd64 rescue image
2019-03-06 07:57:51 +01:00
Megan Marsh
5aeab4ec06
Merge pull request #7300 from kmbulebu/openstack_app_creds
...
OpenStack: Support Application Credential Authentication
2019-03-05 13:11:51 -08:00
Megan Marsh
8b2fb15f4d
Merge pull request #7375 from lrxcy/fix_190220
...
fix 'Acceptance Tests can't find image problem'
2019-03-05 09:41:49 -08:00
wb-ywq399345
035b9e5cda
fix 'Acceptance Tests can't find image problem'
2019-03-05 16:14:59 +08:00
Megan Marsh
3ed9fe6dee
remove unused imports
...
remove HttpClientWithEnvironmentProxy from amazon builders; let access config handle it
2019-03-04 16:42:33 -08:00
Megan Marsh
0ed57a37a3
dont overwrite session config in ebs builder
2019-03-04 16:41:31 -08:00
Megan Marsh
ca9a5daf29
fix proxy and tls
2019-03-04 16:41:31 -08:00