Commit Graph

60 Commits

Author SHA1 Message Date
Adrien Delorme e6cbb013ba add // go:generate struct-markdown to all previously edited files 2019-06-05 16:42:18 +02:00
Adrien Delorme f1917edd34 generate the comments for config struct of builders scraping doc website 2019-06-05 16:42:17 +02:00
Megan Marsh d9960fdaeb use length instead of a nil test. 2019-06-03 15:13:49 -07:00
Aleksey Hariton 1bf3428263 Add tags to instance 2019-04-18 17:52:16 +03: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 5a6dffde9a use port as ints 2019-03-19 15:01:12 +01:00
Adrien Delorme c214f6735b make everything a uint 2019-03-19 12:54:15 +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
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
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 0938b640cc use key pair name from config 2018-08-29 14:40:33 +02:00
Adrien Delorme e0e6b0b8f7 builder.cloudstack: use c.Comm for ssh 2018-08-29 14:40:33 +02:00
Adrien Delorme 51d2aac9f6 SSHPrivateKey => SSHPrivateKeyFile 2018-08-29 14:40:32 +02: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
Sergio Millan Rodriguez befdb59da6 renaming public_ssh_port to public_port 2018-08-22 10:17:46 +01:00
Sergio Millan Rodriguez d90dfc096a adding public_ssh_port flag to use a fixed port in the forwarding rules 2018-07-24 18:39:02 +01:00
Sergio Millan Rodriguez f4020835d6 flag to setup networking without firewall rules 2018-07-16 13:06:51 +02:00
Sergio Millan Rodriguez 472a7820eb Using UI keypair meaningful message 2018-07-16 11:39:15 +02:00
Sergio Millan Rodriguez e729b21212 passing projectid to getRootVolumeID rather than the whole config struct 2018-07-16 11:38:14 +02:00
Sergio Millan Rodriguez a41a4658ee make packer builder honour projectid setting if provided 2018-07-13 17:58:46 +02:00
Sergio Millan Rodriguez eae0556dc5 Add option to enable/disable create firewall/acl rules 2018-07-13 17:58:39 +02:00
Josh Soref 466f0d2be4 spelling: firewall 2018-03-13 07:49:46 +00:00
Josh Soref 33bf6de921 spelling: exceeds 2018-03-13 07:46:49 +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 b42c916f9a
cloudstack: check that template was created 2017-09-26 13:36:53 -07:00
Rickard von Essen 516bf52115 Merge pull request #5173 from rickard-von-essen/cloudstack-fixes
cloudstack: Move ipaddress, host port, and source to statebag
2017-09-05 06:29:22 +02:00
Rickard von Essen cad3978e6a
cloudstack: Updated after review 2017-08-31 12:00:29 -07:00
Rickard von Essen 1a1ab3863c
cloudstack: Add support for Security Groups
Adds two new options:
- `create_security_group` which automatically creates a temporary SG.
- `security_groups` which takes a list of SGs to attach to the instance.
2017-08-31 12:00:03 -07:00
Vijaya Bhaskar Reddy Kondreddi e45223a867 Fix -on-error issue not working.
When we supply -on-error flag for Packer with Hyper-v builder, it does not do anything.
2017-09-01 00:14:28 +05:30
Rickard von Essen 858f1227af
cloudstack: Updated after review (2) 2017-07-27 21:32:47 +02:00
Rickard von Essen 26cd27dc7c
cloudstack: Updated after review 2017-07-26 21:34:11 +02:00
Rickard von Essen 2fea167294
cloudstack: Updated after review 2017-07-26 19:01:12 +02:00
Rickard von Essen 89dcc93f1c cloudstack: Print instance password if debug mode 2017-07-26 07:38:05 +02:00
Rickard von Essen fc964bfab2 cloudstack: Setup temporary SSH keypair 2017-07-26 07:38:05 +02:00
Rickard von Essen 1bf8a0c6a1
cloudstack: Move ipaddress and host port to state 2017-07-18 21:40:36 +02:00
Rickard von Essen 07fffd7cd5 cloudstack: moved instanceSource to statebag 2017-07-18 16:39:28 +02:00
Rickard von Essen f47c41372e
cloudstack: Add support for ssh_agent_auth 2017-07-14 21:25:20 +02:00
Rickard von Essen 285b1391ae Merge pull request #5123 from rickard-von-essen/cloudstack-err
cloudstack: Improved error reporting
2017-07-14 13:22:18 +02:00
Rickard von Essen 4a6d029554 Merge pull request #5125 from rickard-von-essen/cloudstack-cidr
cloudstack: Add default cidr_list [ 0.0.0.0/0 ]
2017-07-14 11:14:51 +02:00
Rickard von Essen 89b9b4c456
cloudstack: Add default cidr_list [ 0.0.0.0/0 ] 2017-07-14 11:12:41 +02:00
Rickard von Essen 62dac4a168
cloudstack: some updates after review 2017-07-14 11:09:21 +02:00
Rickard von Essen 0d7c3ac171
cloudstack: Allow reading api_url, api_key, and secret_key from env vars
If unset reads:

- `api_url` from `CLOUDSTACK_API_URL`
- `api_key` from `CLOUDSTACK_API_KEY`
- `secret_key` from `CLOUDSTACK_SECRET_KEY`
2017-07-14 07:34:11 +02:00
Rickard von Essen 44089b2f55
cloudstack: Improved error reporting
Ensure that errors are shown when they happens.
2017-07-14 07:11:37 +02:00
Sander van Harmelen 3f444997b2 Make expunge optional and improve logging output (#5099) 2017-07-07 10:54:58 +02:00
Sander van Harmelen c4ef9bcd3f Make sure we always print and return any errors 2017-07-06 23:31:13 +02:00
Lars Tobias Skjong-Børsting c01f6d8708 builder/cloudstack: Support http server (#5017)
builder/cloudstack: Added docs for http server
Closes hashicorp/packer#4949
2017-07-06 11:59:02 +02:00
Yamashita, Yuu ab4636ae0f Explicitly specify `zoneid` in CloudStack's `associateIpAddress` call (#4995)
Generally speaking, this must be harmless since the IP address
and the virtual machine need to be deployed to the same zone.
2017-06-09 21:11:52 +02:00