[feature] Defining and consuming custom resources
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
This is one possible solution for #406. The idea is to implement custom resources similarly to mesos:
https://mesos.apache.org/documentation/attributes-resources/
### When starting a client, specify resources it exposes
```
client {
enabled = true
resource "gpu" {
type = "range"
begin = 1
end = 4
}
resource "ip" {
type = "ip-range"
begin = "192.168.1.0"
end = "192.168.1.255"
}
resource "github_token" {
type = "set"
items = ["1234", "abcd"]
}
resource "network" {
type = "enum"
items {
private = "eth2"
overlay = "overlay1"
}
}
}
```
### Allow to specify used resources in task specification
```
task {
resources {
gpu = 2
ip = 1
github_token = 1
network = "private"
}
}
```
### Expose used resource to tasks (and custom drivers) via env variables
```
NOMAD_RESOURCE_gpu = '1,2'
NOMAD_RESOURCE_ip = '192.168.1.5'
NOMAD_RESOURCE_github_token = '1234'
NOMAD_RESOURCE_network = 'eth2'
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the proposed client resource declarations, task resource requirements, and environment-variable examples in the issue, along with the linked Mesos resource documentation. Done would require agreeing on the resource types, configuration and task syntax, allocation behavior, and task-facing environment variables.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100