Giter VIP home page Giter VIP logo

synse-ipmi-plugin's Introduction

Build Status FOSSA Status

Synse IPMI Plugin

A general-purpose IPMI plugin for Synse Server.

Getting Started

Getting

You can get the IPMI plugin as a pre-built binary from a release, or as a Docker image.

docker pull vaporio/ipmi-plugin

If you wish to use a development build, fork/clone the repo and build the plugin from source.

Running

The IPMI plugin requires the IPMI-enabled servers it will communicate with to be configured. As such, running the plugin without additional configuration will cause it to fail. As an example of how to configure and get started with running the IPMI plugin, a simple example deployment exists within the example directory. It runs Synse Server, the IPMI plugin, and a basic IPMI simulator.

To run it,

cd example
docker-compose up -d

You can then use Synse's HTTP API or the Synse CLI to query Synse for plugin data. Additionally, if you have ipmitool, you can use that to interface with the IPMI Simulator used in the deployment.

$ ipmitool -H 127.0.0.1 -p 623 -U ADMIN -P ADMIN -I lanplus chassis status
System Power         : on
Power Overload       : false
Power Interlock      : inactive
Main Power Fault     : false
Power Control Fault  : false
Power Restore Policy : always-off
Last Power Event     :
Chassis Intrusion    : inactive
Front-Panel Lockout  : inactive
Drive Fault          : false
Cooling/Fan Fault    : false

Plugin Configuration

Plugin and device configuration are described in detail in the SDK Documentation.

When deploying, you will need to provide your own plugin configuration (config.yaml) with dynamic configuration defined. This is how the IPMI plugin knows about which BMCs to communicate with. It will query the configured BMC(s) at runtime to determine their capabilities and any devices they may have.

As an example:

dynamicRegistration:
  config:
  - hostname: 10.1.2.3
    port: 623
    username: ADMIN
    password: ADMIN
    interface: lanplus
  - hostname: 10.1.2.4
    port: 623
    username: ADMIN
    password: ADMIN
    interface: lanplus

Dynamic Registration Options

Below are the fields that are expected in each of the dynamic registration items. If no default is specified (-), the field is required.

Field Description Default
path The path to the ipmitool binary. Since this is run as a container, this generally never needs to be set in configuration, as ipmitool is on the container PATH. ipmitool
hostname The address/hostname of the BMC to connect to. -
port The port of the BMC to connect to. This is usually 623. -
username The user on the BMC to run commands as. -
password The password for user authentication on the BMC, if set. -
interface The transport interface. Must be one of: lan, lanplus -

Reading Outputs

Outputs are referenced by name. A single device may have more than one instance of an output type. A value of - in the table below indicates that there is no value set for that field. The built-in section describes outputs this plugin uses which are built-in to the SDK.

Built-in

Name Description Unit Type Precision
state Power or LED state. (on/off) - state -
status Status of the boot target selection. - status -

Device Handlers

Device Handlers are referenced by name.

Name Description Outputs Read Write Bulk Read Listen
boot_target A handler for chassis boot target. status
chassis.led A handler for chassis identify, commonly an LED. state
chassis.power A handler for chassis power. state

Write Values

This plugin supports the following values when writing to a device via a handler.

Handler Write Action Write Data Description
boot_target target none, pxe, disk, safe, diag, cdrom, bios, rfloppy, rprimary, rcdrom, rdisk, floppy The boot target selection for the chassis.
chassis.led state on, off The power state to put the identify LED into.
chassis.power state on, off, reset, cycle The power state to put the chassis into.

Tested BMCs

This plugin has been tested against the vaporio/ipmi-simulator image. It has also been tested against the following hardware:

  • HPE Cloudline CL2200 G3 Server

If you have tested this on other hardware and found it to work, let us know! Open a PR and add to the list.

Compatibility

Below is a table describing the compatibility of plugin versions with Synse platform versions.

Synse v2 Synse v3
plugin v1.x
plugin v2.x

Troubleshooting

Debugging

The plugin can be run in debug mode for additional logging. This is done by:

  • Setting the debug option to true in the plugin configuration YAML

    debug: true
  • Passing the --debug flag when running the binary/image

    docker run vaporio/ipmi-plugin --debug
    
  • Running the image with the PLUGIN_DEBUG environment variable set to true

    docker run -e PLUGIN_DEBUG=true vaporio/ipmi-plugin
    

Developing

A development/debug Dockerfile is provided in the project repository to enable building image which may be useful when developing or debugging a plugin. The development image uses an ubuntu base, bringing with it all the standard command line tools one would expect. To build a development image:

make docker-dev

The built image will be tagged using the format dev-{COMMIT}, where COMMIT is the short commit for the repository at the time. This image is not published as part of the CI pipeline, but those with access to the Docker Hub repo may publish manually.

Contributing / Reporting

If you experience a bug, would like to ask a question, or request a feature, open a new issue and provide as much context as possible. All contributions, questions, and feedback are welcomed and appreciated.

License

The Synse IPMI Plugin is licensed under GPLv3. See LICENSE for more info.

FOSSA Status

synse-ipmi-plugin's People

Contributors

edaniszewski avatar fossabot avatar matthewhink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

fossabot wahello

synse-ipmi-plugin's Issues

re-enable image push in CI

this is more of a reminder so I don't forget later on. pushing images was disable while this is still in early development. once it stabilizes, it will need to be re-enabled in the CI workflow.

update readme/docs

  • include a list of hardware this has been tested against
  • include summary of known gotchas
  • include disclaimer that this is really an 'alpha' build. it works, but there are some sticky points that require sdk updates.
  • include docs on how to use/configure w/ synse server
  • include section on testing this out with the ipmi simulator (deploy.yml)

Deprecation notice: vaporio/golang:1.11 is being removed

We have added support for 1.12 and 1.13 Golang images. Upstream Docker project has already removed support for building 1.11 images and we will be doing so as well. This repo makes use of 1.11 in either it's .jenkins or Dockerfile and should be updated and tested with either 1.12 or 1.13 of Golang.

add project tests

this project is missing unit tests and integration tests. at a bare minimum, we should have unit tests.

this is probably low priority for now given that the plugin is not actively used internally.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.