freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freeipmi-devel] Ruby implementation?


From: Albert Chu
Subject: Re: [Freeipmi-devel] Ruby implementation?
Date: Thu, 19 Jul 2012 14:21:21 -0700

Hi Corey,

On Thu, 2012-07-19 at 11:26 -0700, Corey Osman wrote:
> Hi,
> 
> 
> I have an ipmi related project I need to get started and I thought I
> would ask the list before doing any work.  First I'll give you some
> background.
> 
> 
> A project that I contribute to manages the entire lifecycle of
> datacenter infrastructure.  Which covers anything from server bare
> metal provisioning (via PXE) to automated configuration management
> (puppet).  The product is called theforeman
> (http://www.theforeman.org). 
> Additionally, I built a mobile app to control  foreman which is called
> RemoteAdmin ( http://www.remoteadmin.co ).  Both of these projects are
> open source GPL.  The next step in both of these projects is to
> control power and boot order selection from the app.  So when a user
> selects an OS to install.  The server automatically gets power cycled
> and booted to the NIC via IPMI.  This is where freeIPMI comes in.  
> 
> 
> The entire foreman project is a Ruby on Rails app.  So while a C
> implementation library of freeIPMI is awesome, its difficult to access
> via Ruby.  So I have come up with a few work arounds which are
> probably common given this situation.
> 
> 
> 1.  Use the freeipmi command line tools and write a ruby wrapper to
> call the cli commands using exec
> 2.  Use a tool called swig (http://www.swig.org/)  to generate a Ruby
> interface wrapper to the freeipmi project libraries

My initial thought is to do #1.  Currently in FreeIPMI, I have two
libraries that are "high level" and abstract away a lot of the details
of doing IPMI from the user.  They are libipmimonitoring (for sensor/SEL
monitoring) and libipmiconsole (for console access via Serial over LAN).
The libfreeipmi library is very "hardcore" and you really need to know
the IPMI protocol well to figure it out.  I believe other libraries out
there are similarly "hardcore".

It's not to say that #2 can't be done, but it'll be more work.  I'd be
glad to help on code for it if you need help.  Following the code in
ipmi-chassis's code is probably the best way to learn how to use the
API.

BTW, the fellow from the NUT project (http://www.networkupstools.org/)
is also working on power control w/ FreeIPMI.  Perhaps, a "high level" C
library could be done to try and abstract away internal IPMI details for
power control and added to FreeIPMI?  Or at the minimum perhaps you guys
can share code.  I'll let him respond to you offline about that topic.

> I have never used swig before but it looks very promising.  I wanted
> to ask what your thoughts are about implementing a ruby freeipmi
> library.  Any concerns, tricks, gotchas I need to look out for?  The
> ruby freeipmi library will be open source and available as a ruby gem
> when completed.   

I've personally never worked with Ruby, but I did use Swig to write perl
extensions before.  It seems a solid tool for those purposes, but I
suppose every project's mileage will vary.

> How are you guys testing freeipmi with all the vendors'
> implementations?

I personally test FreeIPMI against the motherboards I have access to for
my company.  However, many are not tested.  I rely on the community for
bug reports and vendors to test on their end for many motherboards.

Al

> 
> I would also enjoy any code contributions.
> 
> 
> 
> 
> The github project can be found here:
>  https://github.com/logicminds/ruby-freeipmi
> 
> 
> 
> 
> Corey Osman
> address@hidden
> 
> 
> Green IT and Datacenter Automation Specialist
> 
> 
> 
> 
> 
> 
-- 
Albert Chu
address@hidden
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory





reply via email to

[Prev in Thread] Current Thread [Next in Thread]