Skip to content

Latest commit

 

History

History
126 lines (79 loc) · 5.79 KB

README.md

File metadata and controls

126 lines (79 loc) · 5.79 KB

pypmi

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.

Usage

Import modules or modify the main method in existing BMCs:

'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       |
+-------------------------+---------+---------------+-------------+--------------------+-------------+

Example BMCs:

  • (Implemented/Validated) PyPmb (Platform Management Bridge)
  • (Implemented/Validated) Esp8266 running Universal I/O bridge
  • (Skeletal/Not-Validated) Raspberry Pi using GPIO

Example Bill of Materials (BoM) (< $10/node)

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.

IOT HW

miscellaneous cables and connectors

Software Architecture

Pmb example diagrams

pyghmi integration general diagram

Example Platform Management Bridge (PMB) class diagram

Esp8266Bmc example diagrams

pyghmi integration general diagram

Example Baseboard Management Controllers (BMC) class diagram