Giter Site home page Giter Site logo

jsiebens / blinkt-nomad-controller Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 172 KB

A Nomad Controller for the Pimoroni Blinkt on a Raspberry Pi

License: MIT License

Go 100.00%
hashicorp nomad hashicorp-nomad raspberrypi pimoroni-blinkt pimoroni blinkt

blinkt-nomad-controller's Introduction

A Nomad Controller for the Pimoroni Blinkt!

example

A simple way to physically/visually display the number of allocations running on Raspberry Pi-based HashiCorp Nomad worker nodes by using a Pimoroni Blinkt!. Alternatively, it can display the amount of allocated cpu, memory, disk or network of the worker node.

The Blinkt is a low-profile strip of eight super-bright, color LED indicators that plugs directly onto the Raspberry Pi's GPIO header. Several available software libraries make it easy to control the color and brightness of each LED independently.

How It Works

This little tool is designed to be deployed as a Nomad system job Once deployed, every running allocation that lands on a node will cause an LED indicator on that node's Blinkt to turn on. (only the first 8 Pods can be displayed). As new jobs and allocations get created or deleted the light display will adjust accordingly.

The controller will scrape the metrics of the node it is running an via the metrics HTTP api.

Acknowledgements

Based on the blinkt-k8s-controller of @apprenda, this project draws inspiration and borrows heavily from the work done by @alexellis on Docker on Raspberry Pis and his Blinkt Go libraries, themselves based on work by @gamaral for using the /sys/ fs interface instead of special libraries or elevated privileges to /dev/mem on the Raspberry Pi.

Requirements

A Raspberry Pi-based Nomad cluster, where the raw_exec driver is enabled on the worker nodes.

Physically install a Pimoroni Blinkt on all the Raspberry Pi worker nodes you want to use for display. No additional sofware or setup is required for the Blinkt.

Usage

Plan and run the Nomad job using the included job definition:

nomad plan nomad/blinkt-nomad-controller.nomad
nomad run nomad/blinkt-nomad-controller.nomad

If you want to monitor and display other resources, like allocated memory, adjust the command accordingly:

blinkt-nomad-controller_arm -resource=memory

blinkt-nomad-controller's People

Contributors

jsiebens avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.