The subject says it all. I've written a RESTful API which wraps around
the standard Illumos/Solaris SMF commands.

For instance, once you have the daemon running on a host, you could
issue a command of the form:

  $ curl  -s "http://tap:9206/smf/global/svcs?state=online";

and get back a JSON object describing all the services in the ONLINE
state in tap's global zone. Or maybe run:

  $ curl -d "svc=ssh" -s "http://tap:9206/smf/tap-web/svcadm/restart";

to restart SSH in the tap-web zone.

You can view services and their properties; restart, stop, switch
state and change properties of services; import, export and archive
manifests; tail service log files and miscellaneous other stuff.
Security should be done primarily by assigning suitable RBAC roles to
the user the daemon runs as, but it's possible to assign different
operations to different users, restrict access to commands, and
whitelist or blacklist services or entire zones.

It's been written as much as an exercise as anything -- I no longer
work on a SunOS estate, so I haven't tested it in anger. It therefore
comes with absolutely no guarantees, and may not be of any use to
anyone anywhere ever!

It's written in Node.js, using the Restify framework, and it's been
tested on Solaris 11, Solaris 11u1, Solaris 10u10, OmniOS stable, and
whatever release of SmartOS is currently running in the Joyent cloud.
There's lots of documentation, a test suite, and (hopefully) simple,
readable code, and it's all at

   https://github.com/snltd/SexyMF.


Any feedback to me please, via email or github, rather than cluttering the list.



Rob


-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com

Reply via email to