No description
Find a file
2020-02-12 17:54:49 -05:00
config tidy up go modules and rename project 2019-12-03 12:12:54 -05:00
hello finish initial task driver skeleton implementation 2019-11-29 18:58:03 -05:00
.gitignore tidy up go modules and rename project 2019-12-03 12:12:54 -05:00
go.mod updated go.mod to correct "invalid pseudo-version: does not match version-control timestamp" 2020-02-12 19:03:07 +00:00
go.sum updated go.mod to correct "invalid pseudo-version: does not match version-control timestamp" 2020-02-12 19:03:07 +00:00
LICENSE initial set of files for task driver skeleton 2019-09-30 10:26:20 -05:00
main.go tidy up go modules and rename project 2019-12-03 12:12:54 -05:00
README.md Update README.md with appropriate github path 2020-02-07 11:33:27 -08:00

nomad-skeleton-driver-plugin

This project is a Hashicorp Nomad task driver plugin skeleton implementation. You can clone and modify this to get started writing your own task driver plugin.

Requirements

  • Nomad v0.9.5+
  • Go v1.12.x (to build the plugin)

Get Started

Download the project module:

go get github.com/hashicorp/nomad-skeleton-driver-plugin

Follow the comments marked with a TODO tag to implement your driver's logic. For more information consult the Nomad documentation on plugins.

The initial state of the skeleton is a simple task that outputs a greeting. You can try it out by starting a Nomad server and client and running the job provided in the config folder:

go build
nomad agent -dev -config=./config/client.hcl -plugin-dir=$(PWD)

# in another shell
nomad run ./config/example.nomad

You should rename the project's root folder and the hello module to fit your own driver.

Code Organization

The skeleton driver comes with an in memory task state store (see hello/state.go). This in-memory map is for storing runtime details (like a process id). The details of what to store is left to the implementation of the task driver. Fields stored in the base implementation in this skeleton can be found in the taskHandle struct.