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

Flag to wait till deployment actually succeeded #4606

Closed
yellowmegaman opened this issue Aug 21, 2018 · 15 comments
Closed

Flag to wait till deployment actually succeeded #4606

yellowmegaman opened this issue Aug 21, 2018 · 15 comments
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. stage/duplicate theme/cli type/enhancement

Comments

@yellowmegaman
Copy link

Hello there! Question here.

It would be really great if i could run nomad run and it won't release terminal till deployment is not only scheduled, but also completed successfully.

Use case:

  • all deployments are being run from CI
  • template nomad job against some environment via consul-template
  • or template nomad job via terraform (template_file)
  • plan/run template to deploy stuff
  • terminal gets released if constrains/capacity are OK
  • run script to check whenever deployment is successful by getting desiredCount and comparing to healthyCount in a loop

This approach is sub-optimal since it relies on some scripting which can be faulty and may have some corner cases.

Can we add flag to nomad run so it won't throw 0 exit code till deployment is finished?
Same would be awesome for nomad provider for terraform.

Thanks for attention in advance!

@jippi
Copy link
Contributor

jippi commented Aug 21, 2018

a work-around for now is to use jrasell/levant

@yellowmegaman
Copy link
Author

@jippi thanks! seen it before, never had a chance to use it yet.

In my opinion it's not something that should be external to nomad, since it is already aware of the state of deployed services.

Anyway, gonna try levant for now, leaving issue open in case there would be some update whenever feature may land on roadmap for some future release.

@jippi
Copy link
Contributor

jippi commented Aug 21, 2018

Yes, I'm pretty sure Nomad will eventually support this - should be pretty trivial to add - just wanted to unblock you until Nomad got native support :)

@yellowmegaman
Copy link
Author

@jippi in that you've succeeded =) Thank again

@yellowmegaman
Copy link
Author

Well, levant seems to be completely broken, deploying nomad job with broken on purpose healthcheck results in success, so hope this issue will see some attention someday.

@jrasell
Copy link
Member

jrasell commented Aug 21, 2018

@yellowmegaman feel free to raise an issue against Levant and I can take a look into it. We use it extensively and successfully in my current job so I would be curious what the issue is.

@dadgar
Copy link
Contributor

dadgar commented Aug 21, 2018

@yellowmegaman I do think it is a good feature and would want to add it. @jrasell PRs welcome 😄

@yellowmegaman
Copy link
Author

@dadgar that is super-awesome =)
@jippi hashicorp/levant#227

@cgbaker
Copy link
Contributor

cgbaker commented May 17, 2019

@yellowmegaman : FYI, i'm adding this feature to the Nomad TF provider:
hashicorp/terraform-provider-nomad#56

@pznamensky
Copy link

pznamensky commented Apr 10, 2020

Looks like levant is abandoned by owner. Thus the flag in Nomad would be super useful for us too.

@tgross tgross added the stage/accepted Confirmed, and intend to work on. No timeline committment though. label Aug 24, 2020
@tgross tgross added the stage/needs-verification Issue needs verifying it still exists label Mar 3, 2021
@pznamensky
Copy link

Is there any news here? :)
Unfortunately it blocks upgrade to nomad 1.0 for us.
We used to watch for deployments using levant, but it doesn't have hcl2 support (hashicorp/levant#400)

@tcurdt
Copy link

tcurdt commented Mar 11, 2021

No hcl2 support is a blocker to use levant.
And I also agree this should be ideally be built into nomad.

A nomad run should have an interactive option. Either interactive by default with a background/daemon option (see docker-compose -d) or non-interactive by default and allowing to activate interactive (see docker -i).

Not seeing allocation and deployments details as well as process stdout/err on a nomad run is a terrible UX.
Worse - there is not even a simple way to get to this information like that from the command line.
Why is there no nomad alloc list for example?

@thatsk
Copy link

thatsk commented Apr 5, 2021

we want to see this feature in nomad cli. So that we can make ci-cd via nomad cli to get realtime deployment in logs

@tgross
Copy link
Member

tgross commented Apr 5, 2021

This issue is a duplicate of #6818, which is on the roadmap. I'm going to close this issue in lieu of #6818 only because it has more of the implementation details on how we want to proceed on this. Keep an eye there for future progress (also: our Product folks do look at emoji reactions to issues, so feel free to add them there!)

@tgross tgross closed this as completed Apr 5, 2021
@tgross tgross added stage/duplicate and removed stage/needs-verification Issue needs verifying it still exists labels Apr 5, 2021
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. stage/duplicate theme/cli type/enhancement
Projects
None yet
Development

No branches or pull requests

9 participants