Commit graph

34 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
b0c5852145 Move constants to isolated file to be loaded on-demand
Since the protos are only loaded when the serve command is invoked, move
the constant alias definitions into an isolated file so they are only
loaded when needed by the serve command
2023-05-18 12:02:07 -07:00
Chris Roberts
1cd6ac3b31 Isolate loading dependencies for serve command
Only load the dependencies needed for the serve command if the serve
command is being run. This allows Vagrant to properly load on platforms
where some of the dependency libraries may not be available due to
incompatibilities or being EOL.
2022-12-07 15:35:00 -08:00
Derek Ditch
f581778c2c Fixes Google namespace resolution to global space 2022-11-08 08:50:01 -06:00
Chris Roberts
fda4aef9c7 Make server instance accessible, return integer value 2022-07-25 14:29:38 -07:00
Chris Roberts
f5d778d51a Revert "Merge pull request #300 from hashicorp/optimize-ruby-command-list"
This reverts commit 1c26a4abb0, reversing
changes made to 186824a568.

The changes broke plugin loading when using subcommands so these
changes will be reverted until the underlying issue can be
investigated and resolved.
2022-07-07 14:03:56 -07:00
Chris Roberts
ffa10b4d85 Return integer value from serve command 2022-06-29 16:11:53 -07:00
Chris Roberts
dc91194f9d Load direct conversions after setup 2022-06-15 11:14:07 -07:00
Chris Roberts
8fcabc2c1d Set global broker and cache values 2022-06-15 10:56:19 -07:00
Chris Roberts
83ca40e239
Refactor Ruby service implementations
Update the Ruby service implementations to use the funcspec util
    module for generating spec content. A helper method is now used
    for generating a parent class for services to subclass which
    automatically includes all required modules for usage.
2022-04-25 12:26:37 -05:00
Paul Hinze
ff86d86ac8
Provisioner Plugins 2022-04-25 12:26:37 -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
Chris Roberts
6bdc7baf39
Update name from Types to Type 2022-04-25 12:26:16 -05:00
sophia
6903f9bf09
Setup communincator service 2022-04-25 12:26:07 -05:00
sophia
46aa1b3e4e
Add synced folder service to list of services 2022-04-25 12:26:04 -05:00
Chris Roberts
7f937ea544
Add autoload for types 2022-04-25 12:25:58 -05:00
Chris Roberts
e6952621d3
Provide bind address in output and log active port 2022-04-25 12:24:47 -05:00
Chris Roberts
049c777f69
Use logger utility 2022-04-25 12:24:46 -05:00
Chris Roberts
fa27dc5c4f
Add some logging output from service setup 2022-04-25 12:24:45 -05:00
Chris Roberts
dc32d6e9a0
Clean up constant aliases and set at top level for everyone 2022-04-25 12:24:38 -05:00
sophia
a1fca2fde8
Add guest server for using Ruby based guest plugins 2022-04-25 12:24:36 -05:00
Chris Roberts
af2a98907d
Minimum and maximum ports are based on the default range 2022-04-25 12:24:07 -05:00
Chris Roberts
bb7a3b36eb
Add options to define bind address and range of ports for use 2022-04-25 12:24:05 -05:00
Chris Roberts
e64f07b109
Include the broker streamer service to handled services 2022-04-25 12:23:58 -05:00
Chris Roberts
93f3c70dd0
Update load path modifications and requires for new proto path 2022-04-25 12:23:56 -05:00
Chris Roberts
ac34b3bcdc
Clean up requires, use autoload, set vagrant in server mode 2022-04-25 12:23:55 -05:00
Chris Roberts
9071e39782
Remove plugin service. Use internal service instead. 2022-04-25 12:23:52 -05:00
Chris Roberts
8a9c2fe772
Remove internal service as plugin service provides same implementation 2022-04-25 12:23:52 -05:00
Chris Roberts
ae6639d301
Clean up plugin loading and compact registration 2022-04-25 12:23:52 -05:00
Chris Roberts
851955e1d4
Add command service 2022-04-25 12:23:52 -05:00
Chris Roberts
addf420ca2
Add some helper methods and some adjustments to serve setup 2022-04-25 12:23:52 -05:00
sophia
6d397a072d
Add provider service 2022-04-25 12:23:51 -05:00
sophia
c02baa9219
Start server as vagrant command 2022-04-25 12:23:50 -05:00