当前位置:网站首页>Nomad application layout scheme 07 of hashicopy (submit job)
Nomad application layout scheme 07 of hashicopy (submit job)
2022-06-11 13:19:00 【Hua Weiyun】
One background
stay Nomad in , The job description and all its requirements are stored in a file called “ Working papers ” In the file of . This job file resides on a local disk , It is strongly recommended that you check the job file into source control .
stay Nomad The general process for submitting jobs in is :
- Prepare operation documents according to operation specifications
- Use Nomad Server schedules and checks for changes
- Submit job files to Nomad The server
- ( Optional ) Check the job status and log
Here is a very basic example to get you started .
Two Write a Job file
Nomad Trying to strike a balance between ease and expression in its working specifications .Nomad It also provides Nomad init Command to generate a sample job file . of Nomad More details of the job specification , see also Nomad file .
Here is a sample job file , It first runs a small docker Containers web The server .
job "docs" { datacenters = ["dc1"] group "example" { network { port "http" { static = "5678" } } task "server" { driver = "docker" config { image = "hashicorp/http-echo" ports = ["http"] args = [ "-listen", ":5678", "-text", "hello world", ] } } }}This job file exists in plain text on the local workstation . When you are satisfied with this job file , You will plan and review planning process decisions . Submitting job files to source control is often a best practice , Especially when working in a team .
3、 ... and Plan a Job
After the preparation of operation documents , You may want to preview Nomad Changes made at runtime .nomad job plan Command invokes a drill of the dispatcher , And output which scheduling decisions will be executed .
nomad job plan httpecho.nomad
Please note that , No action was taken . This job is not running . This is a complete exercise , There is no funding .
Four To submit a Job
Suppose the output of the plan looks acceptable , Now ask Nomad Execute the job . This is through nomad job run Command completed . You may choose to provide by plan Command provided modify Indexes , To ensure that no changes have been made to this job between the schedule and now .

Now that you have planned your homework , It may be running , It may not be running . You need to check the allocation status and log , To ensure that the job starts correctly . The next section on checking status details how to check the status of this job .
5、 ... and Update and apply a Job
When updating a job , It is best to always run plan command , And then run run command . for example :


6、 ... and Run one Job
Now? , Assume that the output is normal , perform nomad job run command . Include check-index Parameters ensure that the job does not change between the planning phase and the running phase .

About advanced job update policy ( Such as Canary construction and green deployment ) For more details , Refer to the documentation for the job update policy .
Reference link
边栏推荐
- 在启牛开的证券账户安全吗?如何申请低佣金的股票账户?
- The tree (AVL, 2-3-, red black, Huffman)
- [Multisim Simulation] 555 flash lamp experiment
- Does it affect children to wear Bluetooth headsets? How to protect children's ear health
- Development of smart contract DAPP system for TRX wave field chain
- 怎么管理服务器使网站稳定畅通
- 无延时/无延迟视频直播实例效果案例
- 【滤波器】基于matlab时变维纳滤波器设计【含Matlab源码 1870期】
- .net core 抛异常对性能影响的求证之路
- kubernetes 二进制安装(v1.20.15)(六)部署WorkNode节点
猜你喜欢
![[background interaction] select to bind the data transferred in the background](/img/4d/ef3517a2b3f28f14ad87f16780e246.png)
[background interaction] select to bind the data transferred in the background

面试造航母,入职拧螺丝,工资...
![[interface] view the interface path and check the interface](/img/b2/8c7645c8f915a9c8cec21bf2937298.png)
[interface] view the interface path and check the interface

字节真的是宇宙尽头吗?

苹果将造搜索引擎?
](/img/43/c828e1cd8273c4d32397ff3e2d23cc.png)
工作总结之因为笛卡尔积问题写SQL搞了半天[害](附笛卡尔积总结)
![[bug resolution] the form is paged to display the total data res.data total](/img/92/1ddde16d35465f8dd53ebf90e249b8.png)
[bug resolution] the form is paged to display the total data res.data total

Application of pip2pi, pypiserver and Apache in PIP local source configuration

Some transformation thoughts of programmers after they are 35 years old

On the continuing Life of Distributed Locks - - Distributed Locks Based on redis
随机推荐
Will Apple build a search engine?
live share使用体验
Hashicopy之nomad应用编排方案07(提交Job)
Add function drop-down multiple selections to display the selected personnel
The tree (AVL, 2-3-, red black, Huffman)
刚高考完有些迷茫不知道做些什么?谈一谈我的看法
How about NFT market? Why is NFT so popular? How to build NFT platform
五年官司终败诉,万亿爬虫大军蠢蠢欲动
Dbutil auxiliary class, manual commit transaction, metadata
Is the securities account opened in qiniu safe? How to apply for a low commission stock account?
马斯克称自己不喜欢做CEO,更想做技术和设计;吴恩达的《机器学习》课程即将关闭注册|极客头条...
[problem summary] $t
[clearos] install the clearos system
On the continuing Life of Distributed Locks - - Distributed Locks Based on redis
31W contest question bonus! When AI for Science collides with the "pilot Cup", what sparks will be generated?
如何写出高性能代码(四)优化数据访问
Condition debug of pycharm
2022 年,捕捉这 12 个数据和分析趋势!
PKI/TLS瑞士军刀之cfssl
.net core 抛异常对性能影响的求证之路