Commit Graph

17 Commits

Author SHA1 Message Date
Michael Schurter
e7bf482eaa plugins: SetConfig shouldn't panic on nil driver configs 2018-10-30 17:14:27 -07:00
Nick Ethier
da7563b8c3 Merge pull request #4795 from hashicorp/f-plugin-config
Pass client configuration to plugins through loader
2018-10-29 18:42:27 -07:00
Nick Ethier
95d381cff7 rename NomadConfig to ClientAgentConfig 2018-10-29 21:34:34 -04:00
Nick Ethier
7f69bcd4cd added driver specific client config struct to plugin configuration 2018-10-18 23:31:01 -04:00
Nick Ethier
3244a4cc57 plumb NomadConfig into plugins 2018-10-16 22:47:22 -04:00
Alex Dadgar
a10d3964d0 Do not use cty in drivers 2018-10-16 17:17:07 -07:00
Michael Schurter
2b249eee14 plugins: msgpack codec should use cty tags 2018-10-16 16:56:56 -07:00
Nick Ethier
e2bf0a388e clientv2: base driver plugin (#4671)
Driver plugin framework to facilitate development of driver plugins.

Implementing plugins only need to implement the DriverPlugin interface.
The framework proxies this interface to the go-plugin GRPC interface generated
from the driver.proto spec.

A testing harness is provided to allow implementing drivers to test the full
lifecycle of the driver plugin. An example use:

func TestMyDriver(t *testing.T) {
    harness := NewDriverHarness(t, &MyDiverPlugin{})
    // The harness implements the DriverPlugin interface and can be used as such
    taskHandle, err := harness.StartTask(...)
}
2018-10-16 16:53:31 -07:00
Alex Dadgar
a0b01d16c6 Example device plugin and helpers
This PR introduces:
* An example device plugin that exposes files as devices for testing.
* Helpers for serving a device plugin
* A launcher binary that allows interacting with a device plugin without
needing a Nomad client.
2018-08-28 13:59:57 -07:00
Alex Dadgar
e11a510bd8 initial device go-plugin 2018-08-16 16:49:09 -07:00
Alex Dadgar
2de5989e37 vet 2018-08-13 11:10:33 -07:00
Alex Dadgar
1736d93430 Review comments 2018-08-13 11:01:44 -07:00
Alex Dadgar
cfc6992e4a Initial go-plugin 2018-08-12 15:58:39 -07:00
Alex Dadgar
6cd2c19b9b move protos 2018-08-10 11:16:55 -07:00
Alex Dadgar
827dbabcc2 Fix protos 2018-08-09 13:29:05 -07:00
Alex Dadgar
49e27c0807 SetConfig 2018-08-07 16:16:23 -07:00
Alex Dadgar
48d71eb0fe Base and device plugin and hclspec parser 2018-08-07 13:03:21 -07:00