70 Commits

Author SHA1 Message Date
Chris Roberts
e958c6183a Adds initial HCP config support
Adds initial basic support for HCP based configuration in vagrant-go.
The initalization process has been updated to remove Vagrantfile parsing
from the client, moving it to the runner using init jobs for the basis
and the project (if there is one). Detection is done on the file based
on extension for Ruby based parsing or HCP based parsing.

Current HCP parsing is extremely simple and currently just a base to
build off. Config components will be able to implement an `Init`
function to handle receiving configuration data from a non-native source
file. This will be extended to include a default approach for injecting
defined data in the future.

Some cleanup was done in the state around validations. Some logging
adjustments were applied on the Ruby side for better behavior
consistency.

VirtualBox provider now caches locale detection to prevent multiple
checks every time the driver is initialized.
2023-09-07 17:26:10 -07:00
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Chris Roberts
672a408dbc Isolate protobuf message loading to server mode
Prevent protobuf loading when not in server mode. This allows proper
loading on platforms which don't have support for the protobuf
libraries.
2022-12-16 16:21:06 -08:00
Paul Hinze
430377fdce
Merge pull request #291 from hashicorp/fix-ssh-config
Fix ssh-config and winrm-config by remote-ifying safe_puts
2022-06-28 11:50:08 -05:00
Paul Hinze
63cefbb8ed
Fix ssh-config and winrm-config by remote-ifying safe_puts
This also removes the "Running (command)..." output since users will
expect to be able to redirect the ssh-config output to a file without
that noise.

If we really like the "Running" thing we can try and swing around and
get fancy by detecting whether or not we have a terminal or a file as
output and doing conditional stuff, but this seemed like the simplest
way forward for now.
2022-06-24 12:53:57 -05:00
Chris Roberts
972ba095e9 Add remote vagrantfile implementation 2022-06-15 11:02:29 -07:00
sophia
428c3b02fd
Use remote box metadata implementation 2022-04-25 12:26:52 -05:00
Paul Hinze
a4f426d26e
Modify SSH utils server mode behavior so ssh -c works
Still work left to do on exec and stderr separation but this represents
enough working to let vagrant-spec assertions pass so I think it's worth a
checkpoint!
2022-04-25 12:26:48 -05:00
sophia
3516aa7131
Set defailt Vagrant log level 2022-04-25 12:26:44 -05:00
Chris Roberts
4a9d501823
Remove module injection on V2 plugins 2022-04-25 12:26:35 -05:00
sophia
809e4044a0
Add provider remote plugin module 2022-04-25 12:26:23 -05:00
Paul Hinze
0fef7cc416
Port push plugins
This uses the new Push plugin support added to the plugin SDK in https://github.com/hashicorp/vagrant-plugin-sdk/pull/106 to make the following changes:

 * The plugin manager on the Go side now registers push plugins
 * The the _remote_ plugin manager on the Ruby side now calls over to
   the go side to get push plugins
 * All the wiring is hooked up such that when a push plugin is replaced
   with its remote GRPC-client-wielding equivalent, the messages are
   ferried around.
2022-04-25 12:26:21 -05:00
sophia
90033b9b68
Only prepend remote mixin synced folders when running in remote mode 2022-04-25 12:26:13 -05:00
sophia
ab395ad730
Move remote communicator to remote plugin module 2022-04-25 12:26:09 -05:00
sophia
10b4015455
Setup remote communincator 2022-04-25 12:26:07 -05:00
sophia
e71e887331
Move remote synced folder module into remote plugin module 2022-04-25 12:26:06 -05:00
sophia
8bce3e6bd7
Enable remote mode for synced folders 2022-04-25 12:26:03 -05:00
Chris Roberts
8b7c5efa52
Use custom output to break long log lines. Force encoding. 2022-04-25 12:26:02 -05:00
Chris Roberts
3fc453cde6
Adjust log silencing for ruby mapper output 2022-04-25 12:26:00 -05:00
Chris Roberts
0c1ff17c43
Only allow mappers logging output if explicitly requested 2022-04-25 12:25:59 -05:00
sophia
8ead293836
Enable box collection for server mode 2022-04-25 12:25:56 -05:00
sophia
d0f7d89104
Enable box in server mode 2022-04-25 12:25:53 -05:00
Chris Roberts
8d5e5b1276
Fix loggers to prevent multiple output
Only the parent logger directly under the root/global logger
    needs to have the outputter set. When set on child loggers
    output will be sent to all outputters defined on child + all
    parents. This provides just a single output behavior.
2022-04-25 12:24:47 -05:00
Chris Roberts
c92e283e7a
Update logger outputter when setting within repository
Since all loggers get registered into the internal repository
    when created, intercept the logger and force the outputter
    to stderr so it is properly applied to all logger instances
    that may be created.
2022-04-25 12:24:46 -05:00
Chris Roberts
f976d7a19c
Fix logger configuration to apply to all 2022-04-25 12:24:46 -05:00
Chris Roberts
819a4d28a4
Reconfigure legacy vagrant to utilize hclog 2022-04-25 12:24:46 -05:00
sophia
54c0b0528d
Add remote host module 2022-04-25 12:24:39 -05:00
sophia
3067fe7dba
Add remote guest 2022-04-25 12:24:36 -05:00
Chris Roberts
df53588de5
Store machine client within index entry for use in generating environment 2022-04-25 12:24:34 -05:00
Chris Roberts
9fb979d44c
Extend module on entry not index 2022-04-25 12:24:32 -05:00
Chris Roberts
b243868ce9
Add remote module for machine index entry 2022-04-25 12:24:30 -05:00
sophia
7de0fe1bd8
Get machine index remote service setup 2022-04-25 12:24:26 -05:00
Chris Roberts
a6b3b2969b
Register environment callback for server mode 2022-04-25 12:24:08 -05:00
Chris Roberts
3512028ca4
Define callbacks which should be run when enabling server mode 2022-04-25 12:23:59 -05:00
Chris Roberts
4701cb336e
Add helpers to flag when running in server mode 2022-04-25 12:23:55 -05:00
Chris Roberts
18c1607c6e Check dependency list on initialization
When initializing for internal plugin resolution inspect contraints
on all defined dependencies. If a prerelease constraint is detected,
automatically enable prerelease resolution.
2020-11-06 09:07:51 -08:00
Chris Roberts
9506c7b323 Allow enabling prerelease resolution via environment variable 2020-11-06 07:22:01 -08:00
Chris Roberts
b8702ac889 Include default options in option parser
Adds method to shared helpers for adding procs to be evaluated
which can add default modifications to the option parser used
by commands. Customized option parser class within Vagrant
handles processing defined procs to set options.
2020-03-27 16:57:59 -07:00
Chris Roberts
062ef52816 Handle strict dependency enforcement when installed within system
When installed outside of the official installer and not running
within a bundler environment, properly activate core dependencies
and properly enforce constraints.
2019-06-05 07:45:07 -07:00
Chris Roberts
84c0aafe71 Support non-interactive local plugin install 2018-07-17 14:49:41 -07:00
Chris Roberts
8ac0fedbbb Suppress errors from invalid path encoding and carry on with best effort
Fixes #9299
2018-04-04 16:09:46 -07:00
Chris Roberts
30e7e81eab Make resolv-replace loading optional not automatic 2018-04-02 11:59:02 -07:00
Josh Soref
1a5ddea9f4 Spelling fixes
* account
* addresses
* administrator
* afterwards
* because
* bridgeable
* capabilities
* capability
* checksum
* configuration
* configuration for
* configure
* criteria
* delimited
* delivered
* derivatives
* description
* detect
* directory
* display
* downloading
* during
* electric
* enabling
* encountered
* equivalent
* executable
* executed
* hashicorp
* hypervisor
* hyphens
* implementation
* incorporate
* inheritance
* initialize
* instance
* instead
* interactions
* invocable
* machine
* maximum
* message
* mounting
* overridden
* overwrite
* paramiko
* preparing
* provides
* provisioning
* recursively
* requested
* resetting
* retryable
* running
* satisfied
* searching
* sometimes
* specified
* successfully
* synced folders
* unauthorized
* underlying
* userprofile
* vagrant
* vagrantfile
* variable
* various
* version
* virtual
* windows
2018-03-14 14:41:04 +00:00
Chris Roberts
f2bf18e56b Update behavior of the authentication middleware
Always remap old hosts to target host when encountered. When custom
vagrant server is defined, warn when tokens may be attached and allow
time for user to cancel.

Fixes #9442
2018-02-21 17:03:38 -08:00
Chris Roberts
522d503030 Use Ruby's resolver by default and allow replace to be disabled 2018-01-22 10:40:33 -08:00
Chris Roberts
73d85bd2f7 Support strict enforcement of internal dependency constraints 2017-06-27 19:20:20 -07:00
Chris Roberts
5f955c3d38 Convert atlas references to vagrant cloud 2017-06-23 10:01:51 -07:00
Chris Roberts
bfc2af4cf9 Always provide timeout on thread join to prevent deadlock errors 2017-03-27 12:58:39 -07:00
Chris Roberts
abf38106c0 Add shared helper method to detect if running version is prerelease 2017-03-07 10:36:14 -08:00
Chris Roberts
1ed27faa9f Remove usage of $vagrant_bundler_runtime within enabled check 2016-11-11 14:23:55 -08:00