[designated] osmocom lab power management daemon. Used for on-demand power on/off of servers and other hardware based on a usage counting scheme. Once last user disappears, resources are powered off until the first user needs it again. https://osmocom.org/issues/6023
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Harald Welte 919ac1b689
add initial README.md
4 days ago
doc initial checkin of a test lab power management daemon 1 month ago
osmocom/lpmgd add COPYING + GPL notice to all files that were missing it 5 days ago
COPYING add COPYING + GPL notice to all files that were missing it 5 days ago
README.md add initial README.md 4 days ago
osmo-lpmgd-apitool add COPYING + GPL notice to all files that were missing it 5 days ago
osmo-lpmgd.py add osmo-lpmgd-apitool for command-line usage of the REST API 5 days ago

README.md

osmo-lpmgd - Osmocom Lab Power Management Daemon

In our test/lab setups, we do have a number of systems that run 24/7 but which are really used only very few hours per day. This has become very visible after we started (a few months ago) to deploy tasmota/influxdb/grafana for plotting many different power rails.

Direct on/off switching from within a given test job only works if that test job is the only user of the given resource (such as e.g. a BTS in osmo-gsm-tester).

For jenkins builders, OBS workers and similar machines, there could be any number of concurrent users. So there's no single job that can power on the resourec before using it, and power it off after it terminates.

What we need is a system that maintains a usage count, similar to how we do usage/reference counting in data structures in software development.

osmo-lpmgd is a modular python daemon which offers a REST API over which users can obtain usage tokens for named resources. The daemon then keeps track of the current use count and switches resources on/off as needed.

Jenkins jobs would then (e.g. in a pipeline) first obtain a usage token (which would implicitly power up the resource if it is not aleady powwered), and release the usage token after they're gone. This way we can power up build machines only when needed, saving significant electrical power, reducing noise and minimizing heat dissipation.

Git Repository

You can clone from the official Osmocom git repository using

git clone https://gitea.osmocom.org/laforge/osmo-lpmgd.git

There is a web interface at https://gitea.osmocom.org/laforge/osmo-lpmgd.

Installation

TBD

Usage

TBD.

There's the actual daemon/server program osmo-lpmgd as well as a python library for an REST API client in the osmocom.lpmgd.client python module. A reference command line tool using that client is available in osmo-lpmgd-apitool