Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eveld/nomad-driver-minecraft
https://github.com/eveld/nomad-driver-minecraft
Last synced: about 23 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/eveld/nomad-driver-minecraft
- Owner: eveld
- License: mpl-2.0
- Created: 2021-09-08T10:21:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-09T16:08:00.000Z (over 3 years ago)
- Last Synced: 2024-11-05T11:36:02.809Z (about 2 months ago)
- Language: Go
- Size: 8.87 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Nomad Skeleton Driver Plugin
==========Skeleton project for
[Nomad task driver plugins](https://www.nomadproject.io/docs/drivers/index.html).This project is intended for bootstrapping development of a new task driver
plugin.- Website: [https://www.nomadproject.io](https://www.nomadproject.io)
- Mailing list: [Google Groups](http://groups.google.com/group/nomad-tool)Requirements
-------------------- [Nomad](https://www.nomadproject.io/downloads.html) v0.9+
- [Go](https://golang.org/doc/install) v1.11 or later (to build the plugin)Building the Skeleton Plugin
-------------------[Generate](https://github.com/hashicorp/nomad-skeleton-driver-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](https://blog.golang.org/using-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.```sh
$ git clone [email protected]:/git
```Enter the plugin directory and update the paths in `go.mod` and `main.go` to
match your repository path.```diff
// go.mod- module github.com/hashicorp/nomad-skeleton-driver-plugin
+ module github.com//
...
``````diff
// main.gopackage main
import (
log "github.com/hashicorp/go-hclog"
- "github.com/hashicorp/nomad-skeleton-driver-plugin/hello"
+. "github.com///hello"
...```
Build the skeleton plugin.
```sh
$ 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:```sh
$ make build
$ nomad agent -dev -config=./example/agent.hcl -plugin-dir=$(pwd)# in another shell
$ nomad run ./example/example.nomad
$ nomad logs
```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](https://www.nomadproject.io/docs/internals/plugins/index.html).