参考訳:Nomad 0.3 リリース

参考訳:Nomad 0.3 リリース はてなブックマーク - 参考訳:Nomad 0.3 リリース



HashiCorp  Nomad 0.3 稿

 original post


Nomad 0.3  HashiCorp
https://www.hashicorp.com/blog/nomad-0.3.html

 Nomad 0.3


 Nomad 0.3  Nomad 

UXNomad 使


Periodic Jobs

 API

Job Queues


 Nomad 0.3  CHANGELOG 

 Nomad 0.3 Nomad 0.3 

 Periodic Jobs


Nomad 0.3  cron  ETL Extract/Transform/Load Nomad 

Nomad ephemeral
crontab 

 Nomad 15
job "backup" {
    ...
    periodic {
        cron = "*/15 * * * * *"
    }
    ...
}

nomad status
$ nomad status backup
ID                   = backup
Name                 = backup
Type                 = batch
Priority             = 50
Datacenters          = dc1
Status               = running
Periodic             = true
Next Periodic Launch = 2016-02-25 00:40:00 +0000 UTC

Previously launched jobs:
ID                           Status
backup/periodic-1456359780  dead
backup/periodic-1456359840  dead
backup/periodic-1456360020  running

$ nomad status backup/periodic-1456360020
ID          = backup/periodic-1456360020
Name        = backup/periodic-1456360020
Type        = batch
Priority    = 50
Datacenters = dc1
Status      = running
Periodic    = false

==> Evaluations
ID        Priority  Triggered By  Status
d451a894  50        periodic-job  complete

==> Allocations
ID        Eval ID   Node ID   Task Group  Desired  Status
b763c7b8  d451a894  d551531b  cache       run      running

  API


Nomad 0.3 2


stdoutstderr

 SSH 


Nomad 0.3 
logs {
   max_files = 5
   max_file_size = 10
}

stderrstdout5 10 MB 

Nomad 0.3 
$ nomad fs ls c5598dc8 redis/local/
Mode        Size    Modfied Time           Name
-rw-r--r--  0 B     24/02/16 23:19:18 UTC  redis.stderr.0
-rw-r--r--  10 MB   24/02/16 23:22:54 UTC  redis.stdout.3
-rw-r--r--  10 MB   24/02/16 23:22:54 UTC  redis.stdout.4
-rw-r--r--  10 MB   24/02/16 23:22:54 UTC  redis.stdout.5
-rw-r--r--  10 MB   24/02/16 23:22:54 UTC  redis.stdout.6
-rw-r--r--  6.0 MB  24/02/16 23:22:54 UTC  redis.stdout.7

 Nomad 5redis.stdout.0redis.stdout.1redis.stdout.2


$ nomad fs cat c5598dc8 redis/local/redis.stdout.7
<LOGの内容>

Nomad 

 Job Queues

ジョブ・キューとは、ユーザがジョブをスケジュール(訳者注:どの環境上で実行するかを計画・処理すること)できるようにします。それが、全てのリソースを巨大なクラスタで使う場合でもです。リソースが追加されるか利用可能になると、 Nomad はジョブを再評価(re-evaluate)し、実行します。

以下の例は、現在よりも多くのリソースを必要とするジョブを実行します。そうすると Nomad は「blocked」と評価し、リソース変更を処理します。
$ nomad run redis-cache.nomad
==> Monitoring evaluation "b58210a7"
    Evaluation triggered by job "redis-cache"
    Scheduling error for group "cache" (failed to find a node for placement)
    Allocation "eb78c6f3" status "failed" (0/1 nodes filtered)
      * Resources exhausted on 1 nodes
      * Dimension "cpu exhausted" exhausted on 1 nodes
    Evaluation status changed: "pending" -> "complete"
==> Evaluation "b58210a7" finished with status "complete"

$ nomad status redis-cache
ID          = redis-cache
Name        = redis-cache
Type        = service
Priority    = 50
Datacenters = dc1
Status      = pending
Periodic    = false

==> Evaluations
ID        Priority  Triggered By  Status
05263d94  50        job-register  blocked
b58210a7  50        job-register  complete

==> Allocations
ID        Eval ID   Node ID  Task Group  Desired  Status
eb78c6f3  b58210a7  <none>   cache       failed   failed

Nomad  blocked  CPU blocked 
$ nomad status redis-cache
ID          = redis-cache
Name        = redis-cache
Type        = service
Priority    = 50
Datacenters = dc1
Status      = pending
Periodic    = false

==> Evaluations
ID        Priority  Triggered By  Status
05263d94  50        job-register  complete
b58210a7  50        job-register  complete

==> Allocations
ID        Eval ID   Node ID  Task Group  Desired  Status
eb79c6fg  05263d94  d551531b cache       running  running
eb78c6f3  b58210a7  <none>   cache       failed   failed



Nomad 使稿

 


Nomad 0.3  0.2.3 

 


 Nomad 


persistent volumes

IP

remote sinks


 GitHub 

- 

 Nomad 0.3 

*  cron / crontab 使
* ssh 
* SSH
*  SSH 
* Nomad  Window 

*