No description
  • Go 97.6%
  • HCL 1.7%
  • Makefile 0.7%
Find a file
dependabot[bot] f007fa7aec
build(deps): bump github.com/hashicorp/nomad from 1.10.2 to 1.11.1 (#54)
Bumps [github.com/hashicorp/nomad](https://github.com/hashicorp/nomad) from 1.10.2 to 1.11.1.
- [Release notes](https://github.com/hashicorp/nomad/releases)
- [Changelog](https://github.com/hashicorp/nomad/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/nomad/compare/v1.10.2...v1.11.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/nomad
  dependency-version: 1.11.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-05 12:42:31 -05:00
.github add codeowners file (#53) 2025-12-09 13:38:29 -05:00
example [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) (#52) 2025-12-08 08:47:01 -05:00
hello [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) (#52) 2025-12-08 08:47:01 -05:00
.gitignore improve documentation 2020-02-12 21:07:05 -05:00
GNUmakefile improve documentation 2020-02-12 21:07:05 -05:00
go.mod build(deps): bump github.com/hashicorp/nomad from 1.10.2 to 1.11.1 (#54) 2026-01-05 12:42:31 -05:00
go.sum build(deps): bump github.com/hashicorp/nomad from 1.10.2 to 1.11.1 (#54) 2026-01-05 12:42:31 -05:00
LICENSE [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) (#52) 2025-12-08 08:47:01 -05:00
main.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) (#52) 2025-12-08 08:47:01 -05:00
README.md docs: add a note about replace directives for go.mod (#41) 2024-08-12 15:19:07 +02:00

Nomad Skeleton Driver Plugin

Skeleton project for Nomad task driver plugins.

This project is intended for bootstrapping development of a new task driver plugin.

Requirements

  • Go v1.18 or later (to compile the plugin)
  • Nomad v0.9+ (to run the plugin)

Building the Skeleton Plugin

Generate a new repository in your account from this template by clicking the Use this template button above.

Clone the repository somewhere in your computer. This project uses Go modules so you will need to set the environment variable GO111MODULE=on or work outside your GOPATH if it is set to auto or not declared.

$ git clone git@github.com:<ORG>/<REPO>git

Enter the plugin directory and update the paths in go.mod and main.go to match your repository path.

// go.mod

- module github.com/hashicorp/nomad-skeleton-driver-plugin
+ module github.com/<ORG>/<REPO>
...
// main.go

package main

import (
    log "github.com/hashicorp/go-hclog"
-   "github.com/hashicorp/nomad-skeleton-driver-plugin/hello"
+.  "github.com/<REPO>/<ORG>/hello"
...

Important

If your plugin imports hashicorp/nomad package, you may want to consult Nomad's top-level go.mod file to see if there aren't any "replace" directives that your package may also need.

Build the skeleton plugin.

$ make build

Deploying Driver Plugins in Nomad

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

$ make build
$ nomad agent -dev -config=./example/agent.hcl -plugin-dir=$(pwd)

# in another shell
$ nomad run ./example/example.nomad
$ nomad logs <ALLOCATION ID>

Code Organization

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