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

Feature request: pass pre-rendered jobspec to levant for deployment. #444

Open
jwinters-tc opened this issue Apr 19, 2022 · 2 comments
Open

Comments

@jwinters-tc
Copy link

Description

I want to use levant's deployment watcher in our CI/CD pipelines but it would require us to redo all of our HCL2 job files as levant templates, which for the moment seems like a step backwards, since HCL2 seems to be the future.

Rather than re-inventing the wheel to come up with a deployment watcher, can levant's deploy command accept pre-rendered JSON produced by nomad itself I.E. nomad job run -output

It would be especially useful to be able to pipe such JSON output directly to levant deploy.
I.E. nomad job run -output -var-file=vars.hcl job.hcl | levant deploy -pre-rendered

Basically, decouple levant templating from levant deployments.

Related: #400

@jrasell
Copy link
Member

jrasell commented Jun 9, 2022

Hi @jwinters-tc, the nomad job run command now includes a deployment watch which will follow and report on the deploy resulting from a job register. I wonder if this functionality meets the criteria you need? If not, I feel it would be worth enhancing the core binary to meet expectations.

@jwinters-tc
Copy link
Author

Hi @jrasell thanks for the reply. Yes I've seen that functionality and maybe it could be iterated on instead; it seems not quite as intuitive as levant's deployment watcher. Nomad will return a success code if the deployment fails and auto-reverts, and the output isn't always very clear. Levant's output is more concise, and more importantly it returns a failure code in the case of an auto-revert, which makes more sense in the pipeline.

Anyway I'm not sure of the future of levant, HCL2, nomad pack, etc... In the meantime I've implemented this idea and it's working alright for us. #445

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

No branches or pull requests

2 participants