Commit Graph

16866 Commits

Author SHA1 Message Date
Narthana Epa bb94df2d02
Add mocking of launch template id
It is being printed after it is created so we need to mock it to prevent
a nil pointer dereference when the tests are run with the launch
template create request is mocked.
2021-01-10 00:00:16 +11:00
Narthana Epa f7588a3737
Add printing of launch template id 2021-01-09 23:59:31 +11:00
Narthana Epa f7e68f1d71
Add spot tags as resource tags of instances and volumes in launch template
According to the APIReference:
<https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateTagSpecificationRequest.html>,
the resource types `instance` and `volume` support tagging on creation.
It is useful to add the spot tags here as it should be more reliable
than tagging them after the spot request is fulfilled as we currently
do.
2021-01-09 23:58:23 +11:00
Darwin Liu 8ef4cfa070 Add in a sanity check for valid vnc ports
Check to make sure that the max and min VNC ports be below 65535 in
config.
2021-01-08 13:43:02 -07:00
Darwin Liu 2b698478a6 Adjusted QEMU step_run_tests.go to reflect previous changes 2021-01-07 22:23:51 -07:00
Darwin Liu 4f2e9117c3 QEMU: Minor fix to VNC mapping parameters and output
* Set the QEMU builder vnc_port_min to have a minimum value of 5900,
  with updated documentation to explain why.

* Changed output messages so that the correct port is listed in packer's
  messaging to the user.

LONGER DESCRIPTION

If vnc_min_port is set to anything above 5900, then packer will fail to
connect via VNC to the QEMU instance. This is due to how QEMU parses
the port for listening to VNC:

   host:d
               TCP connections will only be allowed from host on
               display d.  By convention the TCP port is 5900+d.

Previously the calculation for the port was vncPort - VNCPortMin,
however this will result in an incorrect port being displayed in
packer's messages and potentially packer being unable to connect via VNC
to the host.

For example if vnc_port_min=5990 nad vnc_port_max=5999:

```
Looking for available port between 5990 and 5999 on 0.0.0.0
Found available port: 5996 on IP: 0.0.0.0
Found available VNC port: 5996 on IP: 0.0.0.0
[....]
==> Starting VM, booting disk image
     view the screen of the VM, connect via VNC without a password to
     vnc://0.0.0.0:6
```

This will cause QEMU to set the listening port to 5906 while packer's
VNC client is attempting to connect to 5996.

I am a touch concerned as this commit undoes pull request #9905
(specfically commit 7335695c), but I am also confused as to how he was
able to get QEMU to get a VNC listening port below 5900, as examining
QEMU's git history has shown that this behavior has been in since at
least 2017, probably older.

Hopefully the more explicit error messaging and documentation can make
it clear why this is being undone.
2021-01-07 22:23:43 -07:00
Megan Marsh 6564ee76e8 fix vendoring 2021-01-07 15:45:16 -08:00
Megan Marsh 77c3c12244 fix vendoring 2021-01-07 15:44:58 -08:00
Megan Marsh da0ee96cdd fix imports 2021-01-07 15:38:46 -08:00
Megan Marsh beba3a90a9 fix discover.go 2021-01-07 15:38:38 -08:00
Megan Marsh c94d66db13 clean up dependencies 2021-01-07 13:03:20 -08:00
Megan Marsh 4ac55446a1 fix go.mod 2021-01-07 12:00:57 -08:00
Megan Marsh 0666b787fc allow plugins with registered items with name from plugin.DEFAULT_NAME string constant to be passthroughs to the plugin binary suffix 2021-01-07 11:55:51 -08:00
Wilken Rivera 9adeb989c6
Merge pull request #10442 from hashicorp/d-broken-link-check
Add GitHub action to check for broken markdown links
2021-01-06 16:30:38 -05:00
Wilken Rivera 8d4c7d31b4 Add regenerated docs from packer-plugin-sdk
```
cd $HOME/Development/packer-plugin-sdk
PROJECT_ROOT=packer-plugin-sdk go generate ./...
rsync -av multistep/commonsteps/packer-plugin-sdk/website/content/partials/ ../packer/website/content/partials/
rsync -av bootcommand/packer-plugin-sdk/website/content/partials/ ../packer/website/content/partials/
rsync -av shutdowncommand/packer-plugin-sdk/website/content/partials/ ../packer/website/content/partials/
rsync -av communicator/packer-plugin-sdk/website/content/partials/ ../packer/website/content/partials/
```
2021-01-06 16:27:12 -05:00
Wilken Rivera 04dbbe2d8e Fix broken links detected by link checker
- Fix broken example links
- Fix broken provisioner links
- Ignore linode.com because of DDOS protection settings
2021-01-06 16:27:12 -05:00
Wilken Rivera 7b793cefb1 Add GHA to check for broken links on pull-request
- Add scheduled cron job for checking against master
- Change configuration file path
2021-01-06 16:26:57 -05:00
Jeff Escalante a4e5df9149
set main branch to master for 'edit this page' links (#10447) 2021-01-06 16:19:06 -05:00
Felix Hillingshaeuser 233c7f0a83
docs: Add default value for cloud_init in builders/proxmox (#10445) 2021-01-06 10:37:23 -05:00
Megan Marsh 4b0de7263e
Merge pull request #10412 from adeniyistephen/hlc-doc
Add hcl Example to openstack
2021-01-04 09:44:52 -08:00
Megan Marsh d260bb63d3
Merge pull request #10413 from adeniyistephen/hcl-doc
Add hcl Example to docker-save
2021-01-04 09:41:15 -08:00
Megan Marsh 560d5ff270
Merge pull request #10415 from adeniyistephen/hcl-docs
Add hcl example to docker-tag
2021-01-04 09:40:24 -08:00
Megan Marsh e83603faa5
Merge pull request #10425 from adeniyistephen/scaleway
Add hcl example for scaleway
2021-01-04 09:39:18 -08:00
Shigetaka Shirouchi 7ef5246e94
docs: Fix trivial json format (#10437) 2021-01-04 11:02:11 +01:00
adeniyistephen 4d25a59600 add hcl example to docker-save 2020-12-28 15:05:08 +01:00
adeniyistephen ed4ed9885b add hcl example to docker-tag 2020-12-28 15:03:13 +01:00
adeniyistephen 779a5d9bbb add hcl example to scaleway 2020-12-28 14:58:53 +01:00
adeniyistephen 73d9e8430a Add hcl example for scaleway 2020-12-27 19:43:10 +01:00
adeniyistephen 08e0f1ea72 Add hcl example to docker-tag 2020-12-21 17:22:44 +01:00
adeniyistephen 7abe0a4759 Add hcl Example to docker-save 2020-12-21 17:01:39 +01:00
adeniyistephen dc87825d5c Add hcl Example to docker-save 2020-12-21 16:56:12 +01:00
adeniyistephen 11d7b9d7ee Add hcl Example to openstack 2020-12-21 16:27:10 +01:00
Megan Marsh 28245ec143
Merge pull request #10134 from borancar/feat/azure_pfx_support
Add Azure PFX certificate support
2020-12-18 12:09:17 -08:00
Megan Marsh d1d5706048
Merge pull request #10362 from nielspardon/master
OpenStack builder: Make external source image props configurable
2020-12-18 10:55:40 -08:00
Megan Marsh d27e627e2a
Merge pull request #10391 from hashicorp/plugin_release_docs
Plugin release step by step docs
2020-12-18 10:45:35 -08:00
Megan Marsh bee182e480
Merge pull request #10405 from hashicorp/remove_sdk
Remove sdk
2020-12-18 09:21:57 -08:00
Megan Marsh 37652b05eb update vendoring 2020-12-17 15:12:16 -08:00
Megan Marsh 82eb22c8bb go.mod updates 2020-12-17 14:55:14 -08:00
Megan Marsh ce99640fe2 fix test fixture path 2020-12-17 14:41:36 -08:00
Megan Marsh 88b7b0e14a remove sdk 2020-12-17 13:29:25 -08:00
Megan Marsh dd9a8b2669
Merge pull request #10388 from hashicorp/sdk_docs
Sdk docs
2020-12-16 15:30:47 -08:00
Megan Marsh 761200485e remove partials since they moved 2020-12-16 15:21:35 -08:00
Megan Marsh e4642c0b13 turn markdown example into godoc format 2020-12-16 15:14:49 -08:00
Megan Marsh 7ef8b290e8 Apply suggestions from code review
Co-authored-by: Adrien Delorme <azr@users.noreply.github.com>
2020-12-16 15:14:49 -08:00
Megan Marsh 3fd8066a95 Apply suggestions from code review
Co-authored-by: Sylvia Moss <moss@hashicorp.com>
2020-12-16 15:14:48 -08:00
Megan Marsh 8650f7990c add more docs 2020-12-16 15:14:48 -08:00
Megan Marsh 185614f886 more package docs 2020-12-16 15:14:47 -08:00
Megan Marsh 3a66391e30 more package docs 2020-12-16 15:14:46 -08:00
Megan Marsh c5e6e84806 remove iochan package from sdk, switch to using its descendent, mitchellh/iochan 2020-12-16 15:14:46 -08:00
Megan Marsh 608b62f699 more godoc tweaks 2020-12-16 15:14:45 -08:00