2022-11-29 12:19:08 +00:00
|
|
|
Nomad Nix Driver Plugin
|
2022-11-28 10:33:28 +00:00
|
|
|
==========
|
|
|
|
|
2022-11-29 12:19:08 +00:00
|
|
|
A Nomad driver to run Nix jobs.
|
|
|
|
Uses the same isolation mechanism as the `exec` driver.
|
|
|
|
Partially based on [`nomad-driver-nix`](https://github.com/input-output-hk/nomad-driver-nix)
|
2022-11-28 10:33:28 +00:00
|
|
|
|
|
|
|
Requirements
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
- [Go](https://golang.org/doc/install) v1.18 or later (to compile the plugin)
|
|
|
|
- [Nomad](https://www.nomadproject.io/downloads.html) v0.9+ (to run the plugin)
|
|
|
|
|
2022-11-29 12:19:08 +00:00
|
|
|
Building and using the Nix driver plugin
|
2022-11-28 10:33:28 +00:00
|
|
|
-------------------
|
|
|
|
|
2022-11-29 12:19:08 +00:00
|
|
|
To build the plugin and run a dev agent:
|
2022-11-28 10:33:28 +00:00
|
|
|
|
|
|
|
```sh
|
|
|
|
$ make build
|
|
|
|
$ nomad agent -dev -config=./example/agent.hcl -plugin-dir=$(pwd)
|
|
|
|
|
|
|
|
# in another shell
|
2022-11-29 12:19:08 +00:00
|
|
|
$ nomad run ./example/example-batch.hcl
|
|
|
|
$ nomad run ./example/example-service.hcl
|
2022-11-28 10:33:28 +00:00
|
|
|
$ nomad logs <ALLOCATION ID>
|
|
|
|
```
|
|
|
|
|
2022-11-29 12:19:08 +00:00
|
|
|
Writing Nix job specifications
|
2022-11-28 10:33:28 +00:00
|
|
|
-------------------
|
2022-11-29 12:19:08 +00:00
|
|
|
|
|
|
|
See documentation comments in example HCL files.
|