Robert Neumayer
70b2d300e6
Support defined tags for oci builder
2019-09-27 15:10:04 +02:00
Megan Marsh
242f5b1c9f
typos
2019-07-03 13:34:23 -07:00
Megan Marsh
c03c3f4410
replace duplicate commHost functions with a single communicator helper that checks for ssh_host and does a statebag lookup for a given key
2019-07-03 13:30:29 -07:00
Megan Marsh
eb8c74bf85
allow ssh_host config option to override host logic for all builders
2019-07-02 13:56:28 -07:00
Adrien Delorme
f555e7a9f2
allow a provisioner to timeout
...
* I had to contextualise Communicator.Start and RemoteCmd.StartWithUi
NOTE: Communicator.Start starts a RemoteCmd but RemoteCmd.StartWithUi will run the cmd and wait for a return, so I renamed StartWithUi to RunWithUi so that the intent is clearer.
Ideally in the future RunWithUi will be named back to StartWithUi and the exit status or wait funcs of the command will allow to wait for a return. If you do so please read carrefully https://golang.org/pkg/os/exec/#Cmd.Stdout to avoid a deadlock
* cmd.ExitStatus to cmd.ExitStatus() is now blocking to avoid race conditions
* also had to simplify StartWithUi
2019-04-08 20:09:21 +02: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
Megan Marsh
b764b1d7e1
fix tests
2019-03-29 15:05:51 -07:00
Megan Marsh
a84fc6bde9
remove default ssh_username from oracle classic builder, but add note in docs.
2019-03-29 14:24:12 -07: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
Megan Marsh
19144111dd
fix packer crash that occurs when image is nil
2018-12-17 14:54:27 -08:00
Ali Rizvi-Santiago
040a33567e
Trying again one more time to prevent import cycles.. Moved common.ExpandUser into packer.ExpandUser..
2018-12-04 16:54:47 -06:00
Ali Rizvi-Santiago
79b68fb89c
Replaced the previous incorrect logic with an re-implementation of common.ExpandUser.
2018-12-04 16:53:33 -06:00
Ali Rizvi-Santiago
e04986659a
Changed the logic for when to actually prefix a path with a u.HomeDir so that it's only done when a non-absolute path is specified.
2018-12-04 16:53:33 -06:00
Ali Rizvi-Santiago
1a3c3f2ffc
Replaced all instances of mitchellh/go-homedir with an implementation based on os/user.
2018-12-04 16:53:33 -06: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
Matthew Hooker
3ff038d4d1
remove todo
2018-10-31 12:00:33 -07:00
Matthew Hooker
42cd3e4bf7
Warn if not a pv build but builder image entry is set. cleanup
2018-10-29 15:23:58 -07:00
Matthew Hooker
eb976894fc
cleanup
2018-10-27 02:04:36 -07:00
Matthew Hooker
c697c9d3de
cleanup
2018-10-26 21:59:26 -07:00
Matthew Hooker
f322397413
add config tests
2018-10-26 21:56:39 -07:00
Matthew Hooker
6d6d262308
some final fixes and documentation work
2018-10-26 21:56:00 -07:00
Matthew Hooker
4eba1ee724
remove unused config key
2018-10-26 20:02:51 -07:00
Matthew Hooker
03932f1157
Clean up volumes
2018-10-26 20:02:13 -07:00
Matthew Hooker
e2a0cbf7df
move upload script to const
2018-10-26 16:59:23 -07:00
Matthew Hooker
7331d6fc7f
some final clean up
2018-10-26 16:59:23 -07:00
Matthew Hooker
ab4f205bf6
correctly building linux/windows now
2018-10-26 16:59:23 -07:00
Matthew Hooker
09de194d8e
trying to wrap the base communicator config but it needs to be prepared
2018-10-26 16:59:22 -07:00
Matthew Hooker
ab5e964ca6
Connecting to master instance but not builder
2018-10-26 16:59:22 -07:00
Matthew Hooker
ade396e140
don't echo image creation commands
2018-10-26 16:59:22 -07:00
Matthew Hooker
3e966ae38d
make fmt
2018-10-26 16:59:22 -07:00
Matthew Hooker
86f6cf478a
cleanup
2018-10-26 16:59:22 -07:00
Matthew Hooker
6f729d0265
Adding some missing configuration
2018-10-26 16:59:22 -07:00
Matthew Hooker
c42be62d90
fix identifier changes from oracle sdk
2018-10-26 16:59:22 -07:00
Matthew Hooker
bbb0d450f1
todo
2018-10-26 16:59:22 -07:00
Matthew Hooker
be91c99d29
warn about dangling segments.
...
The client offers no way to bulk delete keys, so for now let's just warn users.
The issue is tracked upstream here: https://github.com/hashicorp/go-oracle-terraform/issues/172
2018-10-26 16:59:22 -07:00
Matthew Hooker
ce30e1053e
wip
2018-10-26 16:59:22 -07:00
Matthew Hooker
9f310045fc
split image upload/creation. clean up
2018-10-26 16:59:22 -07:00
Matthew Hooker
420d0ebe3e
fix artifact generation
2018-10-26 16:59:21 -07:00
Matthew Hooker
84bb5d2f6f
create image list
2018-10-26 16:59:21 -07:00
Matthew Hooker
fa54a64d28
WIP
2018-10-26 16:59:21 -07:00
Matthew Hooker
b84c7df9da
Segments going into per-run subfolder
2018-10-26 16:59:21 -07:00
Matthew Hooker
b5c6beb8a3
don't delete segments. registering works now.
2018-10-26 16:59:21 -07:00
Matthew Hooker
705fa976a8
more debugging
2018-10-26 16:59:21 -07:00
Matthew Hooker
2536790e0a
todo
2018-10-26 16:59:21 -07:00
Matthew Hooker
7a35e2408f
fix pty, some todo and refactor of bash scri[t
2018-10-26 16:59:21 -07:00
Matthew Hooker
fc301601e1
actually delete temp container
2018-10-26 16:59:21 -07:00
Matthew Hooker
cd77d00fd8
delete temporary image container
2018-10-26 16:59:21 -07:00
Matthew Hooker
21f786d686
todo and some clean up. correct values for machine image
2018-10-26 16:59:21 -07:00
Matthew Hooker
b222d36669
use 2x volume size
2018-10-26 16:59:21 -07:00
Matthew Hooker
7c577abbcb
WIP: register machine image.
...
remove passwords
2018-10-26 16:59:21 -07:00
Matthew Hooker
8207ba4fa4
Use jq to create manifest. Upload to compute_images
2018-10-26 16:59:20 -07:00
Matthew Hooker
96e62236ec
upload volume WIP
...
check upload for error
increase builder volume size to account for chunking
2018-10-26 16:59:20 -07:00
Matthew Hooker
8598e2d0a3
WIP
2018-10-26 16:59:20 -07:00
Matthew Hooker
bf7c4a7ad6
wip
2018-10-26 16:59:20 -07:00
Matthew Hooker
445c3fb5bb
cleanup temp keys
2018-10-26 16:59:20 -07:00
Matthew Hooker
098764d8ac
WIP
2018-10-26 16:59:20 -07:00
Matthew Hooker
2db0a03142
image upload WIP
2018-10-26 16:59:20 -07:00
Matthew Hooker
265ee0b0b8
add whitespace
2018-10-26 16:59:20 -07:00
Matthew Hooker
7c26ffef9c
builder instance now runs and is connected to
2018-10-26 16:59:20 -07:00
Matthew Hooker
b3ffa975c3
Revert "add boot volume to builder instance"
...
This reverts commit cbce7b42079d2087bc622fd8c6f65d1339b735d1.
2018-10-26 16:59:20 -07:00
Matthew Hooker
2febfa2c7d
attach volume after instance booted
2018-10-26 16:59:20 -07:00
Matthew Hooker
b68f214ca4
add boot volume to builder instance
2018-10-26 16:59:20 -07:00
Matthew Hooker
ca3bffcb0d
bugfix and some debug logging
2018-10-26 16:59:19 -07:00
Matthew Hooker
00ff187d77
master instance working
2018-10-26 16:59:19 -07:00
Matthew Hooker
e271e88b49
oracle-classic variable volume size WIP
2018-10-26 16:59:19 -07: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
Megan Marsh
a0edaf6c46
Going to revert this change for now, becuase of potential issues that arise from calling Prepare() twice
...
Revert "use statebag instead of SetSharedState for winRM password"
This reverts commit b35acbd879
.
2018-09-10 16:48:42 -07:00
Megan Marsh
9926988ab7
Merge pull request #6621 from hashicorp/ssh_keys_centralised
...
Merge ssh fields usage
2018-08-30 14:13:21 -07:00
Harvey Lowndes
344e7e8b92
Validation for tag configuration
2018-08-29 15:31:05 -07:00
Harvey Lowndes
cc7d4e4a95
Add support for freeform tagging of images
2018-08-29 15:31:05 -07:00
Adrien Delorme
cd851f8ac2
use public ssh key & key name from config instead of the statebag
2018-08-29 14:40:33 +02:00
Adrien Delorme
0f9eddda3a
builder.oracle: 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
Megan Marsh
b35acbd879
use statebag instead of SetSharedState for winRM password
2018-08-24 13:51:16 -07:00
Megan Marsh
340363a649
Merge pull request #6613 from hashicorp/merge_ssh_config_funcs
...
Merge ssh config funcs from builders
2018-08-23 16:03:36 -07: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
Megan Marsh
ff6a039d5b
replace scrubconfig with packer.LogSecretFilter.Set
...
filter winrm password from logs
Add new root-level packer template option, sensitive-variables, to tell us what user variables to mark sensitive.
2018-08-20 15:35:55 -07:00
Felix Yan
f69ab4ed77
Fix a typo in config_test.go
2018-07-31 15:19:45 +08:00
xxx
7630268e1d
Incorporate review comments
2018-07-17 17:41:19 +02:00
Robert Neumayer
22e5523faa
Allow instance metadata to be specified in config
2018-07-02 10:48:08 +02:00
Owain Lewis
b600be009d
Pass context into OCI client
2018-06-26 10:17:02 +01:00
Harvey Lowndes
a69e2ac78e
Support instance display name configuration
2018-06-25 11:45:59 +01:00
Megan Marsh
08218222dc
add get windows default credentials to oci builder
2018-05-24 10:47:37 -07:00
Harvey Lowndes
c442ba165e
Migrate to official OCI Go SDK
2018-04-17 10:30:42 +01:00
Megan Marsh
67d2de8de1
Merge pull request #6079 from hashicorp/do_5866
...
add user data and user data file to oracle oci builder
2018-04-02 16:48:48 -07:00
Megan Marsh
d6e5b01a23
Merge pull request #6095 from hashicorp/OPaniC
...
prevent panics when cleaning up resources that haven't been created.
2018-04-02 16:34:34 -07:00
Matthew Hooker
7e13b5c62a
prevent panics when cleaning up resources that haven't been created.
2018-04-02 11:56:11 -07:00
Matthew Hooker
52f69cd91a
Validate image name.
2018-04-02 11:22:15 -07:00
Matthew Hooker
0533e1ad9c
Validate destination image name.
2018-03-30 13:01:52 -07:00
Megan Marsh
16d044b398
add user data and user data file to oracle oci builder
2018-03-28 13:27:41 -07:00
Megan Marsh
58ecd32289
remove redundant security_protocol code from the winrm implementation of the oracle-classic provisioner
2018-03-28 10:54:06 -07:00
Megan Marsh
95aa7e67bd
Merge pull request #5893 from neumayer/privateip
...
Allow using private ip addresses for oracle oci builder
2018-03-22 09:42:19 -07:00
Robert Neumayer
61432cd257
Update logs to talk about IP instead of public IP
...
When logging we don't know whether we use a private or public ip, just
the ip itself.
2018-03-22 09:08:25 +01:00
Josh Soref
aae5b50dab
spelling: response
2018-03-14 02:19:26 +00:00
Josh Soref
8294c8bc66
spelling: receive
2018-03-14 02:19:01 +00:00
Josh Soref
18f51e7338
spelling: parameters
2018-03-13 08:29:17 +00:00
Josh Soref
9b9ab4c492
spelling: encrypt
2018-03-13 07:41:47 +00:00
Josh Soref
f362789174
spelling: because
2018-03-13 07:15:08 +00:00
Josh Soref
7895051962
spelling: attribute
2018-03-13 07:12:16 +00:00