Commit Graph

2810 Commits

Author SHA1 Message Date
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
Matthew Hooker 07bb47f793
Replace pkcs12 code with upstream 2017-09-02 16:09:29 -07:00
Sander Saares 2a1a9a55f8 Clean up both VHD and regular temp dir 2017-09-02 14:55:00 +03:00
Sander Saares 028c941b77 Enable use of separate temp path for Hyper-V VHD 2017-09-02 14:55:00 +03:00
Megan Marsh 3974976518 Merge pull request #5137 from vilkaspilkas/f-googlecompute-accelerator
Add accelerator api support to googlecompute builder
2017-09-01 14:12:26 -07: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
Matthew Hooker d843531452 Merge pull request #5297 from vijayinvites/fix5295
Fix -on-error issue not working.
2017-08-31 11:52:02 -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
Megan Marsh e93d64e80f Merge pull request #4592 from jimmythedog/ovfexportpath-localoutputdir
Ovfexportpath localoutputdir -- Merging for release with 1.1.0
2017-08-31 09:55:58 -07:00
Megan Marsh cc104cdf55 Merge pull request #5174 from rickard-von-essen/cloudstack-temp-ssh-key
cloudstack: Setup temporary SSH keypair
2017-08-30 16:49:11 -07:00
Matthew Hooker cd11e4ff33 Merge pull request #5187 from mkuzmin/vmware-artifactid
vmware: Publish artifact ID
2017-08-30 13:56:49 -07:00
Megan Marsh 9db2cdc02a Merge pull request #5273 from StuporHero/master
Use docker cp
2017-08-30 13:52:07 -07:00
Jake Champlin 2d3ee06ecd Remove LGPL dependencies
This changeset performs the following:

- Updates `masterzen/winrm` vendor to include change from (https://github.com/masterzen/winrm/pull/73).
- Removes `masterzen/xmlpath` dependency, as it is licensed under the LGPL license.
- Updates `dylanmei/winrmtest` vendor to include change from (https://github.com/dylanmei/winrmtest/pull/4).
- Updates `packer-community/winrmcp` vendor to include the removal of the `masterzen/winrm/winrm` sub-class as a result of the `winrm` CLI tool being removed from the `masterzen/winrm` repository.
- Updates nested dependencies as a result of the above vendor changes.
- Refactors `parallels/driver_9` to use `goxpath` instead of `xmlpath`, as `xmlpath` is licensed under LGPL.
- Adds a basic unit test for the refactor work in `parallels/driver_9` to confirm functionality.

This should completely remove any LGPL licensed dependencies inside of the Packer project.

```
$ make test
/home/jake/src/go/src/github.com/hashicorp/packer/scripts/gofmtcheck.sh $(find . -not -path "./vendor/*" -name "*.go")
==> Checking that code complies with gofmt requirements...
Check passed.
ok      github.com/hashicorp/packer     0.044s
ok      github.com/hashicorp/packer/builder/alicloud/ecs        0.055s
ok      github.com/hashicorp/packer/builder/amazon/chroot       0.040s
ok      github.com/hashicorp/packer/builder/amazon/common       0.021s
ok      github.com/hashicorp/packer/builder/amazon/ebs  0.016s
ok      github.com/hashicorp/packer/builder/amazon/ebssurrogate 0.015s
ok      github.com/hashicorp/packer/builder/amazon/ebsvolume    0.014s
ok      github.com/hashicorp/packer/builder/amazon/instance     0.058s
ok      github.com/hashicorp/packer/builder/azure/arm   2.833s
ok      github.com/hashicorp/packer/builder/azure/common        0.018s
?       github.com/hashicorp/packer/builder/azure/common/constants      [no test files]
?       github.com/hashicorp/packer/builder/azure/common/lin    [no test files]
?       github.com/hashicorp/packer/builder/azure/common/logutil        [no test files]
ok      github.com/hashicorp/packer/builder/azure/common/template       0.038s
ok      github.com/hashicorp/packer/builder/azure/pkcs12        0.120s
ok      github.com/hashicorp/packer/builder/azure/pkcs12/rc2    0.020s
ok      github.com/hashicorp/packer/builder/cloudstack  0.038s
ok      github.com/hashicorp/packer/builder/digitalocean        0.015s
ok      github.com/hashicorp/packer/builder/docker      0.028s
ok      github.com/hashicorp/packer/builder/file        0.029s
ok      github.com/hashicorp/packer/builder/googlecompute       3.162s
ok      github.com/hashicorp/packer/builder/hyperv/common       0.006s
ok      github.com/hashicorp/packer/builder/hyperv/iso  0.042s
ok      github.com/hashicorp/packer/builder/null        0.018s
ok      github.com/hashicorp/packer/builder/oneandone   0.022s
ok      github.com/hashicorp/packer/builder/openstack   0.052s
ok      github.com/hashicorp/packer/builder/parallels/common    2.549s
ok      github.com/hashicorp/packer/builder/parallels/iso       0.050s
ok      github.com/hashicorp/packer/builder/parallels/pvm       0.033s
ok      github.com/hashicorp/packer/builder/profitbricks        0.023s
ok      github.com/hashicorp/packer/builder/qemu        0.039s
ok      github.com/hashicorp/packer/builder/triton      0.018s
ok      github.com/hashicorp/packer/builder/virtualbox/common   5.533s
ok      github.com/hashicorp/packer/builder/virtualbox/iso      0.044s
ok      github.com/hashicorp/packer/builder/virtualbox/ovf      0.012s
ok      github.com/hashicorp/packer/builder/vmware/common       5.325s
ok      github.com/hashicorp/packer/builder/vmware/iso  0.076s
ok      github.com/hashicorp/packer/builder/vmware/vmx  0.010s
ok      github.com/hashicorp/packer/command     0.062s
ok      github.com/hashicorp/packer/common      0.053s
ok      github.com/hashicorp/packer/common/json 0.003s [no tests to run]
ok      github.com/hashicorp/packer/common/powershell   0.015s
?       github.com/hashicorp/packer/common/powershell/hyperv    [no test files]
?       github.com/hashicorp/packer/common/ssh  [no test files]
ok      github.com/hashicorp/packer/common/uuid 0.010s
ok      github.com/hashicorp/packer/communicator/none   0.008s
ok      github.com/hashicorp/packer/communicator/ssh    0.068s
ok      github.com/hashicorp/packer/communicator/winrm  0.046s
ok      github.com/hashicorp/packer/fix 0.005s
ok      github.com/hashicorp/packer/helper/builder/testing      0.007s
ok      github.com/hashicorp/packer/helper/communicator 0.013s
ok      github.com/hashicorp/packer/helper/config       0.004s
?       github.com/hashicorp/packer/helper/enumflag     [no test files]
ok      github.com/hashicorp/packer/helper/flag-kv      0.009s
ok      github.com/hashicorp/packer/helper/flag-slice   0.006s
ok      github.com/hashicorp/packer/packer      0.219s
ok      github.com/hashicorp/packer/packer/plugin       0.233s
ok      github.com/hashicorp/packer/packer/rpc  0.141s
ok      github.com/hashicorp/packer/plugin/example      0.008s [no tests to run]
?       github.com/hashicorp/packer/post-processor/alicloud-import      [no test files]
?       github.com/hashicorp/packer/post-processor/amazon-import        [no test files]
ok      github.com/hashicorp/packer/post-processor/artifice     0.003s [no tests to run]
ok      github.com/hashicorp/packer/post-processor/atlas        0.018s
ok      github.com/hashicorp/packer/post-processor/checksum     0.015s
ok      github.com/hashicorp/packer/post-processor/compress     0.047s
ok      github.com/hashicorp/packer/post-processor/docker-import        0.012s
ok      github.com/hashicorp/packer/post-processor/docker-push  0.012s
ok      github.com/hashicorp/packer/post-processor/docker-save  0.008s
ok      github.com/hashicorp/packer/post-processor/docker-tag   0.008s
ok      github.com/hashicorp/packer/post-processor/googlecompute-export 0.015s [no tests to run]
?       github.com/hashicorp/packer/post-processor/manifest     [no test files]
ok      github.com/hashicorp/packer/post-processor/shell-local  0.028s
ok      github.com/hashicorp/packer/post-processor/vagrant      0.030s
ok      github.com/hashicorp/packer/post-processor/vagrant-cloud        0.028s
ok      github.com/hashicorp/packer/post-processor/vsphere      0.014s
ok      github.com/hashicorp/packer/provisioner 0.011s
ok      github.com/hashicorp/packer/provisioner/ansible 0.140s
ok      github.com/hashicorp/packer/provisioner/ansible-local   0.056s
ok      github.com/hashicorp/packer/provisioner/chef-client     0.050s
ok      github.com/hashicorp/packer/provisioner/chef-solo       0.061s
ok      github.com/hashicorp/packer/provisioner/converge        0.018s
ok      github.com/hashicorp/packer/provisioner/file    0.015s
ok      github.com/hashicorp/packer/provisioner/powershell      0.168s
ok      github.com/hashicorp/packer/provisioner/puppet-masterless       0.008s
ok      github.com/hashicorp/packer/provisioner/puppet-server   0.031s
ok      github.com/hashicorp/packer/provisioner/salt-masterless 0.010s
ok      github.com/hashicorp/packer/provisioner/shell   0.010s
ok      github.com/hashicorp/packer/provisioner/shell-local     0.037s
ok      github.com/hashicorp/packer/provisioner/windows-restart 0.180s
ok      github.com/hashicorp/packer/provisioner/windows-shell   0.159s
?       github.com/hashicorp/packer/scripts     [no test files]
ok      github.com/hashicorp/packer/template    0.008s
ok      github.com/hashicorp/packer/template/interpolate        0.004s
?       github.com/hashicorp/packer/version     [no test files]
```
2017-08-30 12:10:12 -07:00
Megan Marsh 1adcce6046 Merge pull request #5284 from hashicorp/fix_5093
Allow granular modification of sriov and ena enhanced networking opti…
2017-08-29 14:28:42 -07:00
Megan Marsh 85ad1f58fb include ena_support and sriov_support in chroot and instance docs 2017-08-29 09:36:06 -07:00
Megan Marsh f19040f3aa Merge pull request #5196 from cstuntz/aws-add-tags
Upgrade aws-sdk-go to 1.10.14, add tags at instance run time
2017-08-28 13:17:29 -07:00
Megan Marsh 2d4bc70d7b use ami prefix to make it clear that these variables are amazon specific
add fixer, fixer tests
2017-08-28 11:21:27 -07:00
Megan Marsh 9e2e467b31 Allow granular modification of sriov and ena enhanced networking options in amazon amis. Maintain old functionality. 2017-08-25 14:49:53 -07:00
Christopher Boumenot 9a34fd15ca azure: improve docs and validation
Closes #5186
2017-08-24 15:23:13 -07:00
Christopher Boumenot 0780667b4d azure: support storage account for managed images
Closes #5202
2017-08-24 15:10:49 -07:00
Megan Marsh 7da52e1f77 Merge pull request #5250 from hashicorp/repro_3399
make force_deregister work in all regions, not just original region.
2017-08-24 14:41:02 -07:00
Matthew Hooker 4edbd5322c
docker: stream uploads over stdin
Only write to a tempfile if we don't have a stat struct
2017-08-24 13:29:38 -07:00
Michael Juliano c8db128dc5
Modified func Upload to use docker cp 2017-08-24 13:29:37 -07:00
Łukasz Kostka bbaf15ef2e Merge remote-tracking branch 'fork/master' 2017-08-24 20:57:44 +02:00
Łukasz Kostka 8703937cde Natural order of AMI artifacts 2017-08-24 20:57:12 +02:00
Matthew Hooker 28894fb418 Merge pull request #5274 from mmerdes/master
Fix timestamp interpolation in created file name
2017-08-23 14:08:27 -07:00
Victor Ronin cb75796389 Show a message why VM export was skipped while building on VMWare Fusion/Workstation 2017-08-23 12:44:46 -07:00
Matthias Merdes c8d09b5152 Fix timestamp interpolation in created file name
This commit attempts to fix the timestamp-related part of #4885 by using the logic found in the analogous virtualbox implementation. In essence, it applies the solution from commit 93bb0d8 to the vmx case.
2017-08-23 13:04:42 +02:00
Jasmin Gacic fce08fce73 Merge pull request #5233 from StackPointCloud/packer-builder-profitbricks-updates
Packer builder ProfitBricks Cloud API V4 updates
2017-08-22 17:50:31 +02:00
Matthew Hooker e5345b5c78 Merge pull request #5248 from sean-/b-fix-illumos-build
Fix build on GOOS=solaris
2017-08-21 12:24:53 -07:00
Megan Marsh ef858857e4 fix bug introduced by 5221 2017-08-14 14:07:21 -07:00
Megan Marsh 14b2d04332 make force_deregister work in all regions, not just original region. 2017-08-14 12:31:58 -07:00
Sean Chittenden cd84b17923
Fix building packer on GOOS=solaris
Update to golang/x/sys/unix is coming in the subsequent commit.
2017-08-14 10:34:06 -07:00
Sergei A Mamonov 07f7183b64 Add docker container dir to template 2017-08-14 09:26:05 -07:00
Matthew Hooker 754c80d217
create default tags as well 2017-08-11 12:31:05 -07:00
cstuntz db7f860d91 Adding tagging back to spot instances, after they're created 2017-08-11 10:43:05 -07:00
Ali Bazlamit c67d118523 Update packer to Use ProfitBricks Image Alias feature 2017-08-10 16:15:53 +03:00
Megan Marsh 199b9062b0 fix file copy script to prevent error when encountering empty directory 2017-08-09 15:19:17 -07:00
Megan Marsh a924db9a79 Merge pull request #5228 from hashicorp/4653_dont_delete_snapshots
continue, not break
2017-08-08 15:07:01 -07:00
Christopher Boumenot 216317c49d Merge pull request #5222 from Trip09/NO-TICKET-azure-allow-build-inside-vpc
[Azure] allow build inside vpc access via public IP
2017-08-08 15:02:53 -07:00
Megan Marsh ef0a091720 continue, not break 2017-08-08 14:53:56 -07:00
Matthew Hooker 968eb94b80 Merge pull request #5211 from hashicorp/4653_dont_delete_snapshots
use block device mappings to know whether a snapshot existed before p…
2017-08-08 14:31:38 -07:00
Megan Marsh 2d6028eb9a use named loops instead of doDelete flag 2017-08-08 14:28:01 -07:00
Megan Marsh e9ec705497 use block device mappings to know whether a snapshot existed before packer's current run. If yes, don't delete the unencrypted snapshot. 2017-08-08 13:59:55 -07:00
Matthew Hooker 9b88ec975a Merge pull request #5227 from hashicorp/fix-flaky-test
fix test that flaked in a travis build recently
2017-08-08 12:28:33 -07:00
Megan Marsh 3f7c090f3b fix test that flaked in a travis build recently 2017-08-08 12:25:12 -07:00
Joao Albuquerque d909c702ee Working PublicPrivate 2017-08-08 15:05:45 +01:00
Tobias 8a9c2b6959 Merge branch 'master' of https://github.com/hashicorp/packer into patch-1 2017-08-08 13:27:45 +00:00
Tobias ada8902721 fix formatting 2017-08-08 13:21:53 +00:00
Matthew Hooker 72deffc3d8 Merge pull request #5192 from danisla/patch-1
Update to how zone is extracted from metadata
2017-08-07 16:03:44 -07:00
Luke Farnell 7c3eb33cda Fixed spelling mistakes 2017-08-07 13:45:50 -04:00
Luke Farnell d9a5b69403 clean up ineffectual assignments 2017-08-07 13:20:01 -04:00
zhuzhih2017 096a0cd4fb update aliyun go sdk and enable multi sites support for alicloud 2017-08-04 09:56:04 +08:00
Megan Marsh c760e1323f don't panic if the communicator is none and the port is 0 2017-08-03 13:54:57 -07:00
cstuntz c717765154 Removing tagging post instance launch 2017-08-02 09:29:47 -07:00
Andrew Pryde e8e0e8c948 Add ssh_private_key_file support to BMCS builder 2017-08-02 17:18:53 +01:00
Andrew Pryde 8c81bb5dac Fix BMCS builder step error reporting style
See: https://github.com/hashicorp/packer/pull/4554#discussion_r130214247
2017-08-02 12:44:44 +01:00
Andrew Pryde fc17f69bad Set default BMCS builder image name
Set the default image name to "packer-{{timestamp}}".
2017-08-02 12:43:53 +01:00
Andrew Pryde 630ee5d650 Change imports mitchelh/packer -> hashicorp/packer 2017-08-02 09:53:48 +01:00
Andrew Pryde 3c4ec2dc3e Allow override signing key pass in oracle-bmcs
Adds pass_phrase property to the oracle-bmcs builder to allow users to
specify/override a pass phrase for the private key used to sign requests
to the BMCS API.
2017-08-02 09:53:48 +01:00
Andrew Pryde 25e4843a6f BMCS password protected keys via config file
Implements support for signing requests with encrypted private keys in
the BMCS SDK.

The pass_phrase property in the SDK config file is now supported. See
https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm
for more information.
2017-08-02 09:53:48 +01:00
Andrew Pryde 3473162234 Add pass and interactive auth to bmcs ssh conf
Adds password and keyboard interactive authentication to the oracle-bmcs
builder.
2017-08-02 09:53:48 +01:00
Andrew Pryde 7eb3f30d50 Fix oracle-bmcs tests panicing instead of failing
Replace use of t.Errorf with t.Fatalf to prevent subsequent panic on nil
pointer access.
2017-08-02 09:53:48 +01:00
Andrew Pryde 7dcd7cac47 Remove default SSHUsername in oracle-bmcs config 2017-08-02 09:53:48 +01:00
Andrew Pryde 9728f890cf Implemented and documented oracle-bmcs builder
Implements a new Packer builder (oracle-bmcs) which adds support for
building custom images for Oracle Bare Metal Cloud Services (BMCS)
https://cloud.oracle.com/en_US/bare-metal.

Additionally includes documentation for the oracle-bmcs builder.
2017-08-02 09:53:48 +01:00
cstuntz 42444e58e6 Updating step_run_source_instance to add tags at instance start instead of adding them to running instance 2017-07-31 11:38:30 -07:00
Dan Isla 00797cc23b Update to how zone is extracted from metadata 2017-07-29 08:20:58 -07:00
Michael Kuzmin 9876a28ea7 vmware: publish vm_name as artifact ID 2017-07-28 11:16:46 +03:00
Matthew Hooker b99e2c4b96 Merge pull request #5148 from zhuzhih2017/master
fix keypair error for debug mode and increase the wait time to avoid …
2017-07-27 13:02:09 -07:00
Rickard von Essen 858f1227af
cloudstack: Updated after review (2) 2017-07-27 21:32:47 +02:00
Tobias eafaaa881f builder/hyperv/iso: missing InterpolateContext 2017-07-27 16:57:02 +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 8a035ddb8a
parallels: Remove soon to be removed --vmtype flag
In the next release of Parallels Desktop for Mac Pro Ed. the prlctl createvm
command doen't support the --vmtype flag anymore.
2017-07-26 07:27:08 +02:00
Saulius Grusnys 5ebc96744d Accelerator api is now GA, switching back to v1 from v0.beta 2017-07-21 15:05:24 +01: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
Saulius Grusnys b6783a1180 Adding sanity checks in Prepare when adding accelerators and tests for accelerator configuration 2017-07-19 11:28:49 +01: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 ef5c7936f2 Merge pull request #5130 from rickard-von-essen/cloudstack-ssh-agent
cloudstack: Add support for ssh_agent_auth
2017-07-17 18:41:24 +02:00
Saulius Grusnys 200113b8c1 Switch googlecompute builder to use compute/v0.beta and add support for accelerator api 2017-07-17 15:39:41 +01:00
Megan Marsh a2f7a65e35 fix communicator tests 2017-07-14 13:58:28 -07: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
Megan Marsh 938840782f Merge pull request #5059 from hashicorp/5053_fix
fix panic that occurs when ami_block_device_mappings and does not exp…
2017-07-07 10:32:48 -07: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
Taliesin Sisson 2325c1ee58 Merge pull request #5085 from Lee303/builder-hyperv-temppath
Hyper-V Builder - Add support for temp_path directive to override system %temp%
2017-07-01 06:58:01 +01:00
Taliesin Sisson d569a1b879 Merge pull request #5014 from Lee303/builder-hyperv-floppydirs
Add support for floppy_dirs with hyperv-iso builder
2017-07-01 06:52:36 +01:00
Lee 0680cb08e5 Add support for temp_path directive to override systemp %temp% 2017-07-01 00:19:27 +01:00
Megan Marsh 0b0fd408c4 Merge pull request #5048 from hashicorp/4887_patch
Fix windows filepath in docker-toolbox call.
2017-06-28 16:44:42 -07:00
Megan Marsh c0e271ba9c Merge pull request #5076 from it-praktyk/Group_membership_by_SID
Verify membership in the group Hyper-V Administrators by SID not name
2017-06-28 09:20:48 -07:00
Wojciech Sciesinski 7bacc22825 Verify membership in the group Hyper-V Administrators by SID not name - fix #5022 2017-06-28 01:44:04 +02:00
Megan Marsh 12d43c98f7 test the deduplication code 2017-06-27 16:12:22 -07:00
Christopher Boumenot ec96cacdf3 azure: write temporary ssh key to a file 2017-06-27 13:23:04 -07:00
Megan Marsh 5f92de6a39 fix panic that occurs when ami_block_device_mappings and does not explicitly contain the root volume 2017-06-27 13:17:45 -07:00
Rickard von Essen 46ec8ccb97 Merge pull request #5035 from rickard-von-essen/issue-5018
googlecompute: Allow using URL's for network and subnetwork
2017-06-27 22:03:09 +02:00
Rickard von Essen f230f00726 googlecompute: Allow using URL's for network and subnetwork
If full server URL's is used in subnetwork we can skip reading from the network
API. This is usefull when you can launch instances in a shared network but don't
have access to do GET on the network resources.

Closes: #5018
2017-06-27 21:58:21 +02:00
Rickard von Essen f1d2ae42d8 Merge pull request #5058 from ncdc/parallels/fix-new-artifact-visit-when-file-not-found
Parallels: skip missing paths when looking for unnecessary files
2017-06-27 07:09:23 +02:00
Christopher Boumenot 06ea433104 azure: private SSH private key for debug 2017-06-26 13:44:34 -07:00
Christopher Boumenot 0d427939bc azure: Fix custom managed images
I missed a change in my SDK update, and when I integrated this missing
change I broke custom images.
2017-06-26 11:13:41 -07:00
Christopher Boumenot 1874514e4f azure: go vet ./... 2017-06-26 11:13:40 -07:00
Christopher Boumenot 027db82862 azure: go fmt ./... 2017-06-26 11:13:40 -07:00
Christopher Boumenot 9425ece680 azure: Handle SDK changes
There are two types for storage profile, but they use the same
serialization name (storageProfile).  This creates problems, so I worked
around it by taking the union of this type as well as OS Disk.
2017-06-26 11:13:40 -07:00
Christopher Boumenot 841f54fc1e azure: unit test fixes 2017-06-26 11:13:39 -07:00
Christopher Boumenot b7e32cb10a azure: best error message possible 2017-06-26 11:13:39 -07:00
Christopher Boumenot c09f8b84b9 azure: fit and finish
* More unit testing to assert customer's configuration.
 * Further reduce the options that are needed to power an Azure build.
   This seems like a much more manageable level.
 * Update all of the examples to use a more current VM sku.
 * Add an example for RHEL.
 * Move from OpenSuSE to SuSE.
 * Update the docs.
2017-06-26 11:13:39 -07:00
Christopher Boumenot d782ad99f8 azure: pick better names
Use custom_managed_image_name to represent managed images use to build Packer VMs.
Use managed_image_name to represent the image produced by Packer.
2017-06-26 11:13:38 -07:00
Christopher Boumenot 9f4fb56041 Support managed disk for platform images 2017-06-26 11:13:38 -07:00
Christopher Boumenot c6ff4aae59 Support for building from custom managed images 2017-06-26 11:13:38 -07:00
Christopher Boumenot 8cea6f5be5 azure: Update to SDK 10.0.3
The OAuth code was moved to the adal package.
Authorizers now ues an interface instead of a simple token.
Long running operations return a channel for the operation, and the
error.
2017-06-26 11:13:37 -07:00
Andy Goldstein c6dba6c051 Parallels: skip missing paths when looking for unnecessary files 2017-06-23 14:29:07 -04:00
Matthew Hooker d35eeecf46
vnc port discovery timeout is 15 seconds 2017-06-22 17:58:18 -07:00
Megan Marsh a281e60e15 de-mangle windows filepath to something docker can handle 2017-06-22 10:21:30 -07:00
Matthew Hooker 6581e0b7d6
add hostkeycallback everywhere else 2017-06-21 12:00:34 -07:00
Megan Marsh 2a6f5f1b13 specify HostKeyCallback for vmware esx5 driver 2017-06-21 10:09:11 -07:00
Megan Marsh ac15b33d2b Merge pull request #5029 from hashicorp/5007_instance_stop
add exponential backoff retry for stopping instance in amazon
2017-06-20 12:08:52 -07:00
Megan Marsh f7a703dfb2 add pending to allowable states while waiting for ebs instance to stop 2017-06-20 10:55:23 -07:00
Megan Marsh d706147423 add exponential backoff retry for stopping instance in amazon
retry only if the error is instancenotfound
2017-06-20 10:50:57 -07:00
Lee Spottiswood 4d394033d2 add tests 2017-06-20 12:21:07 +01:00
Lee Spottiswood f95093ef63 Add support for floppy_dirs with hyperv-iso builder 2017-06-15 13:12:39 +01:00
Matthew Hooker febc65aa7c
try again to get region from metadata 2017-06-14 16:30:18 -07:00
Matthew Hooker 8dae6b60c1 Merge pull request #4996 from hashicorp/mwhooker/4613
builder/amazon: Support Assume Role with MFA and ECS Task Roles
2017-06-13 17:40:09 -07:00
Matthew Hooker 350e8bfe0d
we don't need to look for region in metadata.
Closes #4615'
2017-06-13 17:35:48 -07:00
Matthew Hooker 94d7a4ce8d
post-processor/vagrant-cloud: try upload once
* fixes multiple uploads mentioned in #4973
* removed unused token code
2017-06-12 17:34:32 -07: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
Matthew Hooker 4860d7179d
remove redundant log line 2017-06-09 13:00:08 -07:00
Matthew Hooker 6231ec3569 Merge pull request #4997 from Constantin07/add-sg-name-to-output
Print in the output the temporary security group name too.
2017-06-09 12:59:03 -07: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
Constantin Bugneac ae03dab920 Print in the output the security group name too. 2017-06-09 20:05:59 +01:00
Matthew Hooker a619759bf7
add support for profile 2017-06-09 11:24:30 -07:00
Matthew Hooker 3fb4162660
remove code from bad merge 2017-06-09 11:07:29 -07:00
Matthew Hooker 624aaa2067
bugfix 2017-06-09 11:01:27 -07:00
Matthew Hooker 3ed7572525
remove cli_config 2017-06-09 10:59:50 -07:00
Matthew Hooker f637878822
with wrapping 2017-06-09 10:46:01 -07:00
Matthew Hooker 23084fe171
dedupe 2017-06-09 10:41:58 -07:00
Matthew Hooker 58e386827a
fix typo 2017-06-09 10:40:50 -07:00
Rickard von Essen 15f80dc5ab
aws: Drop undocumented option `profile`
This was added in 883acb18fa to support
assume role and shared configuration file. This was never completed.
2017-06-09 10:37:54 -07:00
Matthew Hooker 56c513088b
I think this was the intention 2017-06-09 10:34:49 -07:00
Matthew Hooker 94854a26d9
fix go vet issue 2017-06-09 10:30:07 -07:00
Matthew Hooker d7e39b72b2
remove dead code 2017-06-09 10:30:07 -07:00
Rickard von Essen f106e60a7e
builder/amazon: Added MFA support 2017-06-09 10:28:31 -07:00
Rickard von Essen f55c3b9d34
builder/amazon: Support assume role with assume_role_arn
This supports assuming a role when using profile or static credentials.
2017-06-09 10:27:56 -07:00
Rickard von Essen 3833d34829
builder/amazon: Cleaned up credential handeling
This properly handles:
- Preference between types of credential
- Assume role via ECS Task Role
2017-06-09 10:26:22 -07:00
Anish Bhatt ff39827733
Make null builder actually have the ability to do nothing 2017-06-07 17:11:42 -07:00
Pavel Vasilevich 547cfa3602 Add information about artifact in manifest post-processor in azure-arm builder 2017-06-07 14:12:03 +07:00
Matthew Hooker 769ff28e03
builder/ebssurrogate: Use correct devices for AMI. 2017-06-06 12:33:08 -07:00
Matthew Hooker ab81b3ef7d Merge pull request #4699 from BenPhegan/virtualbox_sata_port_count
Add configuration to virtualbox-iso to allow sata port count configuration
2017-06-05 15:21:12 -07:00
Matthew Hooker bf830e393d Merge pull request #4810 from bryonr/fix_vmware_shutdown_cleanup_osx
Help ensure VMX builder properly removes mounted CDs on OS X
2017-06-05 15:17:08 -07:00
Matthew Hooker 39a2b9c50e Merge pull request #4953 from hashicorp/azure-artifact
builder/azure: set artifact metadata
2017-06-05 11:44:36 -07:00
Matthew Hooker 11ba986abc Merge pull request #4930 from hashicorp/fix4925
builder/amazon: don't try to delete extra volumes during clean up
2017-06-02 14:08:49 -07:00
Matthew Hooker b1bcf62ae1 Merge pull request #4619 from zhuzhih2017/master
Add packer plugin which support to create alicloud ecs image
2017-06-02 13:33:10 -07:00
Matthew Hooker 0c116981ab Merge pull request #4960 from rickard-von-essen/issue-4959
virtualbox: Don't add portforwarding if comm = none
2017-06-02 13:15:43 -07:00
Rickard von Essen 31b93a3026 virtualbox: Don't add portforwarding if comm = none
Closes: #4959
2017-06-02 21:58:34 +02:00
Rickard von Essen 2f8b02a6e1
builder/null: Support SSH Agent Auth 2017-06-02 12:55:31 +02: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 66bd707f7c
spell fix 2017-06-01 15:47:47 -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
Matthew Hooker 5ed3be9a8c
set azure metadata 2017-06-01 14:11:40 -07:00
Matthew Hooker 1f4b532ed5 Merge pull request #4948 from hashicorp/kms_key_regions
Kms key regions
2017-06-01 13:30:31 -07:00
Megan Marsh b8c2a5fd43 fix step initializer everywhere StepAMIRegionCopy is called 2017-06-01 09:28:17 -07:00
Megan Marsh 875745ab9b one more test 2017-05-31 14:16:02 -07:00
Megan Marsh 1944f38985 update docs and clean up 2017-05-31 13:41:32 -07:00
Megan Marsh 5b35d199da golang has different style than python 2017-05-31 12:27:45 -07:00
Megan Marsh f9d7292566 builder/amazon regional KMS keys 2017-05-31 11:23:18 -07:00
Matthew Hooker 730cc0889e Merge pull request #4919 from hashicorp/fix4798
builder/vmware: make vnc probe timeout configurable
2017-05-30 12:59:22 -07:00
Matthew Hooker f801c507fc
builder/vmware: make vnc probe timeout configurable 2017-05-30 12:51:45 -07:00
Jason Ramey cc309c0e5f spelling fix 2017-05-26 01:03:11 -04: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
Matthew Hooker 0e3469e913
spell fix 2017-05-25 18:49:45 -07:00
Megan Marsh 7174a7a3d5 New map: region_kms_key_ids, allowing custom encryption keys on a per-region basis. Also new tests. 2017-05-25 14:42:03 -07:00
Matthew Hooker 77b4d47409
only delete snapshots which exist 2017-05-25 14:16:20 -07:00
Matthew Hooker c0b27dfa6f
don't try to delete extra volumes during clean up 2017-05-25 13:48:32 -07:00
Matthew Hooker 1cf4754d80
correct ami_name error reporting 2017-05-25 13:02:36 -07:00
zhuzhih2017 a26c72f38e fix the comments about root and apply the keypair with latest dependence 2017-05-25 18:27:54 +08:00
James Nugent c4439aba82 builder/vmware: Add vmx_remove_ethernet_interfaces
This commit adds a new option, `vmx_remove_ethernet_interfaces`, to both
of the VMWare builders. This is useful when building Vagrant boxes,
since Vagrant now produces output such as:

```
WARNING: The VMX file for this box contains a setting that is
automatically overwritten by Vagrant when started. Vagrant will stop
overwriting this setting in an upcoming release which may pre vent
proper networking setup. Below is the detected VMX setting:

   ethernet0.pcislotnumber = "33"

If networking fails to properly configure, it may require this VMX
setting. It can be manually applied via the Vagrantfile:

   Vagrant.configure(2) do |config|
     config.vm.provider :vmware_fusion do |vmware|
       vmware.vmx["ethernet0.pcislotnumber"] = "33"
     end
   end
```

This can be avoided entirely by removing the ethernet adapters from the
VMX file prior to packaging as a Vagrant box, in which case adapters are
created as expected according to the Vagrantfile specification.
2017-05-24 18:53:25 -05:00
Megan Marsh 4abb541468 fix logging to clarify that encrypt_boot needs to be set, not encrypt, and fix typo 2017-05-24 16:39:36 -07:00
Matthew Hooker f6eb4e1b40
use cleanhttp to get a default transport. 2017-05-24 11:05:59 -07:00
r_takaishi 4fc0616bc9 fix go vet fail 2017-05-24 17:57:21 +09:00
r_takaishi db58854b0b make fmt 2017-05-24 16:28:13 +09:00
r_takaishi 37e6539bff use DefaultTransport 2017-05-24 16:19:30 +09:00
r_takaishi 67ce2da59e add cacert config to specify custom CA certificate file 2017-05-24 14:21:16 +09:00
r_takaishi 1de9eb2cfd support client certificate file
When AUTH_URL and each endpoints need SSL client authentication, we
have to specify cert file and private key file.
So, add optional config, cert and key.
2017-05-24 10:23:12 +09:00
JD Friedrikson a0052fdb68
Specify InsecureIgnoreHostKey for HostKeyCallback
[A recent breaking change upstream in Golang's crypto
library](e4e2799dd7)
has broken SSH connectivity for a few builders:

```
==> qemu: Waiting for SSH to become available...
2017/05/20 16:23:58 ui: ==> qemu: Waiting for SSH to become available...
2017/05/20 16:23:58 packer: 2017/05/20 16:23:58 [INFO] Attempting SSH connection...
2017/05/20 16:23:58 packer: 2017/05/20 16:23:58 reconnecting to TCP connection for SSH
2017/05/20 16:23:58 packer: 2017/05/20 16:23:58 handshaking with SSH
2017/05/20 16:23:58 packer: 2017/05/20 16:23:58 handshake error: ssh: must specify HostKeyCallback
2017/05/20 16:23:58 packer: 2017/05/20 16:23:58 [DEBUG] SSH handshake err: ssh: must specify HostKeyCallback
2017/05/20 16:24:05 packer: 2017/05/20 16:24:05 [INFO] Attempting SSH connection...
2017/05/20 16:24:05 packer: 2017/05/20 16:24:05 reconnecting to TCP connection for SSH
2017/05/20 16:24:05 packer: 2017/05/20 16:24:05 handshaking with SSH
2017/05/20 16:24:05 packer: 2017/05/20 16:24:05 handshake error: ssh: must specify HostKeyCallback
2017/05/20 16:24:05 packer: 2017/05/20 16:24:05 [DEBUG] SSH handshake err: ssh: must specify HostKeyCallback
```

Specifying HostKeyCallback as insecure should make things work again
and would make sense for packer's use case.
2017-05-20 16:17:04 -04:00
Matthew Hooker 4137660b7a
fix ami name validation 2017-05-19 02:11:43 -07:00
Matthew Hooker e67d1fd676 Merge pull request #4900 from rogers0/PR/crypto-CVE-ABI-change
handle ABI change of golang-golang-x-crypto-dev
2017-05-18 12:06:08 -07:00
Matthew Hooker ee5d13611f
update ssh client usage for new crypto/ssh version 2017-05-18 12:01:44 -07:00
numa b15c3a5c92 Fix error message
I've matched the error message to the document
2017-05-18 18:40:16 +09:00
Rémi Jouannet 45143bb6f4 add an option custom_endpoint_ec2 for amazon builder, add a condition if vpc_id is empty don't add the parameter to the aws call 2017-05-17 18:45:20 +02: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 078c139ef1
Fix tests and add more 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
Luke Farnell 4f5d3face2
remove duplicates 2017-05-16 21:00:12 -07:00
Luke Farnell 8ed50608b1
add image transfer for DigitalOcean 2017-05-16 21:00:12 -07:00
Paul Thrasher 0be5a28080 Fix issue 4693 - Derive vpc_id from subnet_id
In AWS we can derive the `VpcId` and AZ from the `SubnetId`, so now we do. In the config you can now only specify the `SubnetId`.

This fixes issue #4693.
2017-05-15 13:46:05 -07:00
Ben Fagin 6f63881020 fixes a typo introduced in a previous change 2017-05-11 13:34:48 -07:00
luis-silva a269bbc6fa Fix issue 4875 - use retry logic when creating instance tags 2017-05-11 16:25:28 +01:00
Sean Chittenden eece75a7a6
Wait for a 410 before returning success on a machine delete. 2017-05-10 09:12:24 -07:00
Justin Reagor bd12c17bb0 Update triton client calls to pass along context 2017-05-05 11:20:21 -04:00
Matthew Hooker 80d6cd91fd
remove unneeded keypair var 2017-05-01 10:17:21 -07:00
Ben Phegan c4b8e8e5df Merge branch 'master' into virtualbox_sata_port_count 2017-05-01 09:23:05 +10:00
Matthew Hooker 602fd64c5d
builder/amazon: set flag to delete temporary keypair 2017-04-30 14:24:22 -07:00
Matthew Hooker 7aca9b7f71
builder/azure: replace panics with error returns 2017-04-27 11:04:57 -07:00
James Nugent d2ae36214a builder/triton: Reconcile #4829 and #4838 docs
This changes the default region to match the default from Joyent
documentation.
2017-04-26 15:47:04 -07:00
James Nugent c1cad8726b builder/triton: Better AccessConfig tests
This commit adds an actual public/private key pair for testing since
these are now validated.
2017-04-26 14:08:29 -07:00
James Nugent d9ba951929 builder/triton: Switch to joyent/triton-go library
This commit substitutes the now-deprecated gosdc library for the newer
triton-go library. This is transparent from a user perspective, except
for the fact that key material can now be ommitted and requests can be
signed with an SSH agent. This allows for both encrypted keys and ECDSA
keys to be used.

In addition, a fix is made to not pass in an empty array of networks if
none are specified in configuration, thus honouring the API default of
putting instances with no explicit networks specified on the Joyent
public and internal shared networks.
2017-04-26 14:02:03 -07:00
Matthew Hooker 9f992b8f80
go files are 0644 2017-04-25 12:50:58 -07:00
Christopher Boumenot f0e5f75b06 Update TODO.md 2017-04-24 14:19:24 -07:00
Bryon Ross d092044834 Help ensure VMX builder properly removes mounted CDs on OS X
Pull request 1504 describes a workaround for a potential race condition in which the VMX builder can fail to remove mounted floppies or CDs. This workaround was enabled for all operating systems except OS X. Since this issue can also occur on OS X, also apply the workaround on it.
2017-04-19 16:27:16 -07:00
zhuzhih2017 d646e1d035 refactor the code according hashicorp rename the repository 2017-04-18 15:14:45 +08:00
Rickard von Essen a3f70b874b
Spelling (context) 2017-04-09 20:38:19 +02:00
Rickard von Essen 5ee212c85f
Inlined ctx 2017-04-09 20:33:05 +02:00
Luke Farnell 5b7ec545c5 Added monitoring and updated godo 2017-04-08 15:52:57 -04:00
Matthew Hooker da8c4004f0
builder/amazon: numbers are valid in ami name 2017-04-05 12:39:16 -07:00
Matthew Hooker bc3510b473
fix spelling
closes #4767
2017-04-05 12:01:02 -07:00
Matthew Hooker 3f6b5165f2
add affirmative test case for #4762 2017-04-04 22:08:09 -07:00
Craig Barr d9041bda0c Improved the test for special character so that it doesn't get halted by less than 3 character check 2017-04-05 11:06:59 +10:00
Craig Barr 7911cfa94b Formatting as per make fmt 2017-04-05 11:02:23 +10:00
Craig Barr fdae6858c8 conforming to the standard for imports 2017-04-05 10:53:58 +10:00
Craig Barr df6337e8ab Added AMIName validation (issue 4761) 2017-04-05 10:46:44 +10:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker bce03492d9
remove references to ServiceAccountEmail 2017-04-03 11:22:00 -07:00
Rickard von Essen 77dc8b84c1
builder/googlecompute: Revert to using default service account
Fixes issue with cross Project builds.

Closes #4608

Regression introduced in PR #3639
2017-04-02 17:52:14 +02:00
Matthew Hooker 6f27f67346
more fixes from errcheck 2017-03-29 13:38:31 -07:00
Matthew Hooker 4fcbf75da9
s/non existent/nonexistent/ 2017-03-29 12:38:33 -07:00
Matthew Hooker cc11ec3566
check for a couple errors 2017-03-28 20:36:21 -07:00