Skip to content

A Nomad Controller for the Pimoroni Blinkt on a Raspberry Pi

License

Notifications You must be signed in to change notification settings

jsiebens/blinkt-nomad-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Sponsor this project

 

Packages

No packages published

Languages