Commit graph

299 commits

Author SHA1 Message Date
Nick Ethier 5617f3615b driver/raw_exec: initial raw_exec implementation 2018-10-16 16:53:31 -07:00
Nick Ethier bcc5c4a8bd 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 3e7008c2dc Add BlockAttrs 2018-10-15 20:47:38 -07:00
Alex Dadgar 06719d0b5a
Merge pull request #4783 from hashicorp/f-device-scheduling
Device constraint checking
2018-10-15 15:31:32 -07:00
Alex Dadgar b94505b256
Merge pull request #4780 from hashicorp/f-device-attributes
Device fingerprinting uses Attribute object
2018-10-15 13:37:49 -07:00
Alex Dadgar 4098d2e99c fix typos 2018-10-15 13:15:58 -07:00
Alex Dadgar 7ecd65109a Check constraints on devices 2018-10-14 13:35:47 -07:00
Alex Dadgar f9b056e1d1 Replace attributes map with new Attribute object 2018-10-13 14:08:58 -07:00
Alex Dadgar 5fc9a95201 Use Attribute in device fingerprinting 2018-10-13 11:43:06 -07:00
Alex Dadgar c31a234fb3 fmt -s 2018-10-12 15:34:21 -07:00
Alex Dadgar cbb5f21112 New parser and comparison 2018-10-12 15:25:34 -07:00
Alex Dadgar 364180b396 Units defined and parsing 2018-10-11 23:30:28 -07:00
Alex Dadgar 0183fb4e5c nvidia package restructue + build non-linux 2018-10-05 13:56:04 -07:00
oleksii.shyman 118e3fe7e9 Introduce nvidia-plugin reserve
- added reserve functionality that returns OCI compliant env variables
  specifying GPU IDs to be injected inside the container
2018-10-04 14:55:34 -07:00
oleksii.shyman 0ea1dc1776 Introduce Nvidia-plugin stats
- created go-nvml wrapper for stats
 - added stats feature to nvidia-plugin
2018-10-03 15:12:05 -07:00
oleksii.shyman b4a4b395e3 Introduce nvidia-plugin fingerprinting
- created go-nvml wrapper for fingerprinting
  - added fingerprinting feature to nvidia-plugin
2018-10-03 15:11:56 -07:00
Alex Dadgar ceb0fa8d13 fix documentation of reattach and use testlog 2018-09-18 10:48:37 -07:00
Alex Dadgar 8236478815 singleton wrapper 2018-09-18 10:08:46 -07:00
Alex Dadgar ca28afa3b2 small fixes 2018-09-15 16:42:38 -07:00
Alex Dadgar 7552112a0d review comments 2018-09-10 17:29:28 -07:00
Alex Dadgar 643b9e8ced Plugin loader 2018-09-09 16:41:47 -07:00
Alex Dadgar c6576ddac1 Fix make check errors 2018-09-04 16:03:52 -07:00
Alex Dadgar 2c2a8322b5 Fix device launcher ctx cleanup 2018-09-04 15:48:38 -07:00
Alex Dadgar 6a1db58593
Update README.md 2018-08-28 15:08:59 -07:00
Alex Dadgar b7f3e24391 launcher readme 2018-08-28 15:00:48 -07:00
Alex Dadgar e14fa23961 Add stats to launcher 2018-08-28 13:59:57 -07:00
Alex Dadgar 3e3ca1ac04 Add stats to example plugin 2018-08-28 13:59:57 -07:00
Alex Dadgar 83ad5afb69 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 cefa806519 gofmt -s 2018-08-28 10:32:03 -07:00
Alex Dadgar c394798106 add stats to device interface 2018-08-27 16:11:07 -07:00
Alex Dadgar 1eb043a46c statistics protos 2018-08-23 11:18:35 -07:00
Nick Ethier 6f1b5e2921
lint: fix comment spelling 2018-08-22 22:47:38 -04:00
Nick Ethier f14c8a223e driver/base: fix proto pr comments 2018-08-22 22:20:46 -04:00
Nick Ethier b3b80b380c driver/base: add size on disk field for task 2018-08-22 22:20:46 -04:00
Nick Ethier a005792f98 driver/base: fixup comments from code review 2018-08-22 22:20:46 -04:00
Nick Ethier 3a817dc7c9 driver/base: add task event emitting to proto 2018-08-22 22:20:46 -04:00
Nick Ethier a2c32dda57 driver/base: Add initial protobuf spec 2018-08-22 22:20:46 -04:00
Alex Dadgar 9ac7dcd1ee Describe public interface of Fingerprint 2018-08-20 15:19:08 -07:00
Alex Dadgar 98a67938a0 initial device go-plugin 2018-08-16 16:49:09 -07:00
Alex Dadgar c49beed26e vet 2018-08-13 11:10:33 -07:00
Alex Dadgar 19cffc9a3a Review comments 2018-08-13 11:01:44 -07:00
Alex Dadgar c324e98a25 Initial go-plugin 2018-08-12 15:58:39 -07:00
Alex Dadgar bb20dbde43 move protos 2018-08-10 11:16:55 -07:00
Alex Dadgar 42b432d18d block attr spec 2018-08-10 11:14:12 -07:00
Alex Dadgar d6b291b00d hcl interface to cty function 2018-08-10 10:51:23 -07:00
Alex Dadgar 720cc4d90c Fix protos 2018-08-09 13:29:05 -07:00
Alex Dadgar a355b903a6 SetConfig 2018-08-07 16:16:23 -07:00
Alex Dadgar ca121ce110 review feedback 2018-08-07 13:03:21 -07:00
Alex Dadgar 97ccf42c64 Base and device plugin and hclspec parser 2018-08-07 13:03:21 -07:00