Discussion:
Extending SLURM with Ruby
Trey Dockendorf
2014-09-10 19:43:34 UTC
Permalink
Has anyone come across, or written, a Ruby library to interface with SLURM? I'm aware of the Perl library provided by the SLURM source code, and have worked a little with the PHP library, but am hoping to find at least some functional code to interface Ruby with SLURM.

My hope to is to interact with slurmdb and have a way to list and create user and account records from Ruby. The end goal is to have a way to "sync" or at least see if the slurmdb records are up-to-date with what is stored in our LDAP. I've gone the route of parsing the output from sacctmgr, but it's tedious and would be nice to interact with the values in an object oriented way.

If no one has written or come across existing Ruby code, I'm willing to take on the task but my C experience is very minimal. The API docs [1] do not seem to include anything for accessing the accounting database.

Thanks,
- Trey

[1] http://slurm.schedmd.com/api.html

=============================

Trey Dockendorf
Systems Analyst I
Texas A&M University
Academy for Advanced Telecommunications and Learning Technologies
Phone: (979)458-2396
Email: treydock-mRW4Vj+***@public.gmane.org
Jabber: treydock-mRW4Vj+***@public.gmane.org
E V
2014-09-11 13:10:33 UTC
Permalink
Well there's drmaa4ruby which allows job submission and such. It uses
FFI to wrap the drmaa c library. No support for any slurmdbd
interaction though as far as I know. Using FFI it's quite easy to wrap
a C library up for Ruby if you can find one. If you want to be
ambitious a cool project would be setting up a Rails project for
slurmdbd, then you could use ActiveRecord and have everything in pure
Ruby, plus get a web interface thrown in for free ;-)
Post by Trey Dockendorf
Has anyone come across, or written, a Ruby library to interface with SLURM? I'm aware of the Perl library provided by the SLURM source code, and have worked a little with the PHP library, but am hoping to find at least some functional code to interface Ruby with SLURM.
My hope to is to interact with slurmdb and have a way to list and create user and account records from Ruby. The end goal is to have a way to "sync" or at least see if the slurmdb records are up-to-date with what is stored in our LDAP. I've gone the route of parsing the output from sacctmgr, but it's tedious and would be nice to interact with the values in an object oriented way.
If no one has written or come across existing Ruby code, I'm willing to take on the task but my C experience is very minimal. The API docs [1] do not seem to include anything for accessing the accounting database.
Thanks,
- Trey
[1] http://slurm.schedmd.com/api.html
=============================
Trey Dockendorf
Systems Analyst I
Texas A&M University
Academy for Advanced Telecommunications and Learning Technologies
Phone: (979)458-2396
Loading...