Rate This Document
Findability
Accuracy
Completeness
Readability

Compiling and Verifying Ceph

CentOS 7.6

  1. Modify the ceph.spec file.
    1
    2
    cd /home/ceph-14.2.8/
    vi ceph.spec.in
    

    Change the SciPy version to python36-scipy.

  2. Modify the requirements.txt file in the dashboard folder.
    1
    vi /home/ceph-14.2.8/src/pybind/mgr/dashboard/requirements.txt
    

    Comment out pyopenssl.

  3. Install the dependencies.
    1
    2
    3
    4
    yum -y install epel-release
    yum -y install python36-scipy.aarch64
    cd /home/ceph-14.2.8/
    sh install-deps.sh
    
  4. Perform the compilation.
    1
    2
    3
    sh do_cmake.sh
    cd build
    make -j 48
    
  5. Performs a unit test (UT).
    1
    ctest3 -V -R unittest_compression
    

  6. Delete the build directory.
    1
    2
    cd /home/ceph-14.2.8/
    rm -rf build
    

openEuler 20.03

  1. Use EPEL to install the dependencies that are missing in openEuler.
    1. Configure the EPEL source.
      1
      vi /etc/yum.repos.d/epel.repo
      

      Add the following content:

      1
      2
      3
      4
      5
      6
      [epel]
      name=epel
      baseurl=https://repo.huaweicloud.com/epel/7/aarch64/
      enabled=1
      gpgcheck=0
      priority=1
      
    2. Use the EPEL source to install dependencies.
      1
      yum install python-routes python-tox -y
      
    3. Delete the EPEL source.
      1
      rm -rf /etc/yum.repos.d/epel.repo
      

      The EPEL source must be deleted. Otherwise, an RPM package that conflicts with openEuler will be downloaded from the EPEL source in subsequent steps.

  2. Modify the Ceph-related code to make it compatible with openEuler.
    1
    cd /home/ceph-14.2.8/
    
    1. Add openEuler to the install-deps.sh file.
      vim install-deps.sh

    2. Modify the ceph.spec.in file.
      1
      sed -i 's#%if 0%{?fedora} || 0%{?rhel}#%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}#' ceph.spec.in
      
    3. Modify the ceph.spec file.
      1
      vim ceph.spec
      
      1. Add the following information to the start of the file:
        1
        %define _binaries_in_noarch_packages_terminate_build 0
        
      2. As shown in the following figure, set CEPH_MFLAGS_JOBS="-j48" to improve the compilation speed of openEuler.

  3. Install and compile the dependency.
    1. Install the dependency.
      1
      2
      cd /home/ceph-14.2.8/
      sh install-deps.sh
      
    2. Perform the compilation.
      1
      2
      3
      sh do_cmake.sh
      cd build
      make -j 48
      
    3. Performs a unit test (UT).
      1
      ctest3 -V -R unittest_compression