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

Update the Nomad provider for new job features #46

Closed
shantanugadgil opened this issue Oct 8, 2018 · 26 comments · Fixed by #47
Closed

Update the Nomad provider for new job features #46

shantanugadgil opened this issue Oct 8, 2018 · 26 comments · Fixed by #47

Comments

@shantanugadgil
Copy link
Contributor

Terraform Version

0.11.8

Affected Resource(s)

  • nomad_job

Expected Behavior

At any given time, the Nomad provider should have all the features of the latest version of Nomad (v0.8.6 at the time of this bug report)

Actual Behavior

Terraform's Nomad provider is lagging behind.

Important Factoids

We (and I assume many other folks) would like to codify their entire usage via Terraform.
The Terraform provider not being able to do many things makes for out-of-band activities like directly having to do nomad plan, nomad run, etc.

Using the command line is fine for folks who are very familiar with the Nomad options.
All-in-all, it is easier to direct folks to a single "interface" (i.e. Terraform, than to have to learn multiple commands and options)

Thanks and Regards,
Shantanu

@epetrovich
Copy link

There is a lot of pain in the ss

  • nomad_job.blitzops-app-dispatch: 1 error(s) occurred:
  • nomad_job.blitzops-app-dispatch: error parsing jobspec: error parsing 'job': 1 error(s) occurred:
  • group: 'blitzops-group' -> invalid key: reschedule

@paultyng paultyng changed the title make the Nomad provider up-to-date again Update the Nomad provider for new job features Nov 1, 2018
@epetrovich
Copy link

@paddycarver Please!

@cgbaker
Copy link
Contributor

cgbaker commented Nov 1, 2018

Hi all, I am looking into this right now. I will have an update on this ASAP. Thank you for your patience.

@epetrovich
Copy link

@cgbaker
I hope you're not in the another time-space dimension )

@cgbaker
Copy link
Contributor

cgbaker commented Nov 5, 2018

I'm in Florida... does that count? 😄

@mildred
Copy link

mildred commented Nov 7, 2018

Yep, got errors too, at first I thought that the nomad versions I used on my servers was lagging behind, but no, it was here :)

group: 'main', task: 'main', service (0) -> invalid key: canary_tags

@mildred
Copy link

mildred commented Nov 7, 2018

Are there plans to have this provider always in sync (perhaps a new release of this provider on each new nomad release) ?

@cgbaker
Copy link
Contributor

cgbaker commented Nov 7, 2018 via email

@mildred
Copy link

mildred commented Nov 7, 2018

Thanks.

For those interested, I could build the last version of the nomad provider using nomad 0.8.6 with this Dockerfile:

FROM golang:1.11 AS terraform-nomad
ARG NOMAD_VERSION=0.8.6
ARG TERRAFORM_NOMAD_VERSION=1.2.0
RUN go get github.com/kardianos/govendor
WORKDIR /go/src/github.com/terraform-providers/terraform-provider-nomad
RUN git clone -b v${TERRAFORM_NOMAD_VERSION} https://github.com/terraform-providers/terraform-provider-nomad.git .
RUN govendor fetch -v github.com/hashicorp/nomad/...@v${NOMAD_VERSION}
RUN govendor fetch -v github.com/hashicorp/golang-lru/...
RUN make build

@shantanugadgil
Copy link
Contributor Author

@cgbaker

Would you be releasing an updated version which works with Nomad 0.8.6 syntax, and then an updated one when the 0.9 alpha/beta releases happen (hopefully soon)

@cgbaker
Copy link
Contributor

cgbaker commented Nov 7, 2018 via email

@shantanugadgil
Copy link
Contributor Author

when? and when?

Based on the disturbance in the force (flurry of activity) I sense Consul 1.4.0 or Nomad 0.9.0 (rc1?) is coming and people could be busy! ☺️☺️☺️

@cgbaker
Copy link
Contributor

cgbaker commented Nov 7, 2018 via email

@ketzacoatl
Copy link

@cgbaker, thanks for the updates! Was there a release made for the provider, updated to work with 0.8.6?

@cgbaker
Copy link
Contributor

cgbaker commented Nov 22, 2018 via email

@pashinin
Copy link

Had an error about canary_tags. I don't understand it. Why all this validation is not made by Nomad itself? If there is some code from Nomad in this project that validates jobs - there always be difference about what Nomad thinks is valid and what terraform-provider-nomad thinks is valid.

I don't know but is it really this provider's job to check Nomad jobs (I mean should it be in codebase of this project)?

@lawliet89
Copy link

lawliet89 commented Nov 26, 2018

It parses and deserializes the jobspec into some form that the API can consume, is my guess.

The Job API wants the Jobspec in JSON form.

@cgbaker
Copy link
Contributor

cgbaker commented Nov 26, 2018

@pashinin , as stated above, the provider is currently "versioned" because of the client that it imports from the Nomad project. The plan is to remove this versioning so that the provider does not need to be constantly updated as new features are added to Nomad.

@pashinin
Copy link

@cgbaker really waiting for this. Thanks for answers.

@cgbaker
Copy link
Contributor

cgbaker commented Nov 26, 2018

My pleasure. My apologies for the delay on taking care of this.

@shantanugadgil
Copy link
Contributor Author

I am (and have been) waiting for 0.9 GA build. :) :)

@ketzacoatl
Copy link

ketzacoatl commented Dec 13, 2018

@cgbaker Is there a release coming for this provider to work with nomad 0.8.6?

@cgbaker
Copy link
Contributor

cgbaker commented Dec 13, 2018 via email

@ketzacoatl
Copy link

@cgbaker would it be reasonable to push a release now with what's ready to go, and then again when there are more PRs merged? Or are there updates that need to block the release?

@cgbaker
Copy link
Contributor

cgbaker commented Dec 20, 2018

It is my only task for today. I'm doing some manual testing right now and then I'll do the release.

@cgbaker
Copy link
Contributor

cgbaker commented Dec 20, 2018

v1.3.0 of the Nomad provider just released, with support for the Nomad v0.8.6 API. Thank you for your patience, I promise you that we will be much faster in adding support in the future. Please let me know if you encounter any problems with this provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants