Commit Graph

5257 Commits

Author SHA1 Message Date
Megan Marsh 480c938162 generate virtualbox-vm docs instead of letting them be copy pasted 2020-05-08 15:58:36 -07:00
Megan Marsh 4ef34f7fba fix iso config prepare 2020-05-08 14:11:51 -07:00
Megan Marsh 9476aa03de
Merge pull request #9105 from hashicorp/google_iap
Implement iap proxy for googlecompute
2020-05-08 12:40:42 -07:00
Megan Marsh fcef10fd2f
Merge pull request #9082 from hashicorp/f-amazon_builder-ssm-session-tunnel-poc
builder/amazon: Add SSM Session Manager as a SSH interface connection
2020-05-08 12:40:03 -07:00
Megan Marsh a55b73473a fix logic 2020-05-08 10:24:28 -07:00
Megan Marsh dde162622d use local port in listener config, when set 2020-05-08 10:20:47 -07:00
Megan Marsh 81e043f2b0 fix windows tests 2020-05-08 10:13:43 -07:00
Megan Marsh 60600e6cf6 make windows work with account files containing spaces 2020-05-08 10:13:43 -07:00
Megan Marsh dae60799bc fix tests 2020-05-08 10:13:43 -07:00
Megan Marsh fda55fe928 deduplicate excess code 2020-05-08 10:13:43 -07:00
Megan Marsh 54b33ad8d1 fix tests 2020-05-08 10:13:43 -07:00
Megan Marsh 850303b8b8 get gcloud integration working on Windows 2020-05-08 10:13:43 -07:00
Megan Marsh c578afc62c working on windows 2020-05-08 10:13:43 -07:00
Megan Marsh 32752d4577 fix linting and tests 2020-05-08 10:13:43 -07:00
Megan Marsh b5744efb42 add config prepare tests 2020-05-08 10:13:43 -07:00
Megan Marsh f583674cd6 linding 2020-05-08 10:13:43 -07:00
Megan Marsh 4fc92d7858 add tests 2020-05-08 10:13:42 -07:00
Megan Marsh 937a4859d4 Make retries a bit smarter, clean up language to be gentler, and give up on parsing stdout for tunnel launch 2020-05-08 10:13:42 -07:00
Megan Marsh 3e1ddad0c7 fix behavior when not using IAP, try to use more sophisticated streaming than buffer.String() 2020-05-08 10:13:42 -07:00
Megan Marsh 9353635b43 send sigint instead of sigkill; we can at least ask the tunnel nicely to shut down. 2020-05-08 10:13:42 -07:00
Megan Marsh f67a8ab431 revert unneeded changes to driver roles 2020-05-08 10:13:42 -07:00
Megan Marsh 80ecd2013d basic untested implementation for Windows. May leave zombie processes lying around 2020-05-08 10:13:42 -07:00
Megan Marsh 3cd28e98a7 linting 2020-05-08 10:13:42 -07:00
Megan Marsh 365eb09842 import context 2020-05-08 10:13:42 -07:00
Megan Marsh eb05f6ff88 fix windows 2020-05-08 10:13:42 -07:00
Megan Marsh d713f7ec64 add conditional building becasue windows support is still forthcoming 2020-05-08 10:13:42 -07:00
Megan Marsh e6073bcec7 implement iap proxy for googlecompute. ssh-only so far 2020-05-08 10:13:42 -07:00
Ryo Tagami fdc73376ba
floppy_label Parameter for vsphere-iso Builder (#9187)
Add ability to specify `floppy_label` parameter for `vsphere-iso`
builder, which would be especially beneficial when someone wants to pass
information to cloud-init via floppy disk images.

Signed-off-by: Ryo Tagami <rtagami@airstrip.jp>
2020-05-08 16:13:54 +02:00
Markus Liljedahl d807e81adb
Changed default disk size for when using googlecompute to match minimum disk sice to the google api. Closes https://github.com/hashicorp/packer/issues/9023 (#9071) 2020-05-08 15:55:38 +02:00
Wilken Rivera 89fb7bb080 Apply suggestions from code review
Co-authored-by: Megan Marsh <megan@hashicorp.com>
2020-05-08 09:36:43 -04:00
Wilken Rivera 056f1f6e76 docs/amazon/builder: Add not about using a temporary_iam_instance_profile_policy_document 2020-05-08 09:32:54 -04:00
Wilken Rivera bf1da57a05 Update address to localhost to be consistent with other proxies 2020-05-08 09:32:54 -04:00
Wilken Rivera 7cea7466ba buider/amazon: Add `session_manager_port` option for setting a custom local port 2020-05-08 09:32:54 -04:00
Wilken Rivera 0d13c634b7 Update logging constructs for Session Manger driver 2020-05-08 09:32:49 -04:00
Wilken Rivera 81c40b8d08 Add section to docs about the session-manager-plugin tunnel 2020-05-08 09:32:49 -04:00
Wilken Rivera 5f68303504 Remove no longer needed port check
The communicator code base will default to the correct port settings for
valid communicators and fail the build for non valid communicators.
2020-05-08 09:32:49 -04:00
Wilken Rivera 3ae7ab994b step_create_ssm_tunnel: Add port availability check for LocalPortNumber 2020-05-08 09:32:49 -04:00
Wilken Rivera 08dc2cb847 Remove call to unstubbed session start 2020-05-08 09:32:49 -04:00
Wilken Rivera f498866c3a Update validation for session_manager connectivity
Validation will now check that either a IamInstanceProfile or a TemporaryIamInstanceProfilePolicyDocument is set
2020-05-08 09:32:49 -04:00
Wilken Rivera 2f09b74587 amazon/builder: Move port validation for security group into RunConfig.Prepare 2020-05-08 09:32:48 -04:00
Wilken Rivera 3f6b28b70c Add SSMTunnel step to other amazon builders, minus chroot 2020-05-08 09:32:48 -04:00
Wilken Rivera 743df19af2 Add tests for driver and ssm tunnel step 2020-05-08 09:32:48 -04:00
Wilken Rivera e53d6aea66 amazon/ssm_driver: Update to support command context
* Defer the release of the found port to prevent possible Packer build collisions.
2020-05-08 09:32:48 -04:00
Wilken Rivera 5e14089851 tests/builder/amazon: Add basic testing for session_manager
* Add a test to ensure the proper host is returned when using session_manager
* Add a basic driver test for the validating that the SSMDriver will fail if the plugin is not in the path.
2020-05-08 09:32:48 -04:00
Wilken Rivera 60e0ba7e68 Update iam instance profile name 2020-05-08 09:32:48 -04:00
Wilken Rivera d5a0262d6c builder/amazon/instance: Add session manager support 2020-05-08 09:32:48 -04:00
Wilken Rivera e515aefee3 Add validation checks for session_manager
* Session manager connectivity only supported via SSH
* Session manager requires the use of an iam instance profile with system manager permissions
2020-05-08 09:32:48 -04:00
Wilken Rivera c1d2477d18 builder/amzon: Update port configuration for WinRM
Connectivity for WinRM works for the initial connection, but fails to upload any provisioning scripts - need to dive in deeper.
For now connectivity over SSH works as expected.
2020-05-08 09:32:48 -04:00
Wilken Rivera fbffbd1899 docs/builder/amazon: Add short blurb for connecting via the AWS session_manager interface 2020-05-08 09:32:48 -04:00
Wilken Rivera 520061dee6 builder/amazon: Update Session Manger connectivity
* Update security group creation step skip ingress rules if using session manager
* Update create ssm tunnel step to dynamically set a session port
* Add SSHPort function to common to return session-manager tunnel port
* Update SSHHost to return proper host for session-manager
2020-05-08 09:32:48 -04:00