Python Baseboard Management Controller (BMC) for Intelligent Platform Management Interface (IPMI)
pypmi primarly extends pyghmi to provide a configurable and extensible low cost BMC solution to monitor and control chassis power and enable Serial-over-Lan (SoL) using IPMI 2.0 and commodity internet-of-things (IOT) and off-the-shelf hardware.
The PyPmb (Platform Management Bridge) allows for bridging up to 255 targets from a single IPMI address.
'pypmb.py' ...
mypmb = PyPmb({"admin":"changeme"}, name="pmb", port=args.port, loop=asyncio.get_event_loop())
mypmb.add_target(1, Esp8266Bmc(mypmb.authdata, {}, {}, {'host':'192.168.1.11'}, {'host':'192.168.1.11'}, {'baud_rate':'38400'}, name="cloud1", port=None, mypmb.loop))
...
Run using python
pip install -r requirements.txt
python ./pypmb.py --port 623
Run using docker
docker build . -t pypmi
docker run --name=pypmi --rm -p 623:623/udp pypmi
# For Wake-on-Lan (WoL) support, run with host networking
docker run --name=pypmi --rm --net=host -p 623:623/udp pypmi
Use your favorite IPMI tool
- Power Status
ipmitool -I lanplus -U admin -P changeme -H 127.0.0.1 -t 1 power status
Chassis Power is off
- Power On/Off
ipmitool -I lanplus -U admin -P changeme -H 127.0.0.1 -t 1 power on
Chassis Power Control: Up/On
- SoL activation/deactivation
ipmitool -I lanplus -U admin -P changeme -H 127.0.0.1 -t 1 sol activate
[SOL Session operational. Use ~? for help]
root@cloud1:~#
- Power Status
openstack baremetal node list
+-------------------------+---------+---------------+-------------+--------------------+-------------+
| UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+-------------------------+---------+---------------+-------------+--------------------+-------------+
| 00000000...000000000001 | cloud1 | None | power off | active | False |
+-------------------------+---------+---------------+-------------+--------------------+-------------+
- Power On/Off
openstack baremetal node power on cloud1
openstack baremetal node list
+-------------------------+---------+---------------+-------------+--------------------+-------------+
| UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+-------------------------+---------+---------------+-------------+--------------------+-------------+
| 00000000...000000000001 | cloud1 | None | power on | active | False |
+-------------------------+---------+---------------+-------------+--------------------+-------------+
- (Implemented/Validated) PyPmb (Platform Management Bridge)
- (Implemented/Validated) Esp8266 running Universal I/O bridge
- (Skeletal/Not-Validated) Raspberry Pi using GPIO
The Esp8266Bmc (power status requires pull down resistor on GPIO2) and Esp8266WakeOnLanBmc supports wireless power monitoring/control and SoL using an ESP-01S Relay running Universal I/O bridge.
- ESP8266 ESP-01S 5V Relay Module v4.0 (includes esp-01s)
- PL2303TA USB to TTL Serial Cable 5V-power/3.3V-logic
- MAX3232 RS232 to TTL Serial Port Converter (optional, ttyS0 DB9 SOL)
- 1.27mm .050" Pitch Rainbow Flat Ribbon Cable for 2.54mm Connectors
- 2.54mm 2X4 8 Pins Dual Rows IDC Socket
- 2.54mm 2x4 8 Pin Right Angle Male Shrouded IDC Box Header Connector