Code Monkey home page Code Monkey logo

synse-amt-plugin's Introduction

Build Status FOSSA Status

Synse AMT Plugin

A plugin for Synse Server used to communicate with Intel AMT enabled machines.

Getting Started

Getting

You can install the AMT plugin via a release binary or via Docker image

docker pull vaporio/amt-plugin

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

Running

The AMT plugin requires device configurations for the AMT-enabled servers that it will communicate with in order for it to run. As such, running the plugin without additional configuration will cause it to fail.

A simple example of what device configurations may look like can be found in the config/device directory. Once you have your plugin configurations defined, you can update the compose file to mount them into the plugin container and run it with:

docker-compose up -d

Plugin Configuration

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

There is an additional config scheme specific to this plugin for the contents of a configured device's data field. Device data may be specified in two places (the prototype config and the instance config sections). The data scheme describes the resulting unified config from both sources.

An example:

devices:
- type: boot_target
  instances:
  - info: Server Boot Target
    data:
      ip: "127.0.0.1"
      password: "guest"
Field Required Type Description
ip yes string The hostname/ip of the AMT-enabled server to connect to.
password yes string The AMT password for the server.

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 The power state of an AMT device. - state -

Device Handlers

Device Handlers are referenced by name.

Name Description Outputs Read Write Bulk Read Listen
boot_target A handler for setting server boot target. -
power A handler for managing server power state. 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 pxe, hd, cd The boot target to set.
power state on, off, cycle The minimum bound for readings to be generated within.

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 (config.yml)

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

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

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

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 AMT Plugin is licensed under GPLv3. See LICENSE for more info.

FOSSA Status

synse-amt-plugin's People

Contributors

berrescuda avatar edaniszewski avatar fossabot avatar kylerburke avatar matthewhink avatar timfallmk avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

fossabot

synse-amt-plugin's Issues

Newline character in power reads

$ curl http://localhost:5000/synse/2.0/read/rack-1/vec/3693477ab8f35fbb813288d3f2c1edaf
{
  "type":"power",
  "data":{
    "state":{
      "value":"on\n",
      "timestamp":"2018-05-09T21:10:32.689826902Z",
      "unit":null
    }
  }
}

Value has a trailing newline character. It's present in "off" value as well.

CI release failure

https://circleci.com/gh/vapor-ware/synse-amt-plugin/34
CI fails to release if there are no previous tags. It fails around:

--since-tag $(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)

when generating the changelog

fatal: No tags can describe '1440ff41b8c09312dbc6be960257d357bb4b68d3'.
Try --always, or create some tags.
/usr/local/bundle/gems/github_changelog_generator-1.14.3/lib/github_changelog_generator/parser.rb:16:in `parse_options': missing argument: --since-tag (OptionParser::MissingArgument)
	from /usr/local/bundle/gems/github_changelog_generator-1.14.3/lib/github_changelog_generator.rb:27:in `initialize'
	from /usr/local/bundle/gems/github_changelog_generator-1.14.3/bin/github_changelog_generator:5:in `new'
	from /usr/local/bundle/gems/github_changelog_generator-1.14.3/bin/github_changelog_generator:5:in `<top (required)>'
	from /usr/local/bundle/bin/github_changelog_generator:23:in `load'
	from /usr/local/bundle/bin/github_changelog_generator:23:in `<main>'
Exited with code 1

Didn't see this in the other repos because they already had tags!

add tests to project

the project does not currently have any unit tests or integration tests. I think at a bare minimum we should have unit tests.

This is probably low priority given this plugin is not really used internally at the time, but it is still something we should have.

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.

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.