Close

MQTT and moving to sort of microservices

A project log for Caddyshack

A SBC Blade Chassis

benBen 02/19/2018 at 07:360 Comments

I've decided to go ahead and redesign the backplane boards to use atmega328p on each board so that I can relocate the power control circuitry into the backplane. This allows me to utilise i2c on the backplane units and a single bus for control.

While the PCB manufacturer I've been using is away celebrating, I have taken the time to redesign the boards, and prototype with breadboard versions.

The re-work involes the removal of the initial greenskeeper controller board that I designed which made use of the MCP23017 IC, and replacing it with a single arduino with an ethernet adaptor connected to the i2c bus that the backplanes are all connected to.

Using i2c means it can be expanded to around 118 individual slots, obviously this is a lot of raspberry pis, and if you wanted to utilise USB->Serial for each slot, you would need 118 usb ports!

Re-writing the software side to be more microservices based, where:

Redis is used for the communications with the dashboard using SSE.

MQTT is used for all other service communications.

When inserting a caddy, the console management service will detect if a USB->Serial device is in the caddy and update greenskeeper. The backplane will detect the type of caddy inserted based on jumpers that are set on the control interface, and will update greenskeeper with the status of the caddy.

I think this is better than the older method, and it also means that anything that is in docker can be run anywhere as long as they can communicate via MQTT.

Console management server has nginx using proxy_pass which (once implemented) would allow per user access to certain consoles.

In my demo caddyshack, I am currently running a 3 node 1 master kubernetes cluster, which is where I am running my tests of the new software and communication stack.

I'm hoping to get new boards made up and move everything into it in the next few weeks.

Discussions