All Projects → ValFadeev → rundeck-nomad-plugin

ValFadeev / rundeck-nomad-plugin

Licence: MIT license
Rundeck plugin running jobs on Nomad cluster.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to rundeck-nomad-plugin

libra
A Nomad auto scaler
Stars: ✭ 72 (+323.53%)
Mutual labels:  hashicorp, nomad, hashicorp-nomad
nomad-droplets-autoscaler
DigitalOcean Droplets target plugin for HashiCorp Nomad Autoscaler
Stars: ✭ 42 (+147.06%)
Mutual labels:  hashicorp, nomad, hashicorp-nomad
Ansible Nomad
⌚️ Ansible role for Nomad
Stars: ✭ 157 (+823.53%)
Mutual labels:  scheduler, hashicorp, nomad
nomad-driver-containerd
Nomad task driver for launching containers using containerd.
Stars: ✭ 152 (+794.12%)
Mutual labels:  nomad, hashicorp-nomad
josk
🏃🤖 Scheduler and manager for jobs and tasks in node.js on multi-server and clusters setup
Stars: ✭ 27 (+58.82%)
Mutual labels:  cluster, scheduler
Cook
Fair job scheduler on Kubernetes and Mesos for batch workloads and Spark
Stars: ✭ 314 (+1747.06%)
Mutual labels:  cluster, scheduler
Sherpa
Sherpa is a highly available, fast, and flexible horizontal job scaling for HashiCorp Nomad. It is capable of running in a number of different modes to suit different requirements, and can scale based on Nomad resource metrics or external sources.
Stars: ✭ 165 (+870.59%)
Mutual labels:  hashicorp, nomad
hashicorp-labs
Deploy locally on VM an Hashicorp cluster formed by Vault, Consul and Nomad. Ready for deploying and testing your apps.
Stars: ✭ 32 (+88.24%)
Mutual labels:  hashicorp, nomad
caravan
Caravan is your platform builder based on the HashiCorp stack.
Stars: ✭ 33 (+94.12%)
Mutual labels:  hashicorp, hashicorp-nomad
nomad-box
Nomad Box - Simple Terraform-powered setup to Azure of clustered Consul, Nomad and Traefik Load Balancer that runs Docker/GoLang/Java workloads. NOTE: Only suitable in dev environments at the moment until I learn more Terraform, Consul, Nomad, Vault :P
Stars: ✭ 18 (+5.88%)
Mutual labels:  hashicorp, nomad
local-hashicorp-stack
Local Hashicorp Stack for DevOps Development without Hypervisor or Cloud
Stars: ✭ 23 (+35.29%)
Mutual labels:  hashicorp, nomad
damon
A terminal UI (TUI) for HashiCorp Nomad
Stars: ✭ 274 (+1511.76%)
Mutual labels:  hashicorp, nomad
Rundeck
Enable Self-Service Operations: Give specific users access to your existing tools, services, and scripts
Stars: ✭ 4,426 (+25935.29%)
Mutual labels:  scheduler, rundeck
Sparklens
Qubole Sparklens tool for performance tuning Apache Spark
Stars: ✭ 345 (+1929.41%)
Mutual labels:  cluster, scheduler
Replicator
Automated Cluster and Job Scaling For HashiCorp Nomad
Stars: ✭ 166 (+876.47%)
Mutual labels:  hashicorp, nomad
hashidays-london
Code used for the demo of Going Multi-Cloud with Terraform and Nomad
Stars: ✭ 20 (+17.65%)
Mutual labels:  hashicorp, nomad
Nomad Helper
Useful tools for working with @hashicorp Nomad at scale
Stars: ✭ 96 (+464.71%)
Mutual labels:  hashicorp, nomad
Hashi Up
bootstrap HashiCorp Consul, Nomad, or Vault over SSH < 1 minute
Stars: ✭ 113 (+564.71%)
Mutual labels:  hashicorp, nomad
humpback-center
Humpback Center 主要为 Humpback 平台提供集群容器调度服务,以集群中心角色实现各个 Group 的容器分配管理。
Stars: ✭ 37 (+117.65%)
Mutual labels:  cluster, scheduler
nomad
Dockerized Nomad
Stars: ✭ 33 (+94.12%)
Mutual labels:  hashicorp, nomad

Rundeck Nomad Plugin

This is early work. Use with extreme caution!

Purpose

This is a Workflow Step plugin for submitting jobs to a Nomad cluster via Rundeck UI. The plugin interacts with a Nomad server via HTTP API.

Rundeck is a popular and well established automation tool. It features, besides other things, a rich customizable UI, role-based access control, scheduling, logging, alerts, cli and API support and an already extensive plugin ecosystem. It fits well into the CI/CD pipelines (for instance, there is a Jenkins Rundeck integration plugin). Rundeck does not lend itself easily to running in HA mode or scaling worker nodes. Therefore, it seems a good idea put a distributed scheduler such as Nomad behind it to offload resource-intensive jobs.

Alt Screenshot

Installation

  • Download and start Rundeck. It will automatically create the necessary directories.
  • Clone this repository. Test and build using gradle wrapper:
      ./gradlew test
      ./gradlew build
    
  • Drop rundeck-nomad-plugin-<version>.jar to libext/ under Rundeck installation directory.
  • Restart Rundeck.

Usage

Download Nomad and start an agent in server mode. For evaluation you may use development mode for zero-configuration start.

In Rundeck UI create a new project and a new job in that project. Under "Add a Step" section swich to "Workflow Steps" tab. If the plugin was recognized successfully, you should see "Run Docker container on Nomad" in the list of the available workflow step plugins. Click on the plugin entry to bring up the input form, fill in Nomad agent URL, docker image name and any other available fields. Save and run the job.

What is in scope

Currently the scope is limited to batch and service jobs of simple structure (1 job, 1 task group, 1 task). The reason is such jobs fit well into the Rundeck operating model and map onto the available UI configuration in a straightforward way. It is possible to set the task count within the task group thereby increasing parallelism where that matters.

Nomad supports a range of Drivers to execute tasks. At the moment only Docker driver task configuration is supported by the plugin. However, best effort has been made to isolate driver-specific code and make the extension process simple.

Job lifecycle

Monitoring of the running jobs is performed in several stages the outcome of which is reported in the log output. Please consult Nomad documentation for the relevant terminology. First it is checked if the job has been successfully submitted to the scheduler. Then it is verified if the job passed the evaluation (evaluation ID is reported). Depending on the desired task count the corresponding number of allocations will be placed by Nomad. Some or all of the allocations may fail for various reasons (resource limitations, driver error, etc), however, the job as a whole can only have pending, running or dead status which may not be representative of the success/failure of the outcome. Hence, in order to allow for some flexibility, we poll for the status of the individual allocations and raise an error if more than a configurable percentage of them end up in a failed status.

Note that logs from individual tasks are not streamed here. Given the arbitrary number of task instances that can be deployed it could be challenging to read all of their streams into Rundeck output. Some support for that may be added in future.

Nomad supports scheduling of periodic jobs and defining restart policies, and also Nomad SDK implements time-outs and back-off strategy for all API calls. However, all of the above settings also belong to core functionality of Rundeck. Therefore, in order to avoid confusion, it was decided to delegate them to Rundeck job-level configuration. That is why API calls are configured to wait indefinitely and periodic stanza from Nomad job specification is not supported. It may be implemented in future, if this plugin is enhanced to be able to deploy long running services.

Alt Screenshot

Minimal version requirements

  • Java 1.8
  • Rundeck 2.9.x
  • Nomad 0.6.0

Similar projects

Thanks

TODO

  • Better test coverage
  • Driver support
  • More detailed logging
  • TLS support
  • Contraints configuration
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].