Git Product home page Git Product logo

nomad-skeleton-device-plugin's Introduction

Nomad Skeleton Device Plugin

Skeleton project for Nomad device plugins.

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

Requirements

  • Nomad 0.9+
  • Go 1.19 or later (to build 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 [email protected]:<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-device-plugin
+ module github.com/<ORG>/<REPO>
...
// main.go

package main

import (
    log "github.com/hashicorp/go-hclog"
    "github.com/hashicorp/nomad/plugins"

-   "github.com/hashicorp/nomad-skeleton-device-plugin/device"
+   "github.com/<REPO>/<ORG>/device"
)
...

Build the skeleton plugin.

$ make build

Running the Plugin in Development

You can test this plugin (and your own device plugins) in development using the plugin launcher. The makefile provides a target for this:

$ make eval

Deploying Device Plugins in Nomad

Copy the plugin binary to the plugins directory and configure the plugin in the client config. Then use the device stanza in the job file to schedule with device support. (Note, the skeleton plugin is not intended for use in Nomad.)

nomad-skeleton-device-plugin's People

Contributors

cgbaker avatar jrasell avatar lgfa29 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.