Matthew Hooker
9e8d845c03
create instance reservation
2018-01-25 14:33:41 -08:00
Matthew Hooker
543caf3ec5
WIP OCI Classic builder
2018-01-25 14:33:41 -08:00
Matthew Hooker
eafda52411
use amazon steps from master
2018-01-24 17:09:18 -08:00
Matthew Hooker
8cd403425e
test fixes WIP
2018-01-24 17:09:17 -08:00
Matthew Hooker
5d48d658b4
Wire context through misc steps
...
Some steps actually need to pass the context around, so let's create
a ctx variable and pass it.
2018-01-24 17:09:17 -08: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
a0c625ea44
Revert "working with opt-in"
...
This reverts commit 4068ffdaf541354e75507add7ca0b193993fcd52.
2018-01-24 17:09:16 -08:00
Matthew Hooker
e98f201602
working with opt-in
2018-01-24 17:09:16 -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
807e88245b
trying to add context to state bag
2018-01-24 17:09:15 -08:00
James Nugent
5967732442
Merge pull request #5795 from stack72/bump-triton-go-deps
...
builder/triton: bump triton-go dependencies
2018-01-23 14:40:03 +00:00
Matthew Hooker
ebe995c0ff
run goimports
2018-01-22 17:21:10 -08:00
stack72
20f9ef3445
builder/triton: bump triton-go dependencies
...
This introduces a new triton-go errors package so we can error handle our code in a better way
2018-01-17 16:55:00 +02:00
Matthew Hooker
cea2ab8c6d
move kms/encrypted validation to block devices
2018-01-12 15:10:51 -08:00
Matthew Hooker
e968f9d6cc
spelling/style fixes
2018-01-12 14:26:56 -08:00
Jason Wieringa
f6772f06be
builder/amazon: Raise error when ebsvolume kms_key_id is without encrypted = true
2018-01-11 20:27:38 -08:00
Jason Wieringa
2ac59b3c27
builder/amazon: Added KmsKeyID to BlockDevice
...
+ Adds kms_key_id to list of options
+ Tests that configuraiton is set along with encrypted
+ Updates documentation on ebsvolume builder
2018-01-11 20:27:38 -08:00
Matthew Hooker
2ce3ca1538
Merge pull request #5773 from hashicorp/fix5705
...
Use SDK's InstanceReady waiter
2018-01-11 12:12:03 -08:00
SwampDragons
fb730cf521
Merge pull request #5761 from hashicorp/fix_5713
...
fix nasty edge case where we can't find guest additions on windows if they are on a different drive
2018-01-11 11:48:26 -08:00
Megan Marsh
3ace5bb91b
simplify FileExistsLocally
2018-01-10 16:11:17 -08:00
Matthew Hooker
f5ea1e8312
Use WaitUntilInstanceReady waiter
2018-01-10 15:57:31 -08:00
Megan Marsh
216c44b153
fix FileExistsLocally
2018-01-09 15:47:07 -08:00
Matthew Hooker
dfd5f07145
fix ebs acc test
2018-01-08 12:27:10 -08:00
Megan Marsh
e164621bfe
log line to help prevent confusion when guest_additions_url is set from env variable that is empty
2018-01-05 09:19:38 -08:00
SwampDragons
ff3cbbf28c
Merge pull request #5757 from arizvisa/virtualbox-guest_additions_url-interpolation
...
Fixed an issue where the VirtualBox builder was checking for whether guest_additions_url was empty or not before it actually interpolated any variables.
2018-01-04 15:39:29 -08:00
Matthew Hooker
98c2a2d1f7
builder/aws: catch static credential errors early.
...
If we're using static credentials, either both the access key and secret key must be set, or neither of them should be.
2018-01-04 11:50:27 -08:00
Megan Marsh
4f3b470804
add helper function to manage validation of filepaths created using DownloadableURL
2018-01-03 16:53:47 -08:00
Ali Rizvi-Santiago
4fcd542d0c
Fixed an issue where the VirtualBox builder was checking for whether guest_additions_url was empty or not before it actually interpolated any variables.
2018-01-02 21:09:41 -06:00
stack72
c3467b686c
builder/triton: Add support for Triton RBAC
...
Fixes : #5737
Triton allows for subusers to be granted access to your account. This PR allows a user to be specified
2017-12-29 21:20:40 +02: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
Rickard von Essen
05fcecb1e7
Merge pull request #5666 from kwilczynski/remove-ecr-credentials-from-logging
...
docker: Remove credentials from being shown in the log.
2017-12-26 08:07:37 +01:00
Matthew Hooker
f3dea272d9
Set session in state bag
...
We can construct connections to arbitrary regions from it
2017-12-19 11:32:33 -08:00
Matthew Hooker
f6c401a143
don't pass in accessconfig
2017-12-19 11:32:32 -08:00
Matthew Hooker
1c352726d7
Merge pull request #5719 from rchenv/issue5606
...
Ensure all AWS connections are configured alike
2017-12-19 11:32:24 -08:00
Rong Chen
3e92b1374e
issue5606: follow the convention to use AccessConfig to create new aws session for step_create_tags etc.
2017-12-19 10:34:12 -08:00
Olivier Bazoud
8bcb469b8b
builder/amazon: Added new region Paris - eu-west-3
2017-12-19 10:00:03 +01:00
Arjen Schwarz
c2ecdd98c6
5691: Invalid image URLs make Azure builder crash
2017-12-12 20:12:53 +11:00
Krzysztof Wilczynski
567b566c23
docker: Remove AWS credentials and Session Token from being shown in the log.
...
Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
2017-12-10 20:55:03 +01:00
Rickard von Essen
63f791570a
Merge pull request #5665 from kwilczynski/remove-sts-token-from-logging
...
amazon: Remove Session Token (STS) from being shown in the log.
2017-12-10 06:50:42 +01:00
Matthew Hooker
f216330ba3
spot instance ena/sriov checking for all other builders
2017-12-08 14:56:19 -08:00
Matthew Hooker
4b1d8e3fe8
don't allow enhanced networking flags for spot instances.
2017-12-08 13:38:49 -08:00
Matthew Hooker
73b98b2a04
use waiter to wait for ebs instances to stop
2017-12-08 13:38:48 -08:00
Matthew Hooker
dada63801b
also use waiter code for spot instances
2017-12-08 13:38:48 -08:00
Matthew Hooker
9e61005f7c
Merge pull request #5660 from hashicorp/fix_5625
...
modify validation to allow user to have the original region in the am…
2017-12-08 13:36:10 -08:00
Ben Gnoinski
5df2e040d0
Update amazon run_config.go absent ssh_private_key_file error
2017-12-08 08:51:27 -08:00
Matthew Hooker
2c1c7b9659
Merge pull request #5630 from johndaviesco/winrm_no_proxy
...
Winrm no proxy
2017-12-07 15:41:16 -08:00
Matthew Hooker
a90c45d9bb
Wait until source instance OK before continuing
2017-12-07 12:31:50 -08:00
Matthew Hooker
7b5c0900ef
Correctly set aws region if given in template along with a profile.
2017-12-07 11:12:57 -08:00
Christopher Boumenot
1202bdd080
Merge pull request #5661 from jamielennox/no-location-for-existing-rg
...
Azure: Don't provide location for build_resource_group_name
2017-12-05 09:52:45 -08:00
Krzysztof Wilczynski
05327b7524
amazon: Remove Session Token (STS) from being shown in the log.
...
This commit adds a change which ensures that the Session Token
config struct item is removed from log output.
Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
2017-12-04 22:14:38 +01:00
Jamie Lennox
d043c37ad4
Azure: Don't provide location for build_resource_group_name
...
Location is required by default because you must specify where to create
the resource group containing the packer resources.
When using build_resource_group_name you are specifying that packer
should use an existing resource group and so the location that resources
are in can be determined by fetching the information from the existing
group.
It is forbidden to pass both variables as it is easier and more
intuitive that the location comes from the group rather than ignore a
parameter.
Closes : #5655
2017-12-04 11:22:54 +11:00
SwampDragons
8a30b3db80
Merge pull request #5456 from GoSecure/vmware-iso-improved-network-logging
...
vmware-iso builder: Logging on network errors on connection refused
2017-11-30 16:31:30 -08:00
Megan Marsh
1c681fc096
tests
2017-11-30 14:08:48 -08:00
Megan Marsh
556da47d35
modify validation to allow user to have the original region in the ami_regions list
2017-11-30 13:51:33 -08:00
Christopher Boumenot
da0c13f622
azure: delete keyvault deployment
2017-11-30 01:19:08 -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
John Davies-Colley
10aaa49beb
fixing tests and funky logic 💦
2017-11-28 14:42:14 +13:00
John Davies-Colley
0c787ec9df
Valadating early ⏰
2017-11-28 11:46:32 +13:00
Vijaya Bhaskar Reddy Kondreddi
3d5303c60d
Fix tests
2017-11-24 13:24:44 +05:30
Vijaya Bhaskar Reddy Kondreddi
b7e3f37b44
Add support for differential disk
2017-11-24 12:44:53 +05:30
John Davies-Colley
75320440ec
adding missing quote 🙏
2017-11-22 15:59:15 +13:00
John Davies-Colley
707ec675b2
ssh interface for amazon builders 🔨
2017-11-22 15:49:38 +13:00
Christopher Boumenot
a3c9485062
azure: sanity check resource group names
2017-11-20 15:19:12 -08:00
Christopher Boumenot
247da61ad1
Merge pull request #5593 from boumenot/pr-azure-keep-resource-group
...
Azure: Keep temporary resource group.
2017-11-16 17:39:33 -08:00
Christopher Boumenot
8985bd45ba
azure: go fmt
2017-11-16 17:32:35 -08:00
Christopher Boumenot
ee767e55d1
azure: change literal to constant
2017-11-16 16:36:42 -08:00
Christopher Boumenot
2684153cb2
azure: reject bad configuration faster
2017-11-16 16:34:18 -08:00
Christopher Boumenot
787f08f39b
azure: add user message to indicate what is being deleted
2017-11-16 16:31:05 -08:00
Megan Marsh
20390ff1ec
fix vetting for test fail print statements
2017-11-15 17:01:53 -08:00
SwampDragons
ab542c07ff
Merge pull request #5547 from egraff/hyperv-patch
...
builder/hyperv/vmcx: missing InterpolateContext
2017-11-15 17:00:55 -08:00
Ammar Ansari
b8bd66d10d
Align virtual disk size for qemu builder
...
When booting from a disk image, the Qemu builder resizes the disk to 40000
which is not a multiple of 1kB. This causes problems while booting from the image.
Updating the default disk size to 40960 fixes this issue
2017-11-15 15:00:13 -05:00
Matthew Hooker
b07a0cd6f0
fix tests
...
always sort telemetry options
2017-11-14 16:39:03 -08:00
Megan Marsh
6756df9510
use url library instead of parsing string naiively
2017-11-13 12:57:53 -08:00
Megan Marsh
771349e58c
fix error message
2017-11-13 12:52:47 -08:00
Megan Marsh
764be03876
didn't mean for this error message to get changed
2017-11-13 12:42:57 -08:00
Megan Marsh
0d18de2942
do validation in vmx config stage
2017-11-13 12:42:57 -08:00
Daniel Hess
f0299ba713
Adding GCE container optimized os image project
2017-11-12 00:45:22 -08:00
Arjen Schwarz
f43f3155d4
Remove breaking debug statement
2017-11-10 11:04:31 +11:00
Matthew Hooker
f146e5903f
Merge pull request #5567 from bennu/vm-template-with-export-vm
...
enable vsphere-template post processor to work with export behavior
2017-11-09 15:24:41 -08:00
SwampDragons
e5c59468df
Merge pull request #5343 from evandbrown/pr-googlecompute-subnetworks
...
Interpolate network and subnetwork values
2017-11-09 12:10:41 -08:00
SwampDragons
aae324e4e7
Merge pull request #5562 from hashicorp/fix5558
...
don't set region from metadata if profile is set.
2017-11-09 10:22:15 -08:00
Arjen Schwarz
0e706320ad
Issue #5045 - Add build_resource_group_name
...
* Created a new parameter for using existing resource groups
* Implemented logic to ensure temp_ and build_ can't both be used
* Implemented logic to ensure they can only be used in correct context
* Implemented tests for this logic
* Updated where required to ensure the process works
2017-11-09 22:20:09 +11:00
bugbuilder
23f4d187e2
validating keep_registered and fixing skip_export issues
2017-11-08 15:57:34 -03:00
stack72
450a233303
builder/triton: Wait for ImageCreation State
...
A bug was reported to Joyent, that sometimes packer UI reports that an image was created but it wasn't actually available in Triton for use. We believe that there was a bug uploading that image to Manta but that the metadata of the image was already populated and thus packer was reporting success as it was just checking for the metadata presence
This PR changes Packer to wait for the state of the image to be `active` to make sure that it has fully uploaded and is ready for use
```
==> triton: Stopping source machine (61647c3c-f2bf-4e30-b4bc-f076d3b01522)...
==> triton: Waiting for source machine to stop (61647c3c-f2bf-4e30-b4bc-f076d3b01522)...
==> triton: Creating image from source machine...
==> triton: Waiting for image to become available...
==> triton: Deleting source machine...
==> triton: Waiting for source machine to be deleted...
Build 'triton' finished.
==> Builds finished. The artifacts of successful builds are:
--> triton: Image was created: c2537582-34c7-42ea-bd11-b6ed499d5831
```
2017-11-08 16:38:04 +02:00
Chris Lundquist
d00f884e71
Merge pull request #5530 from BaxterStockman/lxc-builder-cli-options
...
Add options to LXC builder for influencing for how containers are built and started
2017-11-07 22:32:17 -08:00
Matthew Hooker
0a24f4eb2e
don't shadow package name
2017-11-07 16:05:43 -08:00
Matthew Hooker
f681faa296
fix tests
2017-11-07 14:57:10 -08:00
Matthew Hooker
545ee45567
debug region we found
2017-11-07 14:51:20 -08:00
Matthew Hooker
c106e7c26c
Don't set region from metadata if profile is set.
2017-11-07 14:33:26 -08:00
Matthew Hooker
52fc0100eb
this is a critical error
2017-11-07 12:52:03 -08:00
Evan Brown
13e0c232d4
builder/googlecompute: Test networking interpolation
...
This change pulls the logic that interpolates network and subnetwork
into its own func and adds tests.
2017-11-06 21:22:53 -08:00
Evan Brown
f2fed94a71
builder/googlecompute: Derive network and subnetwork IDs locally
...
This change constructs partial URLs for networks and subnetworks if they
are not already partial or full URLs (i.e., they do not contain a '/' in
their name). Network and subnetwork self-links are no longer retrieved
from the API.
Previously, if a user did not provide the network or subnetwork as a
fully-qualified URL (i.e., self-link), the builder would make
compute.(sub)networks.get API calls with the provided identifier to
discover the self-link. This requires the user or service account Packer
is using to have permission to describe those network resources, which
is becoming less common as IAM is used more. Specifically, a user may
have permission to launch a VM into a network/subnetwork, but will not
have permission to call APIs to describe network resources.
2017-11-06 16:41:42 -08:00
Evan Brown
bada7b73c1
builder/googlecompute: Selectively set default network
...
If a network is not specified, it should only be set to "default" if a
subnetwork is also not specified.
2017-11-06 16:41:42 -08:00
Evan Brown
1b3eb1c34d
builder/googlecompute: Set default network_project_id
...
If network_project_id is not specified in the GCE builder config, it
should default to the project_id.
2017-11-06 16:41:42 -08:00
Matthew Hooker
68fa09c308
Merge pull request #5512 from hashicorp/fix5501
...
builder/virtualbox-ovf retry removing VM.
2017-11-06 15:56:08 -08:00
Matthew Hooker
bdb2509735
Merge pull request #5475 from ChrisLundquist/lxd-publish-properties
...
[Lxd] publish properties
2017-11-06 15:45:56 -08:00
Matthew Hooker
0172a5c82b
Merge pull request #5511 from hashicorp/fix5507
...
remove login_email from docker
2017-11-06 15:34:04 -08:00
Arjen Schwarz
f4600a208f
Azure: Keep temporary resource group. Fixes #5045
...
This changeset will detect if the defined temporary resource group
already exists. If it does, it will not destroy it, but clean up
every resource required for building that is created by Packer
individually, both on success and failure.
Unit tests have been fixed, but more tests should be added for the new
functionalities.
2017-11-06 16:16:58 +11:00