Project

lex-nomad

0.0
No release in over 3 years
Connects LegionIO to HashiCorp Nomad
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

 Project Readme

lex-nomad

HashiCorp Nomad integration for LegionIO. Provides runners for interacting with the Nomad HTTP API covering jobs, nodes, allocations, deployments, evaluations, namespaces, services, variables, status, and search.

Installation

gem install lex-nomad

Functions

Jobs

list_jobs, get_job, create_job, update_job, delete_job, plan_job, dispatch_job, revert_job, job_versions, job_summary, job_allocations, job_evaluations, job_deployments, job_latest_deployment, evaluate_job, force_periodic_job, scale_job, job_scale_status, job_services, parse_job

Nodes

list_nodes, get_node, node_allocations, evaluate_node, drain_node, purge_node, set_node_eligibility

Allocations

list_allocations, get_allocation, stop_allocation, signal_allocation, restart_allocation, allocation_services, allocation_checks

Deployments

list_deployments, get_deployment, deployment_allocations, fail_deployment, pause_deployment, promote_deployment, set_allocation_health, unblock_deployment

Evaluations

list_evaluations, get_evaluation, evaluation_allocations, evaluations_count, delete_evaluations

Namespaces

list_namespaces, get_namespace, create_or_update_namespace, delete_namespace

Services

list_services, get_service, delete_service

Variables

list_variables, get_variable, create_or_update_variable, delete_variable

Status

leader, peers

Search

prefix_search, fuzzy_search

Standalone Usage

require 'legion/extensions/nomad'

client = Legion::Extensions::Nomad::Client.new(
  address: 'http://nomad.example.com:4646',
  token: 'your-acl-token',
  namespace: 'default'
)

client.list_jobs
client.get_job(job_id: 'my-service')
client.leader

Requirements

  • Ruby >= 3.4
  • LegionIO framework (optional for standalone client usage)
  • HashiCorp Nomad cluster (API v1)
  • faraday >= 2.0

License

MIT