bbc/gadabout

Name: gadabout

Owner: BBC

Description: A Swiss army knife gem for the Hashicorp Nomad job scheduler.

Forked from: joshpmcghee/gadabout

Created: 2016-11-10 17:31:18.0

Updated: 2017-01-12 08:49:07.0

Pushed: 2017-08-04 12:16:01.0

Homepage:

Size: 42

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Gadabout Build Status

A Swiss army knife gem for the Hashicorp Nomad job scheduler.

m install gadabout
Gadabout::Client

A simple API client for Nomad.

ire 'gadabout'

nt = Gadabout::Client.new

nt.agent_info

nt.jobs

nt.drain("<ID>", true)
Gadabout::DSL

A DSL for defining Nomad Jobs that compiles to JSON.

ire 'gadabout'

do
me "example"
gion "global"
pe "batch"
ta "environment", "production"
iority 50
tacenters "dc1", "dc2"

sk_group do
name "cache"
count 1

task do
  name "redis"
  driver "docker"
  user "redis"

  config "image", "redis:latest"
  config "port_map", [
    {
      "db": 6379
    }
  ]

  env "FOO", "bar"

  resources do
    cpu 500
    disk 1024
    memory 4096

    network do |n|
      reserved_port "redis", 6379
      mbits 10
    end
  end
end
d

Contributing

Contributions are very welcome, especially from those of you that enjoy writing test coverage.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.