Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Is terraform generally used to deploy workloads to nomad instead of writing tasks directly?

It can be, although it has some weird shortcomings. For example, if the job is already present in Nomad but not running ("dead"), I don't think you can use the terraform provider to start it again.

HashiCorp themselves suggest using terraform to provision the base nomad system (ACL, quotas, base system jobs), but perhaps not your actual applications:

> This can be used to initialize your cluster with system jobs, common services, and more. In day to day Nomad use it is common for developers to submit jobs to Nomad directly, such as for general app deployment. In addition to these apps, a Nomad cluster often runs core system services that are ideally setup during infrastructure creation. This resource is ideal for the latter type of job, but can be used to manage any job within Nomad.

https://registry.terraform.io/providers/hashicorp/nomad/late...

In my work helping companies with nomad, I've seen jobs run a few different ways:

* Write and submit HCL jobs directly to nomad

* Terraform templating and the nomad provider (as above)

* https://github.com/hashicorp/levant

* A DIY templating thing (e.g. python and jinja2 templates)

* A webapp that submits jobs as JSON directly to the nomad API, perhaps modifying it to match certain policies (kind of like k8s validating / mutating admission webhooks)

There's also a new thing similar to Helm: https://github.com/hashicorp/nomad-pack



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: