Hi,
I have a use case where I need to mount a usb serial device into a docker container that has been deployed using Nomad and upon looking through the documentation there only seems to be the Nvidia device plugin available.
Because of this I have started to learn how to make a device plugin and have started off with a raw USB device which will just mount the “/dev/bus/usb/{bus}/{address}” into the container given that you have provided a vendor and product id. Bare in mind I am new to golang, new to Nomad, and also new to the dev/udev system in linux so it’s been quite fun to mess around with it, however, because of that I am not sure if I have built the plugin in a way that is useful to anyone other than me .
I originally started with the skeleton repo that HashiCorp provided and also found another user who did a HashiTalk demo which had a base setup for at least finding a USB device so a lot of what I have has come from both of these repositories.
My main reason for this post is to see if anyone else has a use for these kind of device plugins, as I plan on making another for mounting a serial device (e.g. /dev/ttyACM0) into a deployed task, and if so, whether I should see about making them more reasonable/generic to use for others before deciding to add it to the community plugin list. This is also a check to see if anyone has already made these plugins and has not put them onto the plugin list yet as they would probably be of a better quality than what I have done so far
My second reason for this post is to see if anyone has any pointers on how to make a good device plugin as i’m still not super confident in what i’ve done so far and there are not many examples that I have seen so far (except the Nvidia one).