hashicorp / hashicorp/nomad-pack
Allow pack to read sources from a file
- Dominant language
- Go
- Stars
- 447
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
When building out repeatable environments, such as a new development environment every morning, I must store my override files and make a note of the commands to trigger the desired packs. I could also wrap several run commands in a bash script.
It would be nice if we provided a structured way to achieve this, in a similar to way Terraform module implementations. In this setup, I could write a single file detailing all the packs I wish to run; triggering a single command which then runs the packs against my target cluster. This would also reduce the burden and complexity of pack dependencies as this could be expressed in this form. It my also be nice to express some form to dependency between the packs, to ensure one is triggered before others; again similar to Terraform's `depend_on`.
Taking the Nomad Autoscaler horizontal Vagrant demo as an example, we could create implementations which don't require complex pack dependencies.
```
pack "nomad_autoscaler" {
source = ""
var_1 = "foo"
var_2 = "bar"
}
pack "prometheus" {
source = ""
var_1 = "foo"
var_2 = "bar"
}
pack "grafana" {
source = ""
var_1 = "foo"
var_2 = "bar"
}
pack "loki" {
source = ""
var_1 = "foo"
var_2 = "bar"
}
```
Contributor guide
Research direction
No files or tests are named. Start by tracing the existing pack command and how it reads pack sources, then define how a single structured file should represent multiple packs and dependencies. Done means one command can read that file, run the requested packs against the target cluster, and respect any declared ordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, terraform
- Domain
- cli, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100