TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Nomad Task Versioning

19 点作者 dradtke大约 8 年前

3 条评论

schmichael大约 8 年前
Nomad dev here. Great post! Hopefully I can provide some insights:<p>&gt; 1. Templated job files.<p>While parameterized jobs[0] are a step toward templated jobs, they unfortunately don&#x27;t address your use case. We&#x27;ll be adding `-var` options to `run` in 0.7 to allow templating normal jobs like you can template jobs.<p>In the meantime I think what you&#x27;re doing is pretty good and should integrate well into a CI&#x2F;CD pipeline for automating deploys of new builds.<p>You could consider a specialized templating tool instead of sed like m4, a jinja-based tool like j2cli, or even consul-template.<p>A number of users also bypass `nomad run ...` and run jobs through our HTTP API instead.[1] While this takes more code, it&#x27;s easiest to build into existing deployment tooling (CI&#x2F;CD, chatops, chef, etc) and obviously allows easy manipulation.<p>&gt; 2. Better documentation.<p>Absolutely. We&#x27;re acutely aware of the need for more comprehensive docs. Expect a &quot;Guides&quot; section to appear in the near future to cover common use patterns like yours!<p>&gt; 3. Explicit support for artifact versioning?<p>Probably not going to happen as it would be little more than an opaque meta var to Nomad.[2]<p>Although in the upcoming 0.5.5 release we do support Git and hg URLs for artifacts, so you could pull down code from a tag.[3]<p>We do have other artifact features planned for the near future though (like caching so common artifacts shared between jobs aren&#x27;t downloaded multiple times), so perhaps some sort of versioning will be added. Not sure what the exact semantics will be yet.<p>[0] <a href="https:&#x2F;&#x2F;www.hashicorp.com&#x2F;blog&#x2F;replacing-queues-with-nomad-dispatch&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.hashicorp.com&#x2F;blog&#x2F;replacing-queues-with-nomad-d...</a><p>[1] <a href="https:&#x2F;&#x2F;www.nomadproject.io&#x2F;docs&#x2F;http&#x2F;job.html#put-post" rel="nofollow">https:&#x2F;&#x2F;www.nomadproject.io&#x2F;docs&#x2F;http&#x2F;job.html#put-post</a><p>[2] <a href="https:&#x2F;&#x2F;www.nomadproject.io&#x2F;docs&#x2F;job-specification&#x2F;artifact.html" rel="nofollow">https:&#x2F;&#x2F;www.nomadproject.io&#x2F;docs&#x2F;job-specification&#x2F;artifact....</a><p>[3] <a href="https:&#x2F;&#x2F;github.com&#x2F;hashicorp&#x2F;go-getter#git-git" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;hashicorp&#x2F;go-getter#git-git</a>
bogomipz大约 8 年前
I was excited to see a write up on Nomad. I wish it got more attention. I have a question that maybe someone could answer. The author states:<p>&gt;&quot;Despite its relative immaturity, there are a few things I really like about it&quot;<p>Can anyone elaborate on what that immaturity consists of at the moment?<p>Doesn&#x27;t Nomad largely leverage Consul for resource discovery and the remote exec API, Consul being pretty mature.
评论 #13843100 未加载
评论 #13843587 未加载
Nikkau大约 8 年前
The proper way isn&#x27;t to specify artifact checksum?<p>When you rebuild your &quot;main&quot;, you update the checksum and Nomad should see it as a change, no?<p>I can&#x27;t test right now, I don&#x27;t know if Nomad pick the job change and download the new artifact or just fail the check.
评论 #13843230 未加载