Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] provider/nomad: nomad_job #8662

Closed
wants to merge 2 commits into from
Closed

[WIP] provider/nomad: nomad_job #8662

wants to merge 2 commits into from

Conversation

nicolai86
Copy link
Contributor

@nicolai86 nicolai86 commented Sep 5, 2016

this PR aims to add a nomad provider to terraform.

Related issue is #4442.
This PR is still a work in progress, I'm just opening it to get some feedback if people care to play around.

The usage looks like this:

provider "nomad" {
  address = "http://127.0.0.1:4646"
  region = "dc1"
}

resource "nomad_job" "redis" {
  job_definition = <<HCL
job "example" {
  datacenters = ["dc1"]

  update {
    stagger = "10s"
    max_parallel = 1
  }

  group "cache" {
    restart {
      attempts = 10
      interval = "5m"

      delay = "25s"
      mode = "delay"
    }

    task "redis" {
      driver = "docker"

      config {
        image = "redis:latest"
        port_map {
          db = 6379
        }
      }

      service {
        name = "redis"
        tags = ["global", "cache"]
        port = "db"
        check {
          name = "alive"
          type = "tcp"
          interval = "10s"
          timeout = "2s"
        }
      }

      resources {
        network {
          mbits = 10
          port "db" {
          }
        }
      }
    }
  }
}
HCL
}

Since nomad task definitions have a lot of nesting going on I don't see a better way of integrating this than with the template file approach. If somebody has better ideas, please share them :)

@nicolai86 nicolai86 changed the title provider/nomad provider/nomad: nomad_job Sep 5, 2016
@nicolai86 nicolai86 changed the title provider/nomad: nomad_job provider/nomad: nomad_job [WIP] Sep 5, 2016
@radeksimko radeksimko changed the title provider/nomad: nomad_job [WIP] [WIP] provider/nomad: nomad_job Sep 12, 2016
@nicolai86 nicolai86 closed this Oct 16, 2016
@ashald
Copy link
Contributor

ashald commented Oct 16, 2016

So it wasn't merged? :(

@nicolai86
Copy link
Contributor Author

@ashald I can't work in this ATM so I'm shelving the PR incase somebody else wants to give it a try..!

@ghost
Copy link

ghost commented Apr 21, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants