当前位置:网站首页>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
边栏推荐
- JSP实现银柜台业务绩效考核系统
- 从QUIC到TCP
- SQL:如何用采购单销售单的数据 通过移动加权平均法 计算商品成本
- On the continuing Life of Distributed Locks - - Distributed Locks Based on redis
- 【201】php异常处理-PHP中的try catch finally异常处理
- 深度学习与CV教程(14) | 图像分割 (FCN,SegNet,U-Net,PSPNet,DeepLab,RefineNet)
- 论文导读 | 机器学习在数据库基数估计中的应用
- 常用字体介绍
- Checkout design in SAP Spartacus
- 启牛商学院给的券商账户是安全的吗?开户收费吗
猜你喜欢

About uni app configuration, app does not display the top title bar setting

如何写出高性能代码(四)优化数据访问

How about NFT market? Why is NFT so popular? How to build NFT platform

常用字体介绍

Dbutil auxiliary class, manual commit transaction, metadata

TeaTalk·Online 演讲实录 | 圆满完结!安全上云,选对数据迁移策略很重要

Musk says he doesn't like being a CEO, but rather wants to do technology and design; Wu Enda's "machine learning" course is about to close its registration | geek headlines

Microsoft exposes another "scandal": watching VR porn in the office, "the father of hololens" is about to leave!

一个时代的终结!十年了吴恩达经典《机器学习》课程本月关闭注册,上线新课!...

长连接简介
随机推荐
In 2022, capture these 12 data and analyze trends!
/usr/bin/gzip: 1: ELF : not found /usr/bin/gzip: 3: : not found /usr/bin/gzip: 4: Syntax erro
.net core 抛异常对性能影响的求证之路
tf. Data (II) -- parallelization tf data. Dataset generator
SAP Spartacus checkout 流程使用 url 粘贴直接跳转到 delivery mode不能打开页面的原因
马斯克称自己不喜欢做CEO,更想做技术和设计;吴恩达的《机器学习》课程即将关闭注册|极客头条...
DB2数据库重建及表数据迁移探讨研究
Flink 从实时计算到流式数仓,下一步去往哪里?
Syntax of SQL
Setting tcp/ip network in Debian
[arcgis] City relevance analysis
Chapter V data type (IV)
/usr/bin/gzip: 1: ELF: not found /usr/bin/gzip: 3: : not found /usr/bin/gzip: 4: Syntax erro
无延时/无延迟视频直播实例效果案例
深度学习与CV教程(14) | 图像分割 (FCN,SegNet,U-Net,PSPNet,DeepLab,RefineNet)
[problem summary] $t
Dbutil auxiliary class, manual commit transaction, metadata
關於分布式鎖的續命問題——基於Redis實現的分布式鎖
shader着色器
论文导读 | 机器学习在数据库基数估计中的应用