sophia
05bbd9ec50
Use v2 manager to seed ruby plugins for remote manager
2022-04-25 12:26:13 -05:00
sophia
78fbd12da9
Use remote plugin manager when in server mode
2022-04-25 12:26:13 -05:00
sophia
d5007d4d85
Use remote plugin module when in server mode
2022-04-25 12:26:13 -05:00
sophia
e951c4d971
Add remote plugin manager
2022-04-25 12:26:13 -05:00
sophia
90033b9b68
Only prepend remote mixin synced folders when running in remote mode
2022-04-25 12:26:13 -05:00
sophia
7a75ed6cbb
Get stdout and stderr from privledged execute
2022-04-25 12:26:13 -05:00
sophia
8e85561f61
Get stdout and stderr from command
2022-04-25 12:26:12 -05:00
sophia
c63e7936b2
go generate
2022-04-25 12:26:12 -05:00
sophia
175f05657c
go generate
2022-04-25 12:26:10 -05:00
sophia
9722443d09
Don't check if guest is able to connect
...
The go side should be doing the checks for ensuring the guest is reachable
2022-04-25 12:26:10 -05:00
sophia
84af97f0a9
Add placeholder remote guest name
2022-04-25 12:26:10 -05:00
sophia
b29b37af0d
Add mappers for time duration proto
2022-04-25 12:26:09 -05:00
sophia
ab395ad730
Move remote communicator to remote plugin module
2022-04-25 12:26:09 -05:00
sophia
514b4e3d89
go generate
2022-04-25 12:26:09 -05:00
sophia
49ad851606
Use named paths proto message for uploading/downloading
2022-04-25 12:26:09 -05:00
sophia
8513a14f9e
Use RemotePath proto message to upload/download files
2022-04-25 12:26:08 -05:00
sophia
1f2084cd17
Add communincator path proto
2022-04-25 12:26:08 -05:00
sophia
4bc2a51748
Pass communincator command
2022-04-25 12:26:08 -05:00
sophia
2e693b60fe
Load remote communincator
2022-04-25 12:26:07 -05:00
sophia
10b4015455
Setup remote communincator
2022-04-25 12:26:07 -05:00
sophia
dc9fe12644
Disable checking for synced folder client
2022-04-25 12:26:07 -05:00
sophia
2bd9c995e9
Don't include folder if it is disabled
2022-04-25 12:26:07 -05:00
sophia
083fe5ea82
Setup remote mixin synced folder module
2022-04-25 12:26:07 -05:00
sophia
9c9c93a0c6
Set folder guestpath and hostpath
2022-04-25 12:26:06 -05:00
sophia
e71e887331
Move remote synced folder module into remote plugin module
2022-04-25 12:26:06 -05:00
Chris Roberts
ac8978eee3
Generated proto updates
2022-04-25 12:26:05 -05:00
sophia
c44046998e
go generate
2022-04-25 12:26:04 -05:00
sophia
d6ecc23a9f
Create synced folder hash
2022-04-25 12:26:04 -05:00
sophia
fa1377528f
go generate
2022-04-25 12:26:04 -05:00
sophia
45cfcc4c34
Return empty response if capability returns an empty response
2022-04-25 12:26:04 -05:00
sophia
46aa1b3e4e
Add synced folder service to list of services
2022-04-25 12:26:04 -05:00
sophia
847d87a017
Get synced folder from machine
2022-04-25 12:26:04 -05:00
sophia
183ceb85eb
go generate
2022-04-25 12:26:03 -05:00
sophia
b58b77ef0b
Add capability methods for remote server
2022-04-25 12:26:03 -05:00
sophia
8bce3e6bd7
Enable remote mode for synced folders
2022-04-25 12:26:03 -05:00
sophia
9002131281
go generate
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
9f3241a5b5
Generated updates
2022-04-25 12:26:01 -05:00
Chris Roberts
3fc453cde6
Adjust log silencing for ruby mapper output
2022-04-25 12:26:00 -05:00
Chris Roberts
687189f7b2
Provider name must return as Symbol
2022-04-25 12:25:59 -05:00
Chris Roberts
0c1ff17c43
Only allow mappers logging output if explicitly requested
2022-04-25 12:25:59 -05:00
Chris Roberts
a85c7cc097
Temp logger fix to prevent encoding based errors
2022-04-25 12:25:59 -05:00
Chris Roberts
84b9b1650a
Add client access to ui
2022-04-25 12:25:57 -05:00
sophia
7aaeaf2e46
Update protos
2022-04-25 12:25:57 -05:00
sophia
c5de0d88f7
Add box from ruby
2022-04-25 12:25:56 -05:00
sophia
69b15f7140
Return list of box info when requesting all boxes
2022-04-25 12:25:56 -05:00
sophia
9e04d926bf
go generate
2022-04-25 12:25:56 -05:00
sophia
f71aa68a69
Get box collection from vagrant-go
2022-04-25 12:25:56 -05:00
sophia
8ead293836
Enable box collection for server mode
2022-04-25 12:25:56 -05:00
sophia
e7a8c7120e
go generate
2022-04-25 12:25:56 -05:00
sophia
9d01b2c60e
Add endpoint for finding boxes
2022-04-25 12:25:54 -05:00
sophia
80f3549716
Initialize remote box with client
2022-04-25 12:25:54 -05:00
sophia
085e30053e
Load box from machine
2022-04-25 12:25:53 -05:00
sophia
d0f7d89104
Enable box in server mode
2022-04-25 12:25:53 -05:00
sophia
62d7324bfc
go generate
2022-04-25 12:25:52 -05:00
sophia
93e94186ba
Add box endpoints
2022-04-25 12:25:52 -05:00
sophia
d7737effbf
Add id to box
2022-04-25 12:25:52 -05:00
sophia
1c27a57213
Use Box as part of machine proto
2022-04-25 12:25:51 -05:00
sophia
ed76183470
Add Box proto message
2022-04-25 12:25:51 -05:00
sophia
0a878721f5
go generate
2022-04-25 12:25:49 -05:00
sophia
4251b2ff7c
Get first level parent from ruby plugins
2022-04-25 12:24:48 -05:00
sophia
92d7c7b291
go generate
2022-04-25 12:24:48 -05:00
sophia
09a836745a
Don't search for parent plugins that don't exist in the Ruby run time
2022-04-25 12:24:48 -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
61c3134928
Do not provide environment to capability call
2022-04-25 12:24:46 -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
Chris Roberts
be4bbe902f
Generated proto updates
2022-04-25 12:24:46 -05:00
sophia
14d17dfd9d
Return capability execution result
2022-04-25 12:24:41 -05:00
sophia
b2cce38f48
Add rpc endpoint to prune out old jobs
2022-04-25 12:24:40 -05:00
sophia
bb336592ea
Remove 'found' from basis/project/target query results
2022-04-25 12:24:39 -05:00
sophia
54c0b0528d
Add remote host module
2022-04-25 12:24:39 -05:00
sophia
eeb950b987
Support to_proto for ui's
2022-04-25 12:24:39 -05:00
sophia
7477455380
Get parents from guest plugin
2022-04-25 12:24:39 -05:00
sophia
0588584438
Get local_data from project client
2022-04-25 12:24:37 -05:00
sophia
9599024fa5
Don't setup paths for remote environment
2022-04-25 12:24:37 -05:00
sophia
42796be551
Get machine from project for guest service
2022-04-25 12:24:37 -05:00
sophia
f1e2a73bfa
Don't use just a client to instantiate a machine
2022-04-25 12:24:37 -05:00
sophia
7a5d045083
Setup guest client when initializing guest
2022-04-25 12:24:37 -05:00
sophia
8efc8542b7
Rename guest client 'capability method to match the client interface
2022-04-25 12:24:37 -05:00
sophia
5d46b93a99
Each component client stores their proto
2022-04-25 12:24:37 -05:00
sophia
83a080521e
Add to_proto to machine in order to pass machine protos around to other plugins
2022-04-25 12:24:37 -05:00
sophia
827b50db77
Get client from machine go impl
2022-04-25 12:24:36 -05:00
sophia
3067fe7dba
Add remote guest
2022-04-25 12:24:36 -05:00
sophia
d196b8635c
Detect Ruby guest plugin
2022-04-25 12:24:36 -05:00
sophia
b8468644f3
Load vagrantfile given by remote project
2022-04-25 12:24:36 -05:00
sophia
ca3d76ca7d
Use project client to populate environment options
2022-04-25 12:24:36 -05:00
sophia
5ca687cad4
Implement project home path, cwd and default private key
2022-04-25 12:24:36 -05:00
Chris Roberts
c1bbc7284b
Generated proto updates
2022-04-25 12:24:35 -05:00
Chris Roberts
f618d991f8
Update RemoteUI name to Remote
2022-04-25 12:24:35 -05:00
Chris Roberts
e090fa4e10
Move UI to remote file and include options to client
2022-04-25 12:24:34 -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
99aef42342
Check for server mode before setting constant
2022-04-25 12:24:34 -05:00
Chris Roberts
927fd5e52f
Remove proto requires
...
They will only be needed when running in server mode, and when
in server mode, they will be loaded at startup
2022-04-25 12:24:34 -05:00
Chris Roberts
b609a44452
Fix method name called on machine client
2022-04-25 12:24:34 -05:00
Chris Roberts
fb629ae4a2
Fix name and use provider_name from client
2022-04-25 12:24:33 -05:00
Chris Roberts
1ae6ca0522
Generated protobuf updates
2022-04-25 12:24:33 -05:00
Chris Roberts
7a1aba1cb9
Use has with indifferent access when loading entry
2022-04-25 12:24:32 -05:00
Chris Roberts
e5184c5719
Call id on client instead of get_id
2022-04-25 12:24:32 -05:00
Chris Roberts
34ecea07bc
Fix method calls when building entry and setting ID
2022-04-25 12:24:32 -05:00
Chris Roberts
9fb979d44c
Extend module on entry not index
2022-04-25 12:24:32 -05:00
Chris Roberts
aaf0ae8504
Generated proto updates
2022-04-25 12:24:31 -05:00
Chris Roberts
8f4bb571a5
Update remote function name and setup
2022-04-25 12:24:30 -05:00
Chris Roberts
b243868ce9
Add remote module for machine index entry
2022-04-25 12:24:30 -05:00
sophia
10a1f1011b
Get datadir for machine and project
2022-04-25 12:24:29 -05:00
sophia
68aa184bee
Get local data path from project
2022-04-25 12:24:28 -05:00
sophia
f722b15661
Remove references to SDK from remote machine index
2022-04-25 12:24:28 -05:00
sophia
f761af3c55
Move client creation into client module
2022-04-25 12:24:28 -05:00
sophia
c71eb9ea0e
UQuery machine index by uuid
2022-04-25 12:24:28 -05:00
sophia
154a4e56f0
Use uuid as Target Index identifier
2022-04-25 12:24:28 -05:00
sophia
83495a4f8b
Fix each machine index machine yielder
2022-04-25 12:24:27 -05:00
sophia
47a0a2d7d2
Record machine client in machine index entry
2022-04-25 12:24:27 -05:00
sophia
6eea1b0afd
Add endpoint for getting all machines from the index
2022-04-25 12:24:27 -05:00
sophia
c5e6a97892
Cache machines in machine index
2022-04-25 12:24:27 -05:00
sophia
8808ef353e
Clean up logging
2022-04-25 12:24:27 -05:00
sophia
f103797592
go generate .
2022-04-25 12:24:27 -05:00
sophia
01fc2926c9
Save machine index entries remotely
2022-04-25 12:24:27 -05:00
sophia
6f54cf51a2
Allow Machine Index entries to have a remote machine reference
2022-04-25 12:24:27 -05:00
sophia
90968ea430
pPss environment client to machine index eentry environment
2022-04-25 12:24:27 -05:00
sophia
3bda8b24ef
Save point: Get a target successfully from target index
2022-04-25 12:24:26 -05:00
sophia
6dae3576a3
Get project ref
2022-04-25 12:24:26 -05:00
sophia
1ea5b2ba91
Save point: use target ref to retrieve info from target index
2022-04-25 12:24:26 -05:00
sophia
663fbab87a
Fill in remote machine index module
2022-04-25 12:24:26 -05:00
sophia
7de0fe1bd8
Get machine index remote service setup
2022-04-25 12:24:26 -05:00
sophia
c123335456
Save point: connect to machine index service
2022-04-25 12:24:26 -05:00
sophia
a5445b708e
go generate
2022-04-25 12:24:26 -05:00
sophia
040f02e60d
Add proto to delete target
2022-04-25 12:24:25 -05:00
Chris Roberts
378019f014
Generated proto updates
2022-04-25 12:24:25 -05:00
Chris Roberts
fe293dfd1f
Require client to be set and provide stub on initial startup
...
When running in server mode, make the Environment validate a client
option is provided on instantiation. If no client option is provided,
raise an exception since it is required in server mode.
Since an initial Environment is required during start, include a
stub value for the client so the initial Environment can be instantiated
successfully and the GRPC service can be started.
2022-04-25 12:24:23 -05:00
Chris Roberts
3ca9519f5c
Generated proto updates
2022-04-25 12:24:23 -05:00
Chris Roberts
cad5a7f717
Generated proto update
2022-04-25 12:24:21 -05:00
sophia
0d0ff5c5c6
Define communicator configs as plugin configs
2022-04-25 12:24:21 -05:00
sophia
a128d98dea
Move to_proto to config classes
2022-04-25 12:24:21 -05:00
sophia
5128f604ca
go generate
2022-04-25 12:24:20 -05:00
sophia
0e40c2eb97
to_proto save point
2022-04-25 12:24:20 -05:00
sophia
ada96f13a3
Upload targets found in Vagrantfile
2022-04-25 12:24:20 -05:00
sophia
8d1b9a4a8c
Update regex for dummy config fields
2022-04-25 12:24:20 -05:00
sophia
85271c616e
Collect config defined by community plugins
2022-04-25 12:24:20 -05:00
sophia
f316afdd38
Set project and basis configuration type as vagrantfile
2022-04-25 12:24:19 -05:00
sophia
53c822d76a
Define Vagrantfile DB form
2022-04-25 12:24:19 -05:00
sophia
5bfa4a6f48
Move Vagrantfile proto definition to the plugin sdk
2022-04-25 12:24:19 -05:00
sophia
eeb7028a48
Building after rebase
2022-04-25 12:24:19 -05:00
sophia
5f532fc986
Make box url a repeated field
2022-04-25 12:24:18 -05:00
sophia
c2176d5e80
Extract vagrant and communicator settings from Vagrantfile
2022-04-25 12:24:18 -05:00
sophia
849755646b
Define config for config.ssh, winrm, winssh, vagrant
2022-04-25 12:24:18 -05:00
sophia
da58bbc1c1
Get all config.vm.* variables
2022-04-25 12:24:18 -05:00
sophia
b152cc4f2b
Allow dummy config to eval config blocks to set instance variables
2022-04-25 12:24:18 -05:00
sophia
9c1d09eb8a
Extract providers
2022-04-25 12:24:18 -05:00
sophia
81368d83dd
More complicated provider setup
2022-04-25 12:24:18 -05:00
sophia
5467b9134c
Extract network info from Vagrantfile into proto
2022-04-25 12:24:18 -05:00
sophia
36a4a03160
Define the 'config.vm.*' level of the Vagrantfile
2022-04-25 12:24:17 -05:00
sophia
0923f1edf2
Collect config for Vagrantfile config element that does not exist in Ruby
2022-04-25 12:24:17 -05:00
sophia
6899a2a00d
Make Vagrantfile protos more closely resemble the Vagrantfile
2022-04-25 12:24:17 -05:00
sophia
3b6766cfc1
Add Vagrantfile to task definition
2022-04-25 12:24:16 -05:00
sophia
3d25e71970
Add Vagrantfile to proto data model
2022-04-25 12:24:16 -05:00
sophia
71f3b99819
Setup Vagrantfile refs
2022-04-25 12:24:16 -05:00
Chris Roberts
1a7f3d1f96
Generated proto updates
2022-04-25 12:24:13 -05:00
Chris Roberts
8771e6078f
Add parents method to host plugin
2022-04-25 12:24:12 -05:00
Chris Roberts
ca20181019
Proto updates
2022-04-25 12:24:11 -05:00
Chris Roberts
8f222b36de
Generated proto updates
2022-04-25 12:24:10 -05:00
sophia
6805d81301
Update protos
2022-04-25 12:24:10 -05:00
sophia
3c52682226
Host mapper to connect to already running host process
2022-04-25 12:24:09 -05:00
sophia
e86dc5958a
Clean up debugging cruft
2022-04-25 12:24:09 -05:00
sophia
fc8fe0a106
Make status work
2022-04-25 12:24:09 -05:00
sophia
340c2d7b19
Save point: load target from project
2022-04-25 12:24:09 -05:00
Chris Roberts
37d42bc8ef
Update generated proto files
2022-04-25 12:24:09 -05:00
Chris Roberts
a6b3b2969b
Register environment callback for server mode
2022-04-25 12:24:08 -05:00
Chris Roberts
6994f5d5a7
Start adding updates for remote environment in ruby runtime
2022-04-25 12:24:08 -05:00
sophia
f670b7ca5b
Output special character "%"
...
printf the special character for "things" is % + STUFF, so if you want just a % you have to use the special character % and then combine it with % to get a single %
2022-04-25 12:24:04 -05:00
sophia
1c63921a6c
Clean up ui output to remote extra spaces
...
Previously the clear line function would insert extra lines making
output look like
"""
==> default: Importing base box 'hashicorp/bionic64'...
Progress: 10%!(NOVERB)
Progress: 20%!(NOVERB)
Progress: 30%!(NOVERB)
Progress: 40%!(NOVERB)
"""
now, output for progress looks like
"""
==> default: Importing base box 'hashicorp/bionic64'...
Progress: 10%!(NOVERB)
Progress: 20%!(NOVERB)
Progress: 30%!(NOVERB)
Progress: 40%!(NOVERB)
"""
2022-04-25 12:24:04 -05:00
sophia
552a43744e
Enable getting user input for ruby plugins
2022-04-25 12:24:04 -05:00
sophia
de649b2154
Update protos
2022-04-25 12:24:03 -05:00
sophia
36fa931bed
AUpdate ruby protos for sdk chagnes
2022-04-25 12:24:02 -05:00
sophia
9f51d87038
Update ruby execute func for new proto
2022-04-25 12:24:02 -05:00
sophia
3107da72af
Execute subcommands
2022-04-25 12:24:02 -05:00
sophia
475c5b41d8
Allow commands to have subcommands specified as a list of command components
2022-04-25 12:24:01 -05:00
sophia
7fb193f4a2
Add dummy endpoint for subcommands
2022-04-25 12:24:01 -05:00
sophia
3c491fafdd
Register subcommands with subcommands passed as part of command info
2022-04-25 12:24:01 -05:00
sophia
261fa5bbae
Fixes for command info message
2022-04-25 12:24:00 -05:00
sophia
1f432350ea
Add dummy endpoint for subcommands
2022-04-25 12:24:00 -05:00
Chris Roberts
ab59e254ac
Revert addition of readers as they are no longer required
2022-04-25 12:24:00 -05:00
Chris Roberts
a39eebd882
Include prepended method for adding reader
2022-04-25 12:23:59 -05:00
Chris Roberts
a103f6fb17
Restore the machine class and update thin class to remote module
2022-04-25 12:23:59 -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
d501d77005
Add accessors to get to cli components
2022-04-25 12:23:59 -05:00
Chris Roberts
b601872287
Update protos
2022-04-25 12:23:59 -05:00
sophia
c1ce1016c7
Render ruby protobufs to ruby lib
2022-04-25 12:23:57 -05:00
sophia
bb6174d305
Log output to file
2022-04-25 12:23:57 -05:00
sophia
b54d425038
Update Ruby protos for updates to sdk + pick up environment service
2022-04-25 12:23:57 -05:00
Chris Roberts
cbc2ecac0a
Generated proto updates
2022-04-25 12:23:56 -05:00
Chris Roberts
70a2c977d9
Stub in just enough in the thin machine to get things working
2022-04-25 12:23:56 -05:00
Chris Roberts
fc129977af
Add very basic thin machine implementation against client
2022-04-25 12:23:56 -05:00
Chris Roberts
1a6aeb5811
Update proto file locations
2022-04-25 12:23:56 -05:00
Chris Roberts
a37d1b70a5
Remove client autoload since it does not exist here
2022-04-25 12:23:56 -05:00
Chris Roberts
b7616bdd5d
Add generated proto files for the vagrant service
2022-04-25 12:23:55 -05:00
Chris Roberts
c09fc7be1e
Whitespace cleanup
2022-04-25 12:23:55 -05:00
Chris Roberts
c887a18437
Allow UI instance to be provided to environment and used properly
2022-04-25 12:23:55 -05:00
Chris Roberts
7b70925f47
Provide thick and thin implementations of machine
2022-04-25 12:23:55 -05:00
Chris Roberts
03ac9cd015
Provide machine implementation based on server mode
2022-04-25 12:23:55 -05:00
Chris Roberts
4701cb336e
Add helpers to flag when running in server mode
2022-04-25 12:23:55 -05:00
Chris Roberts
7350b85902
Implement enough of the command service to get things working.
...
Also updates the UI setup so that we can properly get the
output streaming back to us.
2022-04-25 12:23:55 -05:00
sophia
854a2a4022
Just get the flag names
2022-04-25 12:23:55 -05:00
Chris Roberts
02b08ac12c
Remove option parser modifications for storing flags
2022-04-25 12:23:54 -05:00
sophia
1109d89616
Collect flag information
2022-04-25 12:23:54 -05:00
sophia
43e4e968ef
Make help message work
2022-04-25 12:23:54 -05:00
sophia
cadcbe82f7
Hard code less
2022-04-25 12:23:54 -05:00
sophia
5fc0b22efd
Make machine initialization work
2022-04-25 12:23:54 -05:00
sophia
e3d8418081
Machine getters to use machine client
2022-04-25 12:23:54 -05:00
sophia
46f5fa5ab8
Machine client implementation
2022-04-25 12:23:54 -05:00
sophia
078a091709
Start replacing machine variables with calls to core service
2022-04-25 12:23:54 -05:00
sophia
4c26f5b384
Make machine with ui
2022-04-25 12:23:54 -05:00
sophia
fd74318bf5
Pass ui to machine
2022-04-25 12:23:54 -05:00
sophia
12627a78a3
Make ui class for interacting with terminal ui service
2022-04-25 12:23:53 -05:00
sophia
c99348413a
Make ui class for interacting with terminal ui service
2022-04-25 12:23:53 -05:00
sophia
ea64673e9f
Add terminal client
2022-04-25 12:23:53 -05:00
sophia
3c360722df
Allow communicator to use plugin config
2022-04-25 12:23:53 -05:00
sophia
ad74f18719
Add communicators
2022-04-25 12:23:53 -05:00
sophia
0b1df4593e
Get some more information about Vagrantfile
2022-04-25 12:23:53 -05:00
sophia
eb165d43d1
Add proto defs for Vagrantfile parser service
2022-04-25 12:23:53 -05:00
Chris Roberts
721648bc4f
Update generated proto files
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
d7f92f9d87
Some update for sdk changes
2022-04-25 12:23:52 -05:00
sophia
74c17de0e1
update protos from sdk chagnes
2022-04-25 12:23:52 -05:00
sophia
7ff0d11582
Move protos into Vagrant module
2022-04-25 12:23:52 -05:00
sophia
773c4bd910
Return an ActionResp
2022-04-25 12:23:52 -05:00
sophia
41f3af51af
Return a result from an up action
2022-04-25 12:23:51 -05:00
sophia
a25381b03a
Get the associated requested provider
2022-04-25 12:23:51 -05:00
sophia
7a612698a5
Transform a machine arg to an instance of Vagrant::Machine
2022-04-25 12:23:51 -05:00
sophia
a806a47a1a
Decode incoming machine arg
2022-04-25 12:23:51 -05:00
sophia
a11f5a4dbf
Move proto files into more globally accessible spot
2022-04-25 12:23:51 -05:00
sophia
82e3dd55ad
Setup machine client
2022-04-25 12:23:51 -05:00
Chris Roberts
d896d7b296
Algorithm must be set for key exchange to enable it for key exchange
2021-11-09 09:12:25 -08:00
Chris Roberts
6810c7b4bb
Add version capability to darwin host plugin
2021-11-02 16:43:26 -07:00
Darragh Bailey
0c6d6d8e9d
Improve Gem spec selection when resolving
...
When computing the solution set, if a gem is already loaded, make sure
to use the specification of the loaded one instead of the first
available as otherwise there is a risk that when multiple matches are
available the specification for the wrong version may be picked.
When this happens an error message will be triggered that looks like
can't activate json-2.3.0, already activated json-2.5.1
This can occur for distribution packaged vagrants as well as installs
for development purposes where the ruby install may contain a default
gem spec of an older version than is needed.
Fixes : #12521
Fixes : vagrant-libvirt/vagrant-libvirt#1390
2021-11-01 17:31:48 +00:00
Chris Roberts
ae7639ec23
Validate VirtualBox hostonly network range
...
VirtualBox introduced a restriction on the valid range for hostonly
networks. When using a version of VirtualBox which includes this
restriction a check is performed on the defined IP address to validate
it is within either the default range (as defined in the VirtualBox
documentation) or the values defined in the network configuration
file.
2021-10-28 17:12:15 -07:00
Pedro Furtado
a8e00cb01d
Update environment.rb
2021-07-09 21:32:22 -03:00
Chris Roberts
bbd1404c1e
Merge pull request #12437 from chrisroberts/line-buf-shell-util
...
Line buffer utility and shell provisioner usage
2021-06-29 13:11:19 -07:00
Chris Roberts
32757d56e1
Merge pull request #12304 from grahamhub/issue-12191
...
implement --info flag for package cmd #12191
2021-06-29 13:07:47 -07:00
Chris Roberts
de8da71c41
Merge pull request #12431 from chrisroberts/ui-tests
...
Update tests to use real UI instance
2021-06-29 12:47:26 -07:00
Chris Roberts
6cc6b89dcf
Include line buffer util in autoloads
2021-06-29 11:04:14 -07:00
Chris Roberts
35de0d724e
Remove stringio usage from line buffer util, add max buffer length
2021-06-29 11:04:14 -07:00
sophia
0a1b20bb07
Get powershell path in %WINDIR%/System32
2021-06-29 10:34:57 -05:00
Rui Lopes
ef18b45786
ensure that the shell provisioner only emits complete output lines to the ui
...
partial lines are buffered until they are complete (have a line ending)
see https://github.com/hashicorp/vagrant/issues/11047
2021-06-25 15:58:24 -07:00
Chris Roberts
3d0d0148e9
Update tests to use real UI instance
...
Replaces use of UI doubles within tests to use actual UI instance
to ensure calls are passing parameters correctly.
2021-06-23 14:04:48 -07:00
Chris Roberts
ac958314ae
Merge pull request #12415 from chrisroberts/ssh-rsa-dep-fix
...
Flag RSA SHA1 deprecation when loading keys
2021-06-22 15:48:20 -07:00
Chris Roberts
e7a6f397da
Updates for Ruby 3.0
2021-06-21 15:57:46 -07:00
Chris Roberts
46aca8be5a
Flag RSA SHA1 deprecation when loading keys
...
Set flag on RSA keys of deprecated RSA SHA1 support when loading
keys based on server version of the transport. This ensures keys
are properly flagged. Flag name has been updated to provide context
on usage.
Version matching on the OpenSSH server version has also been updated
to handle customized naming in the version string (as seen in the
Windows port) and to properly handle when no match is found.
Fixes #12344 #12408 #12381
2021-06-10 21:17:08 -07:00
Chris Roberts
5967a23fa0
Support pwsh executable name for powershell
...
This updates the powershell detection to look for the `pwsh` executable
and use it when the powershell executable is not available.
2021-04-28 12:45:48 -07:00
grahamhub
bfa73b06c6
cli: implement --info flag for package #12191
2021-04-15 00:28:41 -05:00
Chris Roberts
a08597d787
Tighten constraints on net-ssh to ensure functionality. Update patch
...
Keep the constraint on net-ssh tight so we can be confident that the
patching will be successful and that a net-ssh release won't inadvertently
cause our local updates to become non-functional.
Fix patch to only update the behavior for RSA based keys when the server
is recent enough to include the signature changes
2021-04-13 10:58:59 -07:00
Chris Roberts
246058ffbb
Add #signature_algorithm and update #ssh_do_sign and #to_blob
...
Modifies `OpenSSL::PKey::RSA` to provide a `#signature_algorithm`
method which provides the signature algorithm value expected by
OpenSSH. The `#ssh_do_sign` method is updated to use the set
algorithm (SHA256) and `#to_blob` is updated to include the
signature algorithm instead of the key type.
2021-04-12 17:28:52 -07:00
sophia
b480790a8d
Add box directly with authed urls
2021-04-05 16:39:01 -05:00
Chris Roberts
7362ac52e4
Fix dependency resolution where default gems are included
...
Parts of the stdlib which have been externalized but are still
included within Ruby introduce issues when pinning Vagrant's
dependencies to resolve plugin installs. When determining
Vagrant's dependency list prior to solution generation, check
the specification and ignore any default gems to prevent
pinning versions that are not actual dependencies.
2021-03-25 12:35:33 -07:00
Chris Roberts
5b6fc4c0bb
Merge pull request #12250 from chrisroberts/cloud-upload-sized
...
Check file size prior to upload and automatically adjust options
2021-03-24 13:01:15 -07:00
Chris Roberts
fd4da92245
Check file size prior to upload and automatically adjust options
...
When uploading box file, check if the size is greater than
5GB. If the size is larger and the direct to storage option
is enabled, disable the option due to current 5GB restriction
on direct uploads.
2021-03-23 15:11:32 -07:00
Ikko Ashimine
4dca0b90fa
Fix typo in vagrantfile.rb
...
inital -> initial
2021-03-23 18:16:45 +09:00
Chris Roberts
60323fdd6c
Merge pull request #12235 from chrisroberts/api-notify-ups
...
Prevent notification on default store, fix client end point
2021-03-17 13:57:47 -07:00
Chris Roberts
c6153ff84f
Remove deprecation log messages
2021-03-15 15:36:33 -07:00
Chris Roberts
d3fffd65d2
Prevent notifications on redirect to default store
...
This also checks if the redirect notification has been displayed
before inspecting the source and location to prevent repeat checks
after the notification has been sent.
2021-03-15 15:21:07 -07:00
Chris Roberts
51382a0d0a
Deprecate hook and disable access token parameter by default
...
This sets the `authenticate_box_url` hook as deprecated and also
disables the cloud auth middleware from adding an access token
as a URL parameter by default. An environment variable has been
added which can be used for re-enabling the access token URL
parameter behavior if required for some legacy system which does
not support the authorization header.
2021-03-15 14:46:46 -07:00
Connor Martin
e92fe5d720
Merge branch 'main' of github.com:hashicorp/vagrant into remove-space
2021-03-11 17:20:57 -06:00
Chris Roberts
80ec78929a
Adjust syntax on method
2021-03-09 08:05:55 -08:00
Chris Roberts
55dc18cb96
Default the builtin specs when initializing
2021-03-08 17:14:14 -08:00
Chris Roberts
32f4951759
Activate builtin specs during startup
...
When starting up, and before any loading, find our current
specification and activate all the internal dependencies
while also collecting the activated specifications. Store
these for later use when doing plugin resolutions. We bypass
the builtin list when running in bundler since they will
still show up as not activated, but we use the entire list
regardless.
2021-03-08 16:25:13 -08:00
Chris Roberts
282dadf784
When not running inside bundler, only use specifications that are activated
2021-03-08 15:58:47 -08:00
Chris Roberts
2d019cb608
Provide specialized messages on plugin install failure if possible
...
Inspect the error message received when failing to install a
plugin. If it's something we can determine the cause, send
back a cleaner error message to the user on how to resolve.
2021-03-08 15:57:13 -08:00
Chris Roberts
034cb8c59e
Update net-ssh constraint to non-prerelease version
...
To prevent resolution issues with the introduction
of a prerelease constraint, update the net-ssh constraint
to be a minimum at the latest release. Include monkey
patches to include support for wanted host key algos.
The monkey patches are only applied to the latest
net-ssh currently and will be ignored once the current
prerelease has been fully released.
2021-02-25 17:07:00 -08:00
Sophia Castellarin
d111596446
Merge pull request #12188 from soapy1/vagrant-does-not-reference-empty-string-vm
...
Don't try to find "" by prefix in the machine index
2021-02-23 14:24:17 -06:00
Sophia Castellarin
181b4ea890
Merge pull request #12177 from soapy1/apply-download-opts-to-metadata
...
Apply download options to metadata requests
2021-02-23 13:26:53 -06:00
Sophia Castellarin
f2a1e25783
Merge pull request #12189 from soapy1/box-metadata-download-error
...
Raise error if downloading box metadata fails
2021-02-23 12:39:42 -06:00
sophia
220f346d2b
Make shell script for loop shell agnostic
2021-02-22 12:36:54 -06:00
sophia
4b67216d71
Raise error if downloading box metadata fails
2021-02-12 17:07:04 -06:00
Connor Martin
3f70d44266
assign to a new var
2021-02-12 09:31:32 -06:00
sophia
ab1c3c2547
Don't try to find "" by prefix in the machine index
2021-02-11 15:59:15 -06:00
sophia
44f527ff8e
Apply download options to metadata requests
2021-02-09 18:33:20 -06:00
Connor Martin
9a26940114
use strip instead
2021-02-04 14:29:54 -06:00
Connor Martin
1022e5b991
remove all space from checksums
2021-02-01 21:54:10 -06:00
Chris Roberts
203a5f0075
Update filesystem type match for WSL2
...
Fixes shared folder on WSL2 based on #11705
2020-11-18 10:58:33 -08:00
Chris Roberts
7f6ab8e166
Merge pull request #12054 from chrisroberts/f-sol-file-resolv
...
Update solution file to use DependencyRequests and allow prerelease
2020-11-17 15:36:44 -08:00
Chris Roberts
c4eda3f08f
Update solution file to use DependencyRequests and allow prerelease
...
Maintain the solution file persisting dependency information on
disk but update the runtime representation to
Gem::Resolver::DependencyRequest instances which are expected
by the sets when locating matches.
Properly abide by prerelease setting in customized sets and
force prerelease matching when in the builtin set. If a request
is matched on a prerelease, and the request itself is not set
to allow prereleases, update it to ensure successful resolution.
2020-11-17 13:02:33 -08:00
Chris Roberts
157db39938
Remove action name tracking for applying
...
The raw action name tracking should be sufficient for preventing
multi-insertions where only a single modification should occur.
With action name, hooks _should_ be able to be applied in multiple
builder stacks as they are expanding.
Fixes #12035
2020-11-11 09:56:03 -08:00
Chris Roberts
30f8e7944d
Track raw actions as they are applied to prevent multiple insertions
...
The raw actions are used for applying the original trigger behavior
which can insert before and/or after the entire set of actions. When
processing the stack items, mark when the raw action has been applied
to prevent it from being applied again. Triggers around the raw actions
should only ever be applied _once_.
Fixes #12034
2020-11-11 09:39:07 -08:00
Chris Roberts
b479e04eb4
Request sets need prerelease enabled not just the spec matching
2020-11-06 15:22:28 -08: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
a6f838a830
Merge pull request #12014 from chrisroberts/f-broken-trigger-hook
...
Fix application of action named triggers/hooks
2020-11-03 14:00:19 -08:00
Chris Roberts
cb6aed6045
Merge pull request #12008 from chrisroberts/f-wsl-port-open
...
Handle Errno::EALREADY exceptions on port checks
2020-11-03 13:59:03 -08:00
Chris Roberts
3ec8d44cf9
Remove debug setup for restclient logger
2020-11-03 13:31:41 -08:00
Chris Roberts
db24f26daa
Track application of action name hooks / triggers
...
When expanding stack track the origin action name and only apply
it once the stack has completed its expansion. The local env data
is marked with origin action to prevent it from being applied in
nested builders as they are expanded. The value of the stored action
name is checked and invalidated if another action is applied to the
same env in the future so hooks / triggers for that action are
applied as expected.
2020-11-02 10:39:15 -08:00
Chris Roberts
cba5bca7de
Use variable when sending info to logger
2020-11-02 10:31:28 -08:00
Chris Roberts
7331623a39
Only allow the ui to be overridden when running action
2020-11-02 10:30:56 -08:00
Chris Roberts
16dc9db76b
Handle Errno::EALREADY exceptions on port checks
...
With WSL port checks can end up resulting in Errno::EALREADY being
raised. When encountered, assume port is unavailable.
2020-10-30 13:09:51 -07:00
Chris Roberts
70d36bc7cd
Update uploader options to include --fail so failures are reported properly
2020-10-30 09:26:07 -07:00
Chris Roberts
78d309a09b
Update cloud command to use refactored library implementation
...
This PR is dependent on the 2.1.0 release of the vagrant_cloud
library. It updates the `cloud` command to use the new interface
for interacting with the Vagrant Cloud API. It also adds support
for direct to backend storage uploads, and defaults to this
method.
Also included is a bit of cleanup refactoring, addition of method
documentation, and fixing up some small issues around custom username
usage within the internal client for authentication.
2020-10-30 09:26:07 -07:00
sophia
8a8eff130a
Allow entity to support content disposition
2020-10-28 16:21:42 -05:00
sophia
799ebb32ed
Add tests for mime util
2020-10-28 15:57:45 -05:00
sophia
4cdf60cb0a
Create MIME type data
2020-10-28 15:57:45 -05:00
sophia
e2f71dd55d
Update mime gem
2020-10-28 15:57:45 -05:00
Rui Lopes
fcdc63ff89
let the user configure the cloud_init mime part content-disposition filename
2020-10-28 15:57:45 -05:00
Sophia Castellarin
70d37e8a9c
Merge pull request #11835 from soapy1/remove-url-token
...
Download a box by setting auth headers
2020-09-22 15:35:30 -05:00
Sophia Castellarin
6e8be9f9ef
Merge pull request #11863 from soapy1/include-index
...
Include index
2020-09-15 15:47:35 -05:00
sophia
d6a88f666f
Add some docstrings and logging
2020-09-15 15:01:01 -05:00
sophia
5607428a66
Don't try to recover machine without a uuid
2020-09-15 11:16:13 -05:00
Sophia Castellarin
0d79bd9f99
Merge pull request #11893 from dcermak/remove_erubis
...
Switch from unmaintained gem erubis to erubi
2020-09-15 09:59:25 -05:00
sophia
f9b1d52ec6
Catch error for when guest is not available
2020-09-10 16:28:38 -05:00
Dan Čermák
ce8230ccfb
Switch from unmaintained gem erubis to erubi
...
Rails switched to erubi as well, as erubis has not seen any new releases since 2011.
2020-09-10 10:52:47 +02:00
sophia
e619a6a930
Catch nil input for querying machine index
2020-08-28 16:13:43 -05:00
Sophia Castellarin
3835da3839
Merge pull request #11797 from soapy1/synced-folder-caps
...
Synced folder caps for mount options and default fstab modification behaviour
2020-08-21 11:44:15 -05:00
sophia
fffc555faf
Add tests for new hook
2020-08-21 10:54:43 -05:00
sophia
e96d60c029
Add tests for persisting shared folders
2020-08-20 18:24:09 -05:00
sophia
e2f012ff58
Escape value being scrubbed
2020-08-20 18:03:01 -05:00
sophia
943047d003
Add tests for synced folder collections
2020-08-19 17:57:57 -05:00
sophia
bb5d0e9c28
Remove credentials scrubbing from caching synced folders
...
Passwords are (and should) never stored be as part of folder data.
I think there is also a case to be made about desensitizes
information here can lead to leaking of credentials. For example if
an exported folder is named "vagrant" and the users password is
"vagrant", the synced_folder cache will show "****" in place of the
folder name, indicating that it is also password.
2020-08-19 17:43:22 -05:00
sophia
56fa014af8
Don't persist shared folders if mount options capability not provided
2020-08-19 15:47:21 -05:00
Chris Roberts
cd2d84fda7
Adjust synced folder collection class
2020-08-19 15:00:40 -05:00
sophia
7577c11eb6
Persist synced folders in action
2020-08-19 15:00:40 -05:00
sophia
1a3136b9fe
Allow types to be specified when instantiating a typed hash
2020-08-19 15:00:40 -05:00
sophia
bc898e385d
Update tests for synced folder typed hash
2020-08-19 15:00:40 -05:00
sophia
2239ee8582
Create Hash with type attribute
2020-08-19 15:00:40 -05:00
sophia
faad9f2717
Add tests
2020-08-19 15:00:40 -05:00
sophia
cde39e26ba
Make mount options a synced_folder capability
2020-08-19 15:00:40 -05:00
sophia
afd2a28f60
Add synced_folder_capability
2020-08-19 15:00:40 -05:00
sophia
0d1635303f
Sperate hook for authenticating url and adding headers for authentication
2020-08-18 17:42:59 -05:00
sophia
27b37ea838
Scrub credentials as whole words, don't capture matching substrings
2020-08-18 11:38:04 -05:00
sophia
b5f6df9ec0
Download a box by setting auth headers
2020-08-18 10:13:39 -05:00
Chris Roberts
e9ece2ab58
Merge pull request #11814 from chrisroberts/f-dep-warns
...
Updates to address all Ruby deprecations and warnings
2020-08-12 09:07:10 -07:00
Chris Roberts
5003bb6e15
Updates to address all Ruby deprecations and warnings
...
This includes updates for resolving all warnings provided by Ruby
for deprecations and/or removed methods. It also enables support
for Ruby 2.7 in the specification constraint as all 2.7 related
warnings are resolved with this changeset.
2020-08-10 13:05:41 -07:00
Chris Roberts
98ffa4add0
Speed up open port detection
2020-08-07 16:38:15 -07:00
Chris Roberts
05a3e122fb
Only warn when configured host IP is not found on local device
2020-08-07 16:38:15 -07:00
Sophia Castellarin
a2811909be
Merge pull request #11618 from jbonhag/fix/empty-box
...
Treat an empty box value as invalid
2020-08-07 11:18:33 -05:00
Sophia Castellarin
be10e060e6
Merge pull request #11732 from soapy1/detach-from-subprocess
...
Detach from subprocess
2020-08-07 11:11:03 -05:00
Sophia Castellarin
bedd141381
Merge pull request #11721 from jbonhag/f/ssh-nil-exit-status
...
Raise an error on nil exit status
2020-08-07 10:55:58 -05:00
Sophia Castellarin
2d59b4f8dd
Merge pull request #11807 from soapy1/sanatize-mount-command
...
Capture escape character [3J
2020-08-07 10:53:01 -05:00
Sophia Castellarin
c17ba03904
Merge pull request #11773 from soapy1/cloud-init-wait-action
...
Add cloud init wait action
2020-08-06 16:28:45 -05:00
sophia
8a766ca9ab
Capture escape character [3J
2020-08-06 15:50:51 -05:00
sophia
a1d429a4e8
Raise more descriptive error if cloud init fails
2020-08-06 15:47:36 -05:00
Jeff Bonhag
3a1705b50a
Make sure we don't run an empty box
2020-07-31 15:29:06 -04:00
Sophia Castellarin
b41db6bebe
Output cloud init messages to user
...
Co-authored-by: Jeff Bonhag <jbonhag@hashicorp.com>
2020-07-31 12:10:43 -05:00
Jeff Bonhag
db57af5bca
Write meta-data as yaml
2020-07-31 11:58:06 -04:00
Jeff Bonhag
c60d1f8565
Set MIME-Version for user data
2020-07-31 11:57:56 -04:00
Jeff Bonhag
f0f681716d
Merge pull request #11787 from fliam/fix-privileged-powershell-executable-on-wsl
...
Use the correct powershell executable for privileged commands
2020-07-30 16:11:00 -04:00
Sophia Castellarin
f49e9f9700
Merge pull request #11719 from soapy1/change-host-name-cap-darwin
...
Make darwin + openbsd +freebsd guest respect 'hostname' network config option
2020-07-30 12:27:38 -05:00
Sophia Castellarin
99c34855ef
Merge pull request #11750 from soapy1/build-iso-module
...
Refactor building ISO cap
2020-07-29 14:16:04 -05:00
sophia
0a5a940e58
Raise an error if cloud-init is not found on guest
2020-07-29 12:50:50 -05:00
sophia
476977a732
Close and unlink iso tempfile
...
On Windows tempfile.delete does not delete the file. It needs
to be closed and unlinked
2020-07-28 11:24:15 -05:00
Liam Feid
3898d02259
Use the correct powershell executable for privileged commands
2020-07-28 07:48:41 +02:00
sophia
5caae15f22
Move isofs_available cap to plugin
2020-07-23 14:42:45 -05:00
Sophia Castellarin
cb1ade9332
Merge pull request #11523 from soapy1/install-autocomplete-cmd
...
Install zsh autocomplete
2020-07-23 13:59:36 -05:00
Sophia Castellarin
3d4b721a22
Merge pull request #11579 from soapy1/provisioner-communicator_required
...
Provisioner communicator required
2020-07-17 10:45:34 -05:00