Skip to content
thiell edited this page Apr 12, 2012 · 22 revisions

Welcome to the ClusterShell Uncyclo

ClusterShell is an event-based Python library to execute commands on local or distant cluster nodes in parallel depending on the selected engine and worker mechanisms. The library provides advanced node sets and node groups handling methods. Its goal is to improve the administration of cluster by providing a lightweight but scalable API for developers. Also, clush, clubak and nodeset, three convenient command-line tools using the library are included.

Why you need ClusterShell

Write cluster-aware scripts in Python

ClusterShell allows for running commands in parallel on very large Linux clusters using present remote shell facilities on your cluster like SSH. Beyond traditional shell scripts, it is designed to easily write administrative scripts or applications for clusters in Python. A very simple example of ClusterShell script speaks louder than words (also see NodeSet, Task):

from ClusterShell.Task import task_self, NodeSet

task = task_self()
task.run("/bin/uname -r", nodes="callisto[36-39,133]")

for output, nodes in task.iter_buffers():
    print NodeSet.fromlist(nodes), output

Use the best parallel shell tool

ClusterShell comes with a full-featured command line (clush) for sending cluster commands and gathering output data. Some very simple examples follow:

$ clush -b -w callisto[32-157] uname -r
---------------
callisto[32-157]
---------------
2.6.18-164.11.1.el5
$ clush -b -r -w callisto[32-157] uname -r
---------------
@chassis[1-7]
---------------
2.6.18-164.11.1.el5

Improve your admin life with node groups

The library defines a node groups syntax (through the NodeSet class) and allows you to bind several group sources to your ClusterShell-ready applications. The nodeset command allows you to easily compute node-set operations from the shell:

$ nodeset -f donut[1-9] -x donut[2,5]
donut[1,3-4,6-9]

$ nodeset -e pizza[2-22/2]
pizza2 pizza4 pizza6 pizza8 pizza10 pizza12 pizza14 pizza16 pizza18 pizza20 pizza22

$ for node in $(nodeset -e pizza[2-640]); do something_with $node; done

...and NodeGroups too:

$ nodeset -f @oss @mds
callisto[4-24]

$ nodeset -r @oss @mds
@lustre

Releases

  • Stable version: 1.6
  • Development version: 2.0
  • Supported plateforms are RHEL5, RHEL6, Fedora 11-16, Debian, Ubuntu and Arch Linux.
  • If you're stuck with Python 2.3 (RHEL4), you can still use version 1.1.

Download

Documentation

Presentation and example pages

Contact/Contribute

Clone this wiki locally