| 1 |
.. highlight:: console |
| 2 |
|
| 3 |
Installation |
| 4 |
============ |
| 5 |
|
| 6 |
ClusterShell is distributed in several packages. On RedHat-like OS, we |
| 7 |
recommend using the RPM package (.rpm) distribution. |
| 8 |
|
| 9 |
As system software for cluster, ClusterShell is primarily made for |
| 10 |
system-wide installation to be used by system administrators. However, |
| 11 |
changes have been made so that it's now possible to install it without |
| 12 |
root access (see :ref:`install-pip-user`). |
| 13 |
|
| 14 |
.. _install-requirements: |
| 15 |
|
| 16 |
Requirements |
| 17 |
------------ |
| 18 |
|
| 19 |
ClusterShell should work with any Unix [#]_ operating systems which provides |
| 20 |
Python 2.7 or 3.x and OpenSSH or any compatible Secure Shell clients. It is |
| 21 |
regularly tested with Python 3.7 up to Python 3.14. |
| 22 |
|
| 23 |
.. warning:: While we are making our best effort to maintain Python 2 |
| 24 |
compatibility in the ClusterShell 1.10 series, we no longer run tests for |
| 25 |
Python 2. Therefore, functionality on Python 2 is not guaranteed and may |
| 26 |
break without notice. The 1.10 series is expected to be the last to support |
| 27 |
Python 2; ClusterShell 1.11 will require Python 3. For the best experience |
| 28 |
and continued support, it is strongly recommended to use Python 3. |
| 29 |
|
| 30 |
For instance, ClusterShell is known to work on the following operating systems: |
| 31 |
|
| 32 |
* GNU/Linux |
| 33 |
|
| 34 |
* Red Hat Enterprise Linux 8 (Python 3.6) |
| 35 |
|
| 36 |
* Red Hat Enterprise Linux 9 (Python 3.9) |
| 37 |
|
| 38 |
* Red Hat Enterprise Linux 10 (Python 3.12) |
| 39 |
|
| 40 |
* Fedora 42 and above (Python 3.13+) |
| 41 |
|
| 42 |
* Debian 12 "bookworm" (Python 3.11) |
| 43 |
|
| 44 |
* Debian 13 "trixie" (Python 3.13) |
| 45 |
|
| 46 |
* Ubuntu 22.04 LTS (Python 3.10) |
| 47 |
|
| 48 |
* Ubuntu 24.04 LTS (Python 3.12) |
| 49 |
|
| 50 |
* macOS (Python 3) |
| 51 |
|
| 52 |
Distribution |
| 53 |
------------ |
| 54 |
|
| 55 |
ClusterShell is an open-source project distributed under the GNU Lesser General |
| 56 |
Public License version 2.1 or later (`LGPL v2.1+`_), which means that many |
| 57 |
possibilities are offered to the end user. Also, as a software library, |
| 58 |
ClusterShell should remain easily available to everyone. Fortunately, packages are |
| 59 |
currently available for Fedora Linux, RHEL (through EPEL repositories), Debian, |
| 60 |
Arch Linux and more. |
| 61 |
|
| 62 |
Red Hat Enterprise Linux |
| 63 |
^^^^^^^^^^^^^^^^^^^^^^^^ |
| 64 |
|
| 65 |
ClusterShell packages are maintained on Extra Packages for Enterprise Linux |
| 66 |
`EPEL`_ for Red Hat Enterprise Linux (RHEL) and its compatible spinoffs such |
| 67 |
as `Alma Linux`_ and `Rocky Linux`_. ClusterShell is currently available on |
| 68 |
EPEL 8, 9 and 10. |
| 69 |
|
| 70 |
|
| 71 |
Install ClusterShell from EPEL |
| 72 |
"""""""""""""""""""""""""""""" |
| 73 |
|
| 74 |
First you have to enable the EPEL repository. We recommend downloading and |
| 75 |
installing the `EPEL`_ repository RPM package. On Alma Linux and Rocky Linux, |
| 76 |
this can be easily done using the following command:: |
| 77 |
|
| 78 |
$ dnf install epel-release |
| 79 |
|
| 80 |
Then, install ClusterShell's library module and tools using the following |
| 81 |
command:: |
| 82 |
|
| 83 |
$ dnf install clustershell |
| 84 |
|
| 85 |
The tools and the Python 3 library module are installed by default with |
| 86 |
``clustershell``. If interested in the Python 3 library only, you can install |
| 87 |
ClusterShell's Python 3 subpackage using the following command:: |
| 88 |
|
| 89 |
$ dnf install python3-clustershell |
| 90 |
|
| 91 |
Fedora |
| 92 |
^^^^^^ |
| 93 |
|
| 94 |
ClusterShell is available in all Fedora releases currently maintained by the |
| 95 |
Fedora Project. |
| 96 |
|
| 97 |
Install ClusterShell from *Fedora Updates* |
| 98 |
"""""""""""""""""""""""""""""""""""""""""" |
| 99 |
|
| 100 |
ClusterShell is part of Fedora, so it is really easy to install it with |
| 101 |
``dnf``, although you have to keep the Fedora *updates* default repository. |
| 102 |
The following command checks whether the packages are available on a Fedora |
| 103 |
system:: |
| 104 |
|
| 105 |
$ dnf list \*clustershell |
| 106 |
Available Packages |
| 107 |
clustershell.noarch 1.9.3-6.fc43 updates |
| 108 |
python3-clustershell.noarch 1.9.3-6.fc43 updates |
| 109 |
|
| 110 |
Then, install ClusterShell's library module and tools using the following |
| 111 |
command:: |
| 112 |
|
| 113 |
$ dnf install clustershell |
| 114 |
|
| 115 |
If interested in the Python 3 library only, you can install ClusterShell's |
| 116 |
Python 3 subpackage using the following command:: |
| 117 |
|
| 118 |
$ dnf install python3-clustershell |
| 119 |
|
| 120 |
Install ClusterShell from Fedora Updates Testing |
| 121 |
"""""""""""""""""""""""""""""""""""""""""""""""" |
| 122 |
|
| 123 |
Recent releases of ClusterShell are first available through the |
| 124 |
`Test Updates`_ repository of Fedora, then it is later pushed to the stable |
| 125 |
*updates* repository. The following ``dnf`` command will also check for |
| 126 |
package availability in the *updates-testing* repository:: |
| 127 |
|
| 128 |
$ dnf list \*clustershell --enablerepo=updates-testing |
| 129 |
|
| 130 |
To install, also add the ``--enablerepo=updates-testing`` option, for |
| 131 |
instance:: |
| 132 |
|
| 133 |
$ dnf install clustershell --enablerepo=updates-testing |
| 134 |
|
| 135 |
openSUSE |
| 136 |
^^^^^^^^ |
| 137 |
|
| 138 |
ClusterShell is available in openSUSE Tumbleweed (Factory) and Leap since 2017. |
| 139 |
|
| 140 |
To install ClusterShell on openSUSE, use:: |
| 141 |
|
| 142 |
$ zypper install clustershell |
| 143 |
|
| 144 |
If interested in the Python 3 library only, you can install ClusterShell's |
| 145 |
Python 3 subpackage using the following command:: |
| 146 |
|
| 147 |
$ zypper install python3-clustershell |
| 148 |
|
| 149 |
Debian |
| 150 |
^^^^^^ |
| 151 |
|
| 152 |
ClusterShell is available in Debian **main** repository (since 2011). |
| 153 |
|
| 154 |
To install it on Debian, simply use:: |
| 155 |
|
| 156 |
$ apt-get install clustershell |
| 157 |
|
| 158 |
You can get the latest version on: |
| 159 |
|
| 160 |
* https://packages.debian.org/sid/clustershell |
| 161 |
|
| 162 |
|
| 163 |
Ubuntu |
| 164 |
^^^^^^ |
| 165 |
|
| 166 |
Like Debian, it is easy to get and install ClusterShell on Ubuntu (also with |
| 167 |
``apt-get``). To do so, please first enable the **universe** repository: |
| 168 |
|
| 169 |
* https://packages.ubuntu.com/clustershell |
| 170 |
|
| 171 |
.. _install-python: |
| 172 |
|
| 173 |
Installing ClusterShell the Python way |
| 174 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 175 |
|
| 176 |
.. warning:: Installing ClusterShell as root using pip [#]_ is discouraged and |
| 177 |
can result in conflicting behavior with the system package manager. Use |
| 178 |
packages provided by your OS instead to install ClusterShell system-wide. |
| 179 |
|
| 180 |
.. _install-pip-user: |
| 181 |
|
| 182 |
Installing ClusterShell as user using pip |
| 183 |
""""""""""""""""""""""""""""""""""""""""" |
| 184 |
|
| 185 |
To install ClusterShell as a standard Python package using pip as a user:: |
| 186 |
|
| 187 |
$ pip install --user ClusterShell |
| 188 |
|
| 189 |
Or alternatively, using the source tarball:: |
| 190 |
|
| 191 |
$ pip install --user ClusterShell-1.x.tar.gz |
| 192 |
|
| 193 |
Then, you might need to update your ``PATH`` to easily use the :ref:`tools`, |
| 194 |
and ``MANPATH`` for the man pages (the library itself is installed in the |
| 195 |
user site-packages directory, which Python searches by default):: |
| 196 |
|
| 197 |
$ export PATH=$PATH:~/.local/bin |
| 198 |
$ export MANPATH=$MANPATH:$HOME/.local/share/man |
| 199 |
|
| 200 |
.. note:: On macOS, ``pip install --user`` places the tools in |
| 201 |
``~/Library/Python/3.x/bin`` instead of ``~/.local/bin``; adjust ``PATH`` |
| 202 |
accordingly. |
| 203 |
|
| 204 |
Configuration files are installed in ``~/.local/etc/clustershell`` and are |
| 205 |
automatically loaded before system-wide ones (for more info about supported |
| 206 |
user config files, please see the :ref:`clush-config` or :ref:`groups-config` |
| 207 |
config sections). |
| 208 |
|
| 209 |
.. _install-venv-pip: |
| 210 |
|
| 211 |
Isolated environment using virtualenv and pip |
| 212 |
""""""""""""""""""""""""""""""""""""""""""""" |
| 213 |
|
| 214 |
It is possible to use virtual env (`venv`_) and pip to install ClusterShell |
| 215 |
in an isolated environment:: |
| 216 |
|
| 217 |
$ python3 -m venv venv |
| 218 |
$ source venv/bin/activate |
| 219 |
$ pip install ClusterShell |
| 220 |
|
| 221 |
.. note:: Scripts that import the ClusterShell library must run with the |
| 222 |
Python interpreter where ClusterShell is installed: use |
| 223 |
``#!/usr/bin/python3`` with distribution packages or |
| 224 |
``pip install --user``, or your virtual environment's interpreter |
| 225 |
(e.g. ``#!/usr/bin/env python3`` with the environment activated). |
| 226 |
|
| 227 |
.. _install-source: |
| 228 |
|
| 229 |
Source |
| 230 |
------ |
| 231 |
|
| 232 |
Current source is available through Git, use the following command to retrieve |
| 233 |
the latest development version from the repository:: |
| 234 |
|
| 235 |
$ git clone https://github.com/clustershell/clustershell.git |
| 236 |
|
| 237 |
|
| 238 |
.. [#] Unix in the same sense of the *Availability: Unix* notes in the Python |
| 239 |
documentation |
| 240 |
.. [#] pip is a tool for installing and managing Python packages, such as |
| 241 |
those found in the Python Package Index |
| 242 |
|
| 243 |
.. _LGPL v2.1+: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html |
| 244 |
.. _Test Updates: https://fedoraproject.org/wiki/QA/Updates_Testing |
| 245 |
.. _EPEL: https://fedoraproject.org/wiki/EPEL |
| 246 |
.. _Alma Linux: https://almalinux.org/ |
| 247 |
.. _Rocky Linux: https://rockylinux.org/ |
| 248 |
.. _venv: https://docs.python.org/3/tutorial/venv.html |