Goal - Create a capacity meter for our DC/OS cluster.
Our focus was to map out the potential for failure within our DC/OS cluster based on hardware constraints: CPU / Memory / Disk space. Every hour the meter will sample the usage and display the currently most used. During the live demo seen below CPU is the most utilized at just under 70%. We use colorful LEDs to signify which hardware type is currently displayed. As we hit 95% we also trigger a flashing red LED to alert that we are nearly at capacity.
Left to Right - Matt Boveri, David Crowder, Sam Livingston, Ian Kottman, Anthony (Big Boss) Ross
- 0 - 70% = Green
- 71 - 85% = Yellow
- 86% - 100% = Red
- At 95%+ Red LED is illuminated
Configure secrets in local.env
. See local.env.example
for an example of what keys are required.
docker-compose up --build clustermeter
docker push {your_own_path}/clustermeter:1.0
Using the below chart for the Raspberry Pi we mapped the servo and led to available GPIO pins and grounds. As we were not using a breadboard for this proof of concept each GPIO connection also had a ground connection. The GPIO connections are as follows:
- Servo - GPIO2 / Raspberry Pi slot 3
- Blue LED - GPIO3 / Raspberry Pi slot 5
- Green LED - GPIO4 / Raspberry Pi slot 7
- Yellow LED - GPIO17 / Raspberry Pi slot 11
- Red LED - GPIO27 / Raspberry Pi slot 13
Using the Plastic Gear Analog servo from Micro Center we were able to calculate the proper PWM frequency and servo range of 50 and 180 respectively.