mardi 29 décembre 2020

Network Hardware Resource Management Tool for CI/CD Automation (preferably in Python)

I'm looking for some kind of hardware "resource" management tool (preferably in Python, since that's what I'm most comfortable with, but other languages are welcome too!) that I can use to automate the process of "checking out" or allocating resources for automated testing as part of CI/CD workflows. To be clear, by "hardware resource" I mean something similar to a Raspberry Pi. It's not a Raspberry Pi that I'm testing, but that's probably a good place to start the example. And if I'm being honest, it's more like every model of the Raspberry Pi (all the 2/3/4 derivatives, etc.).

Imagine a test "network" with a central management node (system) that "hands out" access to various models of "Raspberry Pi" to various CI/CD workflows that are asking for them. Say my CI/CD system sees a new commit on some project branch, kicks off a new test build, and thus needs to test the build on a Pi 3B+ and a Pi 4B. So, it needs to ask for those devices to be "checked out" as needed. When those workflows are done, those two devices can be "checked back in" and go back to a dormant state, waiting for the next build to come along.

Again, to reiterate, I'm really looking for something that just hands out "access" to these devices. It doesn't need to build anything or perform testing itself.

Some key things that I'm hoping to achieve:

  • Notifications: I'd love to hear when a device seems to be acting weird (as they inevitably will) so that I can fix it ASAP
  • RESTful API access to request a "resource" for checkout, and conversely to return it upon completion of any/all tests
  • Timeouts: If a CI/CD workflow doesn't return a resource after a set period of time, that device is "recalled" (as best it can), and if the device seems "unresponsive" then a notification can be sent to an administrator
  • Ability to extend a "framework" would be nice. There's a fair bit of firmware involved, and the ability to upgrade/downgrade/etc. directly with this system would be phenomenal!

Things I'm NOT Looking for:

  • Full CI/CD build server: I'm already planning to use Jenkins to build things and run the tests, I just need something to hand Jenkins and my workflows the appropriate devices when needed.

I've done some research, and keep ending up empty handed in this regard, so I'd like to know if anyone's aware of such a framework that I could use. I've considered writing my own system with FastAPI (still might go that way if I can't find a better alternative) but I'd really like to get something else that already exists to help me get this out the door (so to speak).

Aucun commentaire:

Enregistrer un commentaire