Requirements
This page documents the requirements and dependencies needed by Sarus. It serves both as a general reference and as preliminary step to performing installations from source.
The Spack package manager is able to build or retrieve software dependencies on its own: as such, when using Spack, the only requirements to satisfy from this page are those related to the operating system.
Operating System
Linux kernel >= 3.0
util-linux >= 2.20 (these utilities are usually bundled with the Linux distribution itself; v2.20 was released in August 2011)
The following kernel modules loaded:
loop
squashfs
overlayfs
These requirements are tracked by the CI/check_host.sh script.
System packages
The required packages for building Sarus are listed below for a selection of popular Linux distributions. Please note that, depending on the distribution, not all dependencies might be available through the system's package manager, or some dependencies might be provided in versions not supported by Sarus. Please follow the manual installation instructions for such dependencies.
Important
Please note that when building on ARM architecture, Boost version 1.77.x or later is required.
# Install packages
sudo zypper install -y gcc-c++ glibc-static wget which git gzip bzip2 tar procps \
make autoconf automake squashfs cmake zlib-devel zlib-devel-static \
runc tini-static skopeo umoci \
libboost_filesystem1_75_0-devel \
libboost_regex1_75_0-devel \
libboost_program_options1_75_0-devel \
python3 python3-pip python3-setuptools
sudo zypper clean --all
# Install packages
sudo dnf install -y dnf-plugins-core epel-release
sudo dnf config-manager --set-enabled powertools
sudo dnf install -y gcc gcc-c++ glibc-static libstdc++-static git make cmake autoconf \
diffutils findutils wget which procps squashfs-tools zlib-devel zlib-static \
boost-devel skopeo runc tini-static \
python39 python39-pip python39-setuptools platform-python-devel
sudo dnf clean all
sudo rm -rf /var/cache/dnf
# The following dependencies are not provided via the system's package manager
# and should be installed manually:
# - Umoci
# Install packages
sudo dnf install -y dnf-plugins-core epel-release
sudo dnf config-manager --set-enabled crb
sudo dnf install -y gcc gcc-c++ glibc-static libstdc++-static git make cmake autoconf \
diffutils findutils wget which procps squashfs-tools zlib-devel zlib-static \
boost-devel skopeo runc \
python3 python3-pip python3-setuptools
sudo dnf clean all
sudo rm -rf /var/cache/dnf
# The following dependencies are not provided via the system's package manager
# and should be installed manually:
# - Umoci
# - tini
# Install packages
sudo dnf install -y gcc g++ glibc-static libstdc++-static git make cmake autoconf \
diffutils findutils wget which procps squashfs-tools zlib-devel zlib-static \
boost-devel skopeo runc tini-static \
python3 python3-pip python3-setuptools
sudo dnf clean all
sudo rm -rf /var/cache/dnf
# The following dependencies are not provided via the system's package manager
# and should be installed manually:
# - Runc version 1.2.0
# - Umoci
# Install packages
sudo apt-get update --fix-missing
sudo apt-get install -y --no-install-recommends build-essential
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends kmod curl git \
autoconf automake gnupg squashfs-tools cmake wget \
zlib1g-dev runc tini skopeo umoci \
libboost-dev \
libboost-program-options-dev \
libboost-filesystem-dev \
libboost-regex-dev \
python3 python3-pip python3-setuptools python3-venv
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
# Install packages
sudo apt-get update --fix-missing
sudo apt-get install -y --no-install-recommends build-essential
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends kmod curl git \
autoconf automake gnupg squashfs-tools cmake wget \
zlib1g-dev tini skopeo umoci \
libboost-dev \
libboost-program-options-dev \
libboost-filesystem-dev \
libboost-regex-dev \
python3 python3-pip python3-setuptools python3-venv
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
# The following dependencies are not provided via the system's package manager
# and should be installed manually:
# - Runc version 1.2.0
Manual installation
This section provides instructions to install some notable Sarus dependencies which might not be available through the system's package manager, or might be provided in a version not supported by Sarus.
Boost libraries
Boost libraries are required to be version 1.60.x or later. The recommended version, which is used routinely for build integration and testing, is 1.85.x.
It is especially important to note that when building on ARM architecture, Boost version 1.77.x or later is required.
Note
The following instructions will default to /usr/local
as the installation
prefix. To install to a specific location, use the --prefix
option of
the b2 builder/installer tool.
pwd_bak=$PWD
# Install boost
cd /tmp && \
mkdir -p boost/1_85_0 && cd boost/1_85_0 && \
wget https://downloads.sourceforge.net/project/boost/boost/1.85.0/boost_1_85_0.tar.bz2 && \
tar xf boost_1_85_0.tar.bz2 && \
mv boost_1_85_0 src && cd src && \
./bootstrap.sh && \
sudo ./b2 -j$(nproc) \
--with-filesystem \
--with-regex \
--with-program_options \
install && \
cd ${pwd_bak} && \
rm -rf /tmp/boost
Skopeo
Skopeo is used to acquire images and their metadata from a variety of sources. Versions 1.7.0 or later are recommended for improved performance when pulling or loading images.
Up-to-date instructions about building Skopeo from source are available on the project's GitHub repository.
Umoci
Umoci is used to unpack OCI images' filesystem contents before converting them into the SquashFS format:
pwd_bak=$PWD
# Install umoci
cd /tmp && \
wget -O umoci https://github.com/opencontainers/umoci/releases/download/v0.4.7/umoci.amd64 && \
chmod 755 umoci && \
sudo mv umoci /usr/local/bin/ && \
sudo chown root:root /usr/local/bin/umoci && \
cd ${pwd_bak}
OCI-compliant runtime
Sarus internally relies on an OCI-compliant runtime to spawn a container.
Here we will provide some indications to install runc, the reference implementation from the Open Container Initiative. The recommended version is v1.2.0.
Important
Due to the changes and hardening measures they introduced, runc 1.1.12 and later are not compatible with Sarus (and its hooks) versions 1.6.2 and earlier.
Sarus 1.6.3 and later should be used alongside runc >=1.1.12.
The simplest solution is to download a pre-built binary release from the project's GitHub page:
pwd_bak=$PWD
# Install runc
cd /tmp && \
wget -O runc.amd64 https://github.com/opencontainers/runc/releases/download/v1.2.0/runc.amd64 && \
chmod 755 runc.amd64 && \
sudo mv runc.amd64 /usr/local/bin/ && \
sudo chown root:root /usr/local/bin/runc.amd64 && \
cd ${pwd_bak}
Alternatively, you can follow the instructions to build from source, which allows more fine-grained control over runc's features, including security options.
Init process
Sarus can start an init process within containers in order to reap zombie processes and allow container applications to receive signals.
Here we will provide some indications to install tini, a very lightweight init process which is also used by Docker. The recommended version is v0.19.0.
The simplest solution is to download a pre-built binary release from the project's GitHub page:
pwd_bak=$PWD
# Install tini
cd /tmp && \
wget -O tini-static-amd64 https://github.com/krallin/tini/releases/download/v0.19.0/tini-static-amd64 && \
chmod 755 tini-static-amd64 && \
sudo mv tini-static-amd64 /usr/local/bin/ && \
sudo chown root:root /usr/local/bin/tini-static-amd64 && \
cd ${pwd_bak}
Alternatively, you can follow the instructions to build from source.
Python packages for integration tests
The following Python 3 packages are required if you are interested to also run the integration tests:
$ pip3 install setuptools
$ pip3 install pytest gcovr pexpect