Commit Graph

126 Commits

Author SHA1 Message Date
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
wb-ywq399345 035b9e5cda fix 'Acceptance Tests can't find image problem' 2019-03-05 16:14:59 +08:00
bozhi.ch 0174a502eb support -force option and update docs 2018-12-05 11:50:35 +08:00
bozhi.ch a485bcfdf3 delete copied image and snapshots if corresponding options are specified 2018-11-28 21:34:21 +08:00
bozhi.ch 7704ff2f24 apply tags to relevant snapshots 2018-11-26 16:58:32 +08:00
bozhi.ch 3c1395eb04 support wait_snapshot_ready_timeout for much bigger disk 2018-11-25 16:05:26 +08:00
bozhi.ch 3c2c13a021 support creating image without data disks 2018-11-19 15:25:12 +08:00
Mikhail Ushanov 536252683e builders: reuse private key file reading function
Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
2018-11-08 14:25:50 +03:00
bozhi.ch c3a60ad0ce add options for system disk properties 2018-10-30 21:09:59 +08:00
Matthew Hooker 9181570bc3
remove stray struct dumps in logs 2018-09-27 00:14:05 -07:00
zhuzhih2017 676b28ecc5
Merge pull request #6764 from chhaj5236/feature/support_disable_stop_instance
support disable_stop_instance option for some specific scenarios
2018-09-27 14:52:07 +08:00
bozhi.ch bb19cdeb55 support disable_stop_instance option for some specific scenarios 2018-09-25 22:02:05 +08:00
bozhi.ch 1f3a517a19 fix type error in step_create_tags 2018-09-25 20:20:10 +08:00
zhuzhih2017 9e3e2e83ae
Merge pull request #6720 from chhaj5236/fix/attach_keypair
fix attaching keypair error due to missing keypair name
2018-09-19 14:14:55 +08:00
bozhi.ch 3c312eb2a0 change b.config to pointer 2018-09-18 21:40:57 +08:00
chhaj5236 43e091de15
Merge branch 'master' into feature/support_tags 2018-09-17 16:50:44 +08:00
zhuzhih2017 31bbe2983b
Merge pull request #6688 from chhaj5236/feature/support_ssh_private_ip
support ssh with private ip address
2018-09-17 16:46:38 +08:00
bozhi.ch b3aae89a53 fix attaching keypair error due to missing keypair name 2018-09-16 18:19:00 +08:00
bozhi.ch b8a3e3b8f4 support adding tags to image 2018-09-16 18:16:13 +08: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
bozhi.ch 743be8a808 support ssh with private ip address 2018-09-11 16:56:57 +08:00
Adrien Delorme 0938b640cc use key pair name from config 2018-08-29 14:40:33 +02:00
Adrien Delorme 1e71712cc9 builder.alicloud: stop using config from statebag 2018-08-29 14:40:33 +02:00
Adrien Delorme dffcbb7a35 builder.alicloud: use c.Comm for ssh 2018-08-29 14:40:33 +02:00
Adrien Delorme 9a9b82715b config.Comm.SSHKeyPair => SSHKeyPairName 2018-08-29 14:40:33 +02:00
Adrien Delorme b83c72fd54 more private keys in config 2018-08-29 14:40:32 +02:00
Adrien Delorme 51d2aac9f6 SSHPrivateKey => SSHPrivateKeyFile 2018-08-29 14:40:32 +02:00
Megan Marsh 340363a649
Merge pull request #6613 from hashicorp/merge_ssh_config_funcs
Merge ssh config funcs from builders
2018-08-23 16:03:36 -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
Megan Marsh ff6a039d5b replace scrubconfig with packer.LogSecretFilter.Set
filter winrm password from logs
Add new root-level packer template option, sensitive-variables, to tell us what user variables to mark sensitive.
2018-08-20 15:35:55 -07:00
He Guimin 1a17b799f1 Support describing and checking source image coming from marketplace 2018-08-15 00:14:02 +08:00
willmao 7bab499b73 fix vpc clean up issue 2018-06-25 09:16:06 +08:00
willmao f511c706c9 fix alicloud builder eip allocating issue 2018-06-23 16:34:45 +08:00
Pavel Vasilevich 4e2b1756f9 Fix misprints in steps names 2018-06-15 12:12:40 +07:00
DanHam 96adb4a9d1
Remove tmp files created by builder/alicloud/ecs tests 2018-04-30 18:16:46 +01:00
Josh Soref 933ac20e68 spelling: instance 2018-03-13 08:04:50 +00:00
Josh Soref 3a31baae4f spelling: incorrect 2018-03-13 08:00:05 +00:00
Josh Soref 939e7d5587 spelling: delete 2018-03-13 07:36:38 +00:00
Josh Soref 7895051962 spelling: attribute 2018-03-13 07:12:16 +00:00
Josh Soref 75a7ceec48 spelling: alicloud 2018-03-13 07:09:12 +00:00
Josh Soref fe98bcc5a1 spelling: address 2018-03-13 07:07:10 +00:00
Matthew Hooker 7a189a83a1
fix imports
`find . -type f -name '*.go' -not -path "./vendor/*" -exec goimports -w {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker a831d522be
change run signatures
Run now takes a context as well as a statebag. We'll assign the context
to the blank identifier to prevent namespace collisions. We'll let the
step authors opt-in to using the context.

`find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`
2018-01-24 17:09:17 -08: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 ebe995c0ff
run goimports 2018-01-22 17:21:10 -08:00
QuantumGhost a90376f12a Attach keypair before starting instance in alicloud builder
[Documentation of `AttachKeyPair`](https://goo.gl/gC3srG) states that
attaching keypair to running instance takes effect after reboot.
So we need to attach keypair before starting instance to avoid an
additional restart.
2017-12-29 10:13:26 +08:00
zhuzhih2017 bdc1fa0527
Merge pull request #5641 from zhuzhih2017/master
Add security token supported and TLS handshake timeout support
2017-11-28 11:15:56 +08:00
zhuzhih2017 de0017c37a Add security token supported and TLS handshake timeout support 2017-11-28 10:32:17 +08:00
Joe Ferguson 5c2f758053 🎨 Fix typo in "copyed" -> "copied" usages. 2017-10-26 07:42:49 -05:00
zhuzhih2017 1861a22c77 Merge pull request #5219 from zhuzhih2017/master
update alicloud go sdk and enable multi sites support for alicloud
2017-09-06 09:41:38 +08:00
Luke Farnell 7c3eb33cda Fixed spelling mistakes 2017-08-07 13:45:50 -04:00
zhuzhih2017 096a0cd4fb update aliyun go sdk and enable multi sites support for alicloud 2017-08-04 09:56:04 +08:00
zhuzhih2017 8cf8079cad rename variable name to avoid misunderstanding 2017-07-21 09:47:21 +08:00
zhuzhih2017 62da0e7607 fix keypair error for debug mode and increate the wait time to avoid the timeout failure, add the more example 2017-07-20 11:13:59 +08:00
Kent Wang e59678a033 Fix alicloud-ecs typo
* Fix typo: internet_max_bandwith_out -> internet_max_bandwidth_out
2017-06-11 16:03:28 +08:00
Kent Wang 6da9802a33 builder/alicloud-ecs: Fix chooseNetworkType
* Choose VpcNet when KeyPairName is set
* Code cleanup
2017-06-11 16:01:09 +08:00
Kent Wang a40bb9af99 Fix ssh config must specify HostKeyCallback
Fixes: #5001
2017-06-11 15:58:45 +08:00
zhuzhih2017 2de00f2ff8 add check rule for image_name 2017-06-02 16:47:50 +08:00
zhuzhih2017 7bc0f17ce5 fix the wrong number args in step_create_instance 2017-06-02 11:37:16 +08:00
zhuzhih2017 b9eee0805e Merge branch 'master' of https://github.com/zhuzhih2017/packer 2017-06-02 11:28:53 +08:00
zhuzhih2017 7f91069c2c add rule to prevent the source_image name include spaces and fix the step_run_instance report wrong message problem 2017-06-02 11:28:41 +08:00
Matthew Hooker 2fd41f4707
grammar fixes. 2017-06-01 19:33:12 -07:00
Matthew Hooker fdfd01eaea
formatting 2017-06-01 17:14:51 -07:00
Matthew Hooker 0348b2d3da
don't need alicloud in file name 2017-06-01 15:52:57 -07:00
Matthew Hooker e72163264b
spelling and grammar fixes 2017-06-01 15:49:45 -07:00
Matthew Hooker 8bc038d8b8
remove alicloud_ prefix 2017-06-01 15:47:47 -07:00
Matthew Hooker 8db397765c
spelling and formatting 2017-06-01 15:47:46 -07:00
zhuzhih2017 b2aa40655b fix long line format 2017-05-26 10:59:53 +08:00
zhuzhih2017 5e7e5a419d format the code as CI required 2017-05-26 10:23:36 +08:00
zhuzhih2017 7b9f93c75f add retry logic when attach keypair failed 2017-05-26 09:57:00 +08:00
zhuzhih2017 a26c72f38e fix the comments about root and apply the keypair with latest dependence 2017-05-25 18:27:54 +08:00
zhuzhih2017 d646e1d035 refactor the code according hashicorp rename the repository 2017-04-18 15:14:45 +08:00
zhuzhih2017 0400ebae95 Fix the code according PR review 2017-03-12 10:22:25 +08:00
zhuzhih2017 5e44a28a42 fix the missing access key for testcase 2017-03-03 17:56:48 +08:00
zhuzhih2017 fadfb696dd Add packer plugin which support alicloud ecs images 2017-03-03 16:56:17 +08:00