Git Product home page Git Product logo

kubeleds's Introduction

kubeleds

Monitor your kubernetes clusters using NeoPixel LEDS!

Hardware

Raspberry PI (any model that supports GPIO)

Currently using a Raspberry PI 4b 2GB. Preparing a Raspberry PI Zero W

NeoPixel LED Strips, 12mm Diffussed bulbs

alt text

alt text

alt text

Usage

  1. cd into project directory.

  2. Create a virtual environment.

$ make venv
  1. Activate it.
$ source venv/bin/activate
  1. Install development dependencies with editable mode to test the CLI.
$ make install

Take kubeleds for a spin

This will basic command line functionality

$ kubeledscli init

This will retrieve node status and set the leds base off of status of each node, testing each status condition (ready, cpu, memory, disk)

$ kubeledscli get_cluster_nodes '[api fqdn]' \
    '[your token]' 'True' 'get_cluster_nodes' \
    'set_leds' 'get_cluster_nodes' 'Ready' \
    'set_leds' 'get_cluster_nodes' 'MemoryPressure' \
    'set_leds' 'get_cluster_nodes' 'DiskPressure' \
    'set_leds' 'get_cluster_nodes' 'PIDPressure' \
    'set_leds' 'get_cluster_nodes' 'Ready' \

The above commands will retrieve cluster node status and set an led frame per status condition, 1 led per node.

GREEN: Node Ready BLUE: CPU Good CYAN: Memory good Purple: Disk Good

Test with Docker

CLI commands can be tested with Docker.

  1. Build an image for the CLI.

    Image is tagged with the same name as the cli_command.

$ make docker-image
  1. Run the command inside the container.
$ docker-run --rm kubeledscli init

Documentation

  1. Install documentation-related dependencies.
$ make docs
  1. Serve the docs locally.
$ make serve-docs

Distribution

NOTE

Make sure you have account in PyPI before you try this out.

To publish you CLI to PyPI, run:

$ make distributions

dist directory will be created inside your project directory. Upload it to PyPI using:

$ twine dist/*

Help

For help related to make commands.

$ make help

kubeleds's People

Contributors

robermar23 avatar

Stargazers

Steve Tsiopanos avatar

Watchers

James Cloos 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.