Go to file
Ceph Release Team ff498e17d2 18.2.6
Signed-off-by: Ceph Release Team <ceph-maintainers@ceph.io>
2025-04-16 21:22:52 +00:00
.github doc: PR Template - Remove non-functional trigger phrases 2025-02-27 13:37:36 -05:00
admin doc: Upgrade and unpin some python versions 2025-02-20 17:15:46 +10:00
bin
ceph-erasure-code-corpus@2d7d78b9cc
ceph-menv ceph-menv:fix typo in README 2024-01-13 06:36:22 +10:00
ceph-object-corpus@038c72b5ac ceph-object-corpus: pick up 16.2.0-90-g50f1821b4c 2021-04-12 21:49:28 +08:00
cmake/modules Merge pull request #60108 from cbodley/wip-68379-reef 2024-11-28 17:46:45 +05:30
container container/build.sh: remove local container images 2025-02-28 13:36:56 -08:00
debian 18.2.6 2025-04-16 21:22:52 +00:00
doc doc/dev/developer_guide/essentials: update mailing lists 2025-03-19 14:49:32 +10:00
etc
examples Merge pull request #50202 from rzarzynski/wip-librbd-drop-cxx11-from-example 2023-02-23 18:25:14 +01:00
fusetrace fuse: update to newer FUSE_USE_VERSION 2020-06-03 14:03:31 -04:00
keys
man doc,man: typos found by codespell 2021-12-15 12:04:36 +01:00
mirroring doc: Remove inactive Ceph mirrors. 2022-08-19 09:47:26 +08:00
monitoring monitoring/ceph-mixin: set NVMeoFMaxGatewaysPerGroup to 4 2024-04-23 11:59:19 -04:00
qa rgw: keep the tails when copying object to itself 2025-04-04 17:46:01 +00:00
selinux selinux: prepare for anon inode controls enablement 2022-08-29 14:42:44 +02:00
share
src common/pick_address: Add IPv6 support to is_addr_in_subnet 2025-04-15 17:38:22 +00:00
sudoers.d rpm, debian: move smartmontools and nvme-cli to ceph-base 2021-08-25 13:20:23 +00:00
systemd systemd: add systemd unit file for ceph-exporter 2024-03-28 04:50:54 +00:00
udev rbd: include RADOS namespace in krbd symlinks 2020-09-08 19:36:02 +02:00
.gitattributes doc: use union merge strategy for resolving conflicts in PendingReleaseNotes 2020-08-28 18:59:30 -07:00
.githubmap mailmap: add my ibm email 2024-10-16 10:22:56 +10:00
.gitignore docs: Add information about OpenNebula integration 2023-12-18 14:22:47 +10:00
.gitleaks.toml .gitleaks.toml: Allowlist cephadm test 2022-08-08 13:57:36 -04:00
.gitmodule_mirrors
.gitmodules remove rapidjson submodule 2022-11-30 14:59:27 -05:00
.mailmap mailmap: add my ibm email 2024-10-16 10:22:56 +10:00
.organizationmap mailmap: add my ibm email 2024-10-16 10:22:56 +10:00
.peoplemap mailmap: add my ibm email 2024-10-16 10:22:56 +10:00
.readthedocs.yml doc: Upgrade and unpin some python versions 2025-02-20 17:15:46 +10:00
AUTHORS
ceph.spec.in ceph.spec.in: we need jsonnet for all distroes for make check 2024-10-01 14:13:39 +02:00
CMakeLists.txt 18.2.6 2025-04-16 21:22:52 +00:00
CodingStyle mgr/dashboard: tslint to eslint migration 2022-11-14 22:56:21 +05:30
ContainerBuild.md doc: document the new container build tool and link to it in README 2025-03-06 16:14:28 -05:00
CONTRIBUTING.rst doc/rados/configuration/common.rst: expand the running multiple clusters section 2020-11-14 01:36:07 -08:00
COPYING os: remove unused btrfs_ioctl.h and tests 2024-11-04 13:56:02 -05:00
COPYING-GPL2
COPYING-LGPL2.1
COPYING-LGPL3
do_cmake.sh install-deps.sh, do_cmake.sh: almalinux is another el flavour 2024-07-10 17:23:05 -04:00
do_freebsd.sh do_freebsd.sh: set WITH_JAEGER=OFF 2022-05-17 04:42:01 -04:00
doc_deps.deb.txt admin/build-doc: s/virtualenv/python3 -m venv/ 2021-07-31 22:34:05 +08:00
Dockerfile.build src/script: rename CEPH_BRANCH to CEPH_BASE_BRANCH for build container 2025-03-06 16:14:27 -05:00
install-deps.sh install-deps.sh: use ci_debug function 2025-02-18 17:58:08 -05:00
make-debs.sh build: small script tweak to allow different build dirs 2025-02-18 17:58:08 -05:00
make-dist fix review about mgr/dashboard/frontend:Ceph dashboard supports multiple languages 2024-03-21 08:29:03 +00:00
make-srpm.sh
mingw_conf.sh win32: add rhel option 2022-09-27 11:21:18 -04:00
PendingReleaseNotes rbd-nbd: map using netlink interface by default 2025-03-07 21:05:56 +01:00
pom.xml
README.aix ceph.spec.in: drop gdbm from build deps 2021-08-18 01:04:42 +08:00
README.FreeBSD
README.md doc: document the new container build tool and link to it in README 2025-03-06 16:14:28 -05:00
README.solaris
README.windows.rst doc/cephfs: update Dokany requirement 2022-08-30 14:04:54 +00:00
run-make-check.sh script: reorganize build scripts 2025-02-18 17:58:08 -05:00
SECURITY.md SECURITY.md: update security policy 2021-05-14 19:11:02 +05:30
SubmittingPatches-backports.rst doc: SubmittingPatches-backports - remove backports team 2024-10-14 21:25:31 +10:00
SubmittingPatches-kernel.rst doc: split up SubmittingPatches.rst 2019-10-17 19:32:03 +02:00
SubmittingPatches.rst SubmittingPatches.rst: PRs should target "main" 2022-06-13 09:38:40 +08:00
win32_build.sh win32_build.sh: build "ceph_test*" 2023-02-17 10:42:40 +00:00
win32_deps_build.sh win32_deps_build.sh: pin zlib tag 2025-02-03 20:48:30 +01:00

Ceph - a scalable distributed storage system

See https://ceph.com/ for current information about Ceph.

Contributing Code

Most of Ceph is dual-licensed under the LGPL version 2.1 or 3.0. Some miscellaneous code is either public domain or licensed under a BSD-style license.

The Ceph documentation is licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).

Some headers included in the ceph/ceph repository are licensed under the GPL. See the file COPYING for a full inventory of licenses by file.

All code contributions must include a valid "Signed-off-by" line. See the file SubmittingPatches.rst for details on this and instructions on how to generate and submit patches.

Assignment of copyright is not required to contribute code. Code is contributed under the terms of the applicable license.

Checking out the source

Clone the ceph/ceph repository from github by running the following command on a system that has git installed:

git clone git@github.com:ceph/ceph

Alternatively, if you are not a github user, you should run the following command on a system that has git installed:

git clone https://github.com/ceph/ceph.git

When the ceph/ceph repository has been cloned to your system, run the following commands to move into the cloned ceph/ceph repository and to check out the git submodules associated with it:

cd ceph
git submodule update --init --recursive

Build Prerequisites

section last updated 06 Sep 2024

We provide the Debian and Ubuntu apt commands in this procedure. If you use a system with a different package manager, then you will have to use different commands.

#. Install curl:

apt install curl

#. Install package dependencies by running the install-deps.sh script:

./install-deps.sh

#. Install the python3-routes package:

apt install python3-routes

Building Ceph

These instructions are meant for developers who are compiling the code for development and testing. To build binaries that are suitable for installation we recommend that you build .deb or .rpm packages, or refer to ceph.spec.in or debian/rules to see which configuration options are specified for production builds.

To build Ceph, follow this procedure:

  1. Make sure that you are in the top-level ceph directory that contains do_cmake.sh and CONTRIBUTING.rst.

  2. Run the do_cmake.sh script:

    ./do_cmake.sh
    

    do_cmake.sh by default creates a "debug build" of Ceph, which can be up to five times slower than a non-debug build. Pass -DCMAKE_BUILD_TYPE=RelWithDebInfo to do_cmake.sh to create a non-debug build.

  3. Move into the build directory:

    cd build
    
  4. Use the ninja buildsystem to build the development environment:

    ninja -j3
    

    Important

    Ninja is the build system used by the Ceph project to build test builds. The number of jobs used by ninja is derived from the number of CPU cores of the building host if unspecified. Use the -j option to limit the job number if build jobs are running out of memory. If you attempt to run ninja and receive a message that reads g++: fatal error: Killed signal terminated program cc1plus, then you have run out of memory.

    Using the -j option with an argument appropriate to the hardware on which the ninja command is run is expected to result in a successful build. For example, to limit the job number to 3, run the command ninja -j3. On average, each ninja job run in parallel needs approximately 2.5 GiB of RAM.

    This documentation assumes that your build directory is a subdirectory of the ceph.git checkout. If the build directory is located elsewhere, point CEPH_GIT_DIR to the correct path of the checkout. Additional CMake args can be specified by setting ARGS before invoking do_cmake.sh. See cmake options for more details. For example:

    ARGS="-DCMAKE_C_COMPILER=gcc-7" ./do_cmake.sh
    

    To build only certain targets, run a command of the following form:

    ninja [target name]

  5. Install the vstart cluster:

    ninja install

CMake Options

If you run the cmake command by hand, there are many options you can set with "-D". For example, the option to build the RADOS Gateway is defaulted to ON. To build without the RADOS Gateway:

cmake -DWITH_RADOSGW=OFF [path to top-level ceph directory]

Another example below is building with debugging and alternate locations for a couple of external dependencies:

cmake -DLEVELDB_PREFIX="/opt/hyperleveldb" \
-DCMAKE_INSTALL_PREFIX=/opt/ceph -DCMAKE_C_FLAGS="-Og -g3 -gdwarf-4" \
..

Ceph has several bundled dependencies such as Boost, RocksDB and Arrow. By default, cmake will build these bundled dependencies from source instead of using libraries that are already installed on the system. You can opt-in to using these system libraries, provided they meet the minimum version required by Ceph, with cmake options like WITH_SYSTEM_BOOST:

cmake -DWITH_SYSTEM_BOOST=ON [...]

To view an exhaustive list of -D options, you can invoke cmake with:

cmake -LH

If you often pipe ninja to less and would like to maintain the diagnostic colors for errors and warnings (and if your compiler supports it), you can invoke cmake with:

cmake -DDIAGNOSTICS_COLOR=always ...

Then you'll get the diagnostic colors when you execute:

ninja | less -R

Other available values for 'DIAGNOSTICS_COLOR' are 'auto' (default) and 'never'.

Building a source tarball

To build a complete source tarball with everything needed to build from source and/or build a (deb or rpm) package, run

./make-dist

This will create a tarball like ceph-$version.tar.bz2 from git. (Ensure that any changes you want to include in your working directory are committed to git.)

Running a test cluster

From the ceph/ directory, run the following commands to launch a test Ceph cluster:

cd build
ninja vstart        # builds just enough to run vstart
../src/vstart.sh --debug --new -x --localhost --bluestore
./bin/ceph -s

Most Ceph commands are available in the bin/ directory. For example:

./bin/rbd create foo --size 1000
./bin/rados -p foo bench 30 write

To shut down the test cluster, run the following command from the build/ directory:

../src/stop.sh

Use the sysvinit script to start or stop individual daemons:

./bin/init-ceph restart osd.0
./bin/init-ceph stop

Running unit tests

To build and run all tests (in parallel using all processors), use ctest:

cd build
ninja
ctest -j$(nproc)

(Note: Many targets built from src/test are not run using ctest. Targets starting with "unittest" are run in ninja check and thus can be run with ctest. Targets starting with "ceph_test" can not, and should be run by hand.)

When failures occur, look in build/Testing/Temporary for logs.

To build and run all tests and their dependencies without other unnecessary targets in Ceph:

cd build
ninja check -j$(nproc)

To run an individual test manually, run ctest with -R (regex matching):

ctest -R [regex matching test name(s)]

(Note: ctest does not build the test it's running or the dependencies needed to run it)

To run an individual test manually and see all the tests output, run ctest with the -V (verbose) flag:

ctest -V -R [regex matching test name(s)]

To run tests manually and run the jobs in parallel, run ctest with the -j flag:

ctest -j [number of jobs]

There are many other flags you can give ctest for better control over manual test execution. To view these options run:

man ctest

Building Ceph using Containers

Ceph now provides tools to build the code, run unit tests, or build packages from within an OCI-style container using Podman or Docker! This allows one to build code for distributions other than the one you have on your system, avoids the need to install build dependencies for Ceph on your local system and provides an opportunity to test builds on platforms that are not yet supported by the official build infrastructure. For more details see the container build document.

Building the Documentation

Prerequisites

The list of package dependencies for building the documentation can be found in doc_deps.deb.txt:

sudo apt-get install `cat doc_deps.deb.txt`

Building the Documentation

To build the documentation, ensure that you are in the top-level /ceph directory, and execute the build script. For example:

admin/build-doc

Reporting Issues

To report an issue and view existing issues, please visit https://tracker.ceph.com/projects/ceph.