4 ############################################
6 ############################################
7 source $
(dirname $0)/..
/ceph-helpers-root.sh
9 ############################################
10 # Install required tools
11 ############################################
12 echo "Install required tools"
16 ############################################
17 # Compile&Start RocksDB
18 ############################################
19 # install prerequisites
23 install git g
++ libsnappy-dev zlib1g-dev libbz2-dev libradospp-dev cmake
28 # centos needs PowerTools repo for snappy-devel
29 test -x /usr
/bin
/dnf
&& sudo dnf config-manager
--set-enabled PowerTools || true
32 # RHEL needs CRB repo for snappy-devel
33 sudo subscription-manager repos
--enable "codeready-builder-for-rhel-8-x86_64-rpms"
36 install git gcc-c
++.x86_64 snappy-devel zlib zlib-devel
bzip2 bzip2-devel libradospp-devel.x86_64 cmake libarchive-3.3
.3
39 install git gcc-c
++ snappy-devel zlib-devel libbz2-devel libradospp-devel
42 echo "$(distro_id) is unknown, $@ will have to be installed manually."
47 # sudo yum install gflags-devel
49 # wget https://github.com/schuhschuh/gflags/archive/master.zip
52 # mkdir build && cd build
53 # export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
54 # make && make install
59 echo "Compile rocksdb"
60 if [ -e rocksdb
]; then
64 pushd $
(dirname /home
/ubuntu
/cephtest
/clone.client
.0/qa
/workunits
/rados
/bash.sh
)/..
/..
/..
/
65 git submodule update
--init src
/rocksdb
67 git clone $
(dirname /home
/ubuntu
/cephtest
/clone.client
.0/qa
/workunits
/rados
/bash.sh
)/..
/..
/..
/src
/rocksdb rocksdb
71 if type cmake3
> /dev
/null
2>&1 ; then
77 [ -z "$BUILD_DIR" ] && BUILD_DIR
=build
78 mkdir
${BUILD_DIR} && cd ${BUILD_DIR} && ${CMAKE} -DCMAKE_BUILD_TYPE=Debug
-DWITH_TESTS=ON
-DWITH_LIBRADOS=ON
-DWITH_SNAPPY=ON
-DWITH_GFLAGS=OFF
-DFAIL_ON_WARNINGS=OFF ..
79 make rocksdb_env_librados_test
-j8
84 if [ -f "/etc/ceph/ceph.conf" ]; then
85 cp /etc
/ceph
/ceph.conf ..
/ceph
/src
/
86 elif [ -f "/etc/ceph/ceph/ceph.conf" ]; then
87 cp /etc
/ceph
/ceph
/ceph.conf ..
/ceph
/src
/
89 echo "/etc/ceph/ceph/ceph.conf doesn't exist"
92 echo "Run EnvLibrados test"
94 if [ -f "../ceph/src/ceph.conf" ]
96 cp env_librados_test ~
/cephtest
/archive
99 echo "../ceph/src/ceph.conf doesn't exist"