Debian Codegraph @

README.md

raw symbols SCIP
1 ClusterShell Python Library and Tools
2 =====================================
3
4 [![HPSF Established](https://raw.githubusercontent.com/hpsfoundation/tac/main/badges/HPSF_Project_Badge_Established.png)](https://hpsf.io)
5
6 This project adheres to a [Technical Charter](https://clustershell.readthedocs.io/en/latest/CHARTER.html), which defines its governance model, decision-making process, and long-term vision.
7
8 ClusterShell is an event-driven open source Python library designed to run
9 local or distant commands in parallel on server farms or on large Linux
10 clusters. It is an [HPSF Established](https://hpsf.io) project under
11 [LF Europe](https://linuxfoundation.eu/) stewardship.
12
13 ClusterShell handles typical HPC cluster administration tasks: operating on
14 groups of nodes, executing distributed commands with optimized algorithms,
15 gathering and merging output, and collecting return codes. It leverages remote
16 shell facilities already present on your systems, such as SSH.
17
18 ClusterShell's primary goal is to improve the administration of high-
19 performance clusters by providing a lightweight but scalable Python API for
20 developers. It also provides clush, clubak and cluset/nodeset, convenient
21 command-line tools that allow traditional shell scripts to benefit from some
22 of the library features.
23
24 Requirements
25 ------------
26
27 * GNU/Linux, BSD, macOS
28 * OpenSSH (ssh/scp) or rsh
29 * Python 2.x (x >= 7) or Python 3.x (x >= 6)
30 * PyYAML
31
32 License
33 -------
34
35 ClusterShell is distributed under the GNU Lesser General Public License version
36 2.1 or later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details.
37
38 Documentation
39 -------------
40
41 Online documentation is available here:
42
43 https://clustershell.readthedocs.io/
44
45 The Sphinx documentation source is available under the doc/sphinx directory.
46 Type 'make' to see all available formats (you need the packages listed in
47 doc/sphinx/requirements.txt to build the documentation). For example, to
48 generate html docs, just type:
49
50 make html BUILDDIR=/dest/path
51
52 For local library API documentation, just type:
53
54 $ pydoc ClusterShell
55
56 The following man pages are also provided:
57
58 clush(1), clubak(1), cluset(1), nodeset(1), clush.conf(5), groups.conf(5)
59
60 Building
61 --------
62
63 To build the Python source distribution and wheel from a source checkout:
64
65 $ python -m build
66
67 The resulting tarball and wheel are written to the 'dist' directory.
68
69 RPM packaging is not maintained in this repository. RPM packages for Fedora,
70 RHEL and compatible distributions are maintained in the Fedora and EPEL
71 dist-git repositories:
72
73 https://src.fedoraproject.org/rpms/clustershell
74
75 To build RPMs locally, use that spec file, for example with 'fedpkg' or
76 'rpmbuild'.
77
78 Test Suite
79 ----------
80
81 Regression testing scripts are available in the 'tests' directory. To run the
82 whole test suite from the source tree root:
83
84 $ python -m unittest discover -v -s tests -p '*Test.py' -t .
85
86 To run a single test module, narrow the discovery pattern, for example
87 `-p 'NodeSetTest.py'`.
88
89 You have to allow 'ssh localhost' and 'ssh $HOSTNAME' without any warnings for
90 "remote" tests to run as expected. $HOSTNAME should not be 127.0.0.1 nor ::1.
91 Also some tests use the 'bc' command.
92
93 Python code (simple example)
94 ----------------------------
95
96 ```python
97 >>> from ClusterShell.Task import task_self
98 >>> from ClusterShell.NodeSet import NodeSet
99 >>> task = task_self()
100 >>> task.run("/bin/uname -r", nodes="linux[4-6,32-39]")
101 <ClusterShell.Worker.Ssh.WorkerSsh object at 0x7f45287db910>
102 >>> for buf, key in task.iter_buffers():
103 ... print(NodeSet.fromlist(key), buf.message().decode())
104 ...
105 linux[32-39] 6.14.9-300.fc42.x86_64
106 linux[4-6] 5.14.0-570.12.1.el9_6.x86_64
107 ```
108
109 Links
110 -----
111
112 Online documentation:
113
114 https://clustershell.readthedocs.io/
115
116 Github source repository:
117
118 https://github.com/clustershell/clustershell
119
120 Github Issue tracking system:
121
122 https://github.com/clustershell/clustershell/issues
123
124 Python Package Index (PyPI) links:
125
126 https://pypi.org/project/ClusterShell/
127
128 ClusterShell was born along with Shine, a scalable Lustre FS admin tool:
129
130 https://github.com/cea-hpc/shine
131
132 Core developers/reviewers
133 -------------------------
134
135 * Stephane Thiell
136 * Aurelien Degremont
137 * Dominique Martinet
138
139 Acknowledgments
140 ---------------
141
142 We would like to express our gratitude to [CEA](https://www.cea.fr/english)
143 for the resources and funding provided to the project over the years.
144
145 We would also like to thank [Stanford University](https://srcc.stanford.edu)
146 (SRC) for their long-term support and resources provided to the project.
147
148 See the full [Acknowledgments](https://clustershell.readthedocs.io/en/latest/acknowledgments.html)
149 page for more details.