.. include:: global.rst.inc .. _installation: Installation ============ Release versions of Benji are available on PyPi and can installed via `pip`. In addition there are two container images: One generic image and an extended one for the use with Kubernetes. The generic ``ghcr.io/elementalnet/benji`` image is the easiest and fastest way to try out Benji but can also be used in production. It includes all dependencies and extra features listed below (including RBD and iSCSI support). See section :ref:`container` for more information about the images. Fedora 27 and up ---------------- The distribution includes a supported version of Python 3. Make sure to install the latest available update. openSUSE -------- The distribution includes a supported version of Python 3. Benji is also available through the official repositories of openSUSE Tumbleweed. For older, versioned releases of openSUSE you need to add the devel project:: zypper ar obs://Archiving:Backup ab-benji zypper ref Then you can install it via:: zypper in benji RHEL/CentOS 7 ------------- A recent version of Python 3 is included in the EPEL repository:: yum install -y epel-release yum install -y python36-devel python36-pip python36-libs python36-setuptools Ubuntu 16.04 ------------ This version of Ubuntu doesn't have a current Python installation. But Python 3 can be installed via private repository:: apt-get update apt-get install --no-install-recommends software-properties-common python-software-properties add-apt-repository ppa:deadsnakes/ppa apt-get update apt-get install --no-install-recommends python3.6 python3.6-venv python3.6-dev git gcc .. NOTE:: For more information about this Personal Package Archive (PPA) please see https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa. Common to All Distributions --------------------------- After installing a recent Python version, it is now time to install Benji and its dependencies:: # Create new virtual environment python3.6 -m venv /usr/local/benji # Activate it (your shell prompt should change) . /usr/local/benji/bin/activate # Alternative A: Install a specific released version from PyPI (0.8.0) pip install benji==0.8.0 # Alternative B: Install the latest released version from PyPI pip install benji # Alternative C: Install the latest version from the master branch of the Git repository pip install git+https://github.com/elemental-lf/benji For certain features additional dependencies are needed. These are referenced by a symbolic name: - ``s3``: AWS S3 object storage support - ``b2``: Backblaze's B2 Cloud object storage support - ``compression``: Compression support Specify any extra extra features as a comma delimited list in square brackets after the package URL:: pip install benji[compression,s3,readcache,b2]==0.8.0 To upgrade an existing installation use the same command line but add the ``--upgrade`` option. .. NOTE:: It is recommended to install and use the compression feature for almost all use cases as it decreases storage space usage significantly. Ceph RBD Support ---------------- The Ceph RBD support cannot be installed via `pip` like the other dependencies as the Python bindings for `librados` and `librbd` are not available on PyPi. Depending on the distribution and the used Ceph version pre-built packages are available: - For RHEL and CentOS 7 see https://docs.ceph.com/docs/master/install/get-packages/, the packages are named `python36-rados` and `python36-rbd`. - For Ubuntu (Xenial and Bionic) also see https://docs.ceph.com/docs/master/install/get-packages/, the packages are named `python3-rados` and `python3-rbd`. - The Ceph project no longer supplies Debian packages but unofficial packages can be found at https://mirror.croit.io/debian-mimic/ (Mimic) and https://mirror.croit.io/debian-nautilus/ (Nautilus). Usage instructions are given in this `blog post `_. - Proxmox 6.0 includes packages for Ceph Nautilus (`python3-rados` and `python3-rbd`). - Some distributions also provide packages for recent versions of Ceph directly via their official repositories. For Fedora 30 the packages are named `python3-rados` and `python3-rbd` for example and are based on Nautilus. Debian Buster includes packages for Ceph Luminous (`python3-rados` and `python3-rbd`). .. NOTE:: If Benji is installed in a virtual environment as suggested above, system-wide Python packages are not available by default. To access system-wide Python packages like Ceph's Python bindings the virtual environment needs to be created with the `--system-site-packages` option. If all other options fail, it is still possible to directly install the Python binding from the Ceph source code. For RHEL/CentOS 7 the procedure looks like this:: cat >/etc/yum.repos.d/ceph.repo <