-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jaegertracing build/ops integration #31358
Changes from all commits
4b69d3a
3c5abab
01997e7
4b8c92a
1e6e1f9
85ca7b3
9f5d725
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,7 @@ | |
%endif | ||
%endif | ||
%bcond_with seastar | ||
%bcond_with jaeger | ||
%if 0%{?fedora} || 0%{?suse_version} >= 1500 | ||
# distros that ship cmd2 and/or colorama | ||
%bcond_without cephfs_shell | ||
|
@@ -202,6 +203,18 @@ BuildRequires: socat | |
%if 0%{with zbd} | ||
BuildRequires: libzbd-devel | ||
%endif | ||
%if 0%{with jaeger} | ||
BuildRequires: bison | ||
BuildRequires: flex | ||
%if 0%{?fedora} || 0%{?rhel} | ||
BuildRequires: json-devel | ||
%endif | ||
%if 0%{?suse_version} | ||
BuildRequires: nlohmann_json-devel | ||
%endif | ||
BuildRequires: libevent-devel | ||
BuildRequires: yaml-cpp-devel | ||
%endif | ||
%if 0%{with seastar} | ||
BuildRequires: c-ares-devel | ||
BuildRequires: gnutls-devel | ||
|
@@ -409,6 +422,9 @@ Requires: python%{python3_pkgversion}-cephfs = %{_epoch_prefix}%{version}-%{rele | |
Requires: python%{python3_pkgversion}-rgw = %{_epoch_prefix}%{version}-%{release} | ||
Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release} | ||
Requires: python%{python3_pkgversion}-ceph-common = %{_epoch_prefix}%{version}-%{release} | ||
%if 0%{with jaeger} | ||
Requires: libjaeger = %{_epoch_prefix}%{version}-%{release} | ||
%endif | ||
%if 0%{?fedora} || 0%{?rhel} | ||
Requires: python%{python3_pkgversion}-prettytable | ||
%endif | ||
|
@@ -448,6 +464,9 @@ Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} | |
Recommends: nvme-cli | ||
Recommends: smartmontools | ||
%endif | ||
%if 0%{with jaeger} | ||
Requires: libjaeger = %{_epoch_prefix}%{version}-%{release} | ||
%endif | ||
%description mon | ||
ceph-mon is the cluster monitor daemon for the Ceph distributed file | ||
system. One or more instances of ceph-mon form a Paxos part-time | ||
|
@@ -796,7 +815,7 @@ Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{relea | |
Provides: python-rgw = %{_epoch_prefix}%{version}-%{release} | ||
Obsoletes: python-rgw < %{_epoch_prefix}%{version}-%{release} | ||
%description -n python%{python3_pkgversion}-rgw | ||
This package contains Python 3 libraries for interacting with Cephs RADOS | ||
This package contains Python 3 libraries for interacting with Ceph RADOS | ||
ideepika marked this conversation as resolved.
Show resolved
Hide resolved
|
||
gateway. | ||
|
||
%package -n python%{python3_pkgversion}-rados | ||
|
@@ -810,7 +829,7 @@ Requires: librados2 = %{_epoch_prefix}%{version}-%{release} | |
Provides: python-rados = %{_epoch_prefix}%{version}-%{release} | ||
Obsoletes: python-rados < %{_epoch_prefix}%{version}-%{release} | ||
%description -n python%{python3_pkgversion}-rados | ||
This package contains Python 3 libraries for interacting with Cephs RADOS | ||
This package contains Python 3 libraries for interacting with Ceph RADOS | ||
object store. | ||
|
||
%if 0%{with libradosstriper} | ||
|
@@ -885,7 +904,7 @@ Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{relea | |
Provides: python-rbd = %{_epoch_prefix}%{version}-%{release} | ||
Obsoletes: python-rbd < %{_epoch_prefix}%{version}-%{release} | ||
%description -n python%{python3_pkgversion}-rbd | ||
This package contains Python 3 libraries for interacting with Cephs RADOS | ||
This package contains Python 3 libraries for interacting with Ceph RADOS | ||
block device. | ||
|
||
%package -n libcephfs2 | ||
|
@@ -916,7 +935,21 @@ Provides: libcephfs2-devel = %{_epoch_prefix}%{version}-%{release} | |
Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release} | ||
%description -n libcephfs-devel | ||
This package contains libraries and headers needed to develop programs | ||
that use Cephs distributed file system. | ||
that use Ceph distributed file system. | ||
ideepika marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
%if 0%{with jaeger} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you expand a little bit in the commit message? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added comment on --without-jaeger build option |
||
%package -n libjaeger | ||
Summary: Ceph distributed file system tracing library | ||
%if 0%{?suse_version} | ||
Group: System/Libraries | ||
%endif | ||
Provides: libjaegertracing.so.0()(64bit) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. who will be consuming for instance There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the internals of Provide script was not able to discover There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you be more specific which packages have libjaeger as a dependency? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes sure, I added them in commit message:
|
||
Provides: libopentracing.so.1()(64bit) | ||
Provides: libthrift.so.0.13.0()(64bit) | ||
%description -n libjaeger | ||
This package contains libraries needed to provide distributed | ||
tracing for Ceph. | ||
%endif | ||
|
||
%package -n python%{python3_pkgversion}-cephfs | ||
Summary: Python 3 libraries for Ceph distributed file system | ||
|
@@ -930,7 +963,7 @@ Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version} | |
Provides: python-cephfs = %{_epoch_prefix}%{version}-%{release} | ||
Obsoletes: python-cephfs < %{_epoch_prefix}%{version}-%{release} | ||
%description -n python%{python3_pkgversion}-cephfs | ||
This package contains Python 3 libraries for interacting with Cephs distributed | ||
This package contains Python 3 libraries for interacting with Ceph distributed | ||
file system. | ||
|
||
%package -n python%{python3_pkgversion}-ceph-argparse | ||
|
@@ -1075,7 +1108,7 @@ Summary: Prometheus alerts for a Ceph deployment | |
BuildArch: noarch | ||
Group: System/Monitoring | ||
%description prometheus-alerts | ||
This package provides Ceph’s default alerts for Prometheus. | ||
This package provides Ceph default alerts for Prometheus. | ||
|
||
################################################################################# | ||
# common | ||
|
@@ -2081,6 +2114,15 @@ fi | |
%{_includedir}/cephfs/metrics/Types.h | ||
%{_libdir}/libcephfs.so | ||
|
||
%if %{with jaeger} | ||
%files -n libjaeger | ||
%{_libdir}/libopentracing.so.* | ||
%{_libdir}/libthrift.so.* | ||
%{_libdir}/libjaegertracing.so.* | ||
%post -n libjaeger -p /sbin/ldconfig | ||
%postun -n libjaeger -p /sbin/ldconfig | ||
%endif | ||
|
||
%files -n python%{python3_pkgversion}-cephfs | ||
%{python3_sitearch}/cephfs.cpython*.so | ||
%{python3_sitearch}/cephfs-*.egg-info | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# This module builds Jaeger after it's dependencies are installed and discovered | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. its |
||
# opentracing: is built using cmake/modules/Buildopentracing.cmake | ||
# Thrift: build using cmake/modules/Buildthrift.cmake | ||
# yaml-cpp, nlhomann-json: are installed locally and then discovered using | ||
# Find<package>.cmake | ||
# Boost Libraries used for building thrift are build and provided by | ||
ideepika marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# cmake/modules/BuildBoost.cmake | ||
|
||
function(build_jaeger) | ||
set(Jaeger_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/jaegertracing/jaeger-client-cpp") | ||
set(Jaeger_INSTALL_DIR "${CMAKE_BINARY_DIR}/external") | ||
set(Jaeger_BINARY_DIR "${Jaeger_INSTALL_DIR}/Jaeger") | ||
|
||
file(MAKE_DIRECTORY "${Jaeger_INSTALL_DIR}") | ||
set(Jaeger_CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
-DBUILD_SHARED_LIBS=ON | ||
-DHUNTER_ENABLED=OFF | ||
-DBUILD_TESTING=OFF | ||
-DJAEGERTRACING_BUILD_EXAMPLES=OFF | ||
-DCMAKE_PREFIX_PATH="${CMAKE_BINARY_DIR}/external;${CMAKE_BINARY_DIR}/boost" | ||
-DCMAKE_INSTALL_RPATH=${CMAKE_BINARY_DIR}/external | ||
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE | ||
-DOpenTracing_DIR=${CMAKE_SOURCE_DIR}/src/jaegertracing/opentracing-cpp | ||
-Dnlohmann_json_DIR=/usr/lib | ||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/boost\;${CMAKE_BINARY_DIR}/boost/include\;${CMAKE_BINARY_DIR}/external | ||
-DCMAKE_FIND_ROOT_PATH=${CMAKE_BINARY_DIR}/boost\;${CMAKE_BINARY_DIR}/boost/include\;${CMAKE_BINARY_DIR}/external | ||
-DCMAKE_INSTALL_LIBDIR=${CMAKE_BINARY_DIR}/external/lib | ||
-Dthrift_HOME=${CMAKE_BINARY_DIR}/external | ||
-DOpenTracing_HOME=${CMAKE_BINARY_DIR}/external) | ||
|
||
set(dependencies opentracing thrift) | ||
include(BuildOpenTracing) | ||
build_opentracing() | ||
include(Buildthrift) | ||
build_thrift() | ||
if(NOT yaml-cpp_FOUND) | ||
include(Buildyaml-cpp) | ||
build_yamlcpp() | ||
add_library(yaml-cpp::yaml-cpp SHARED IMPORTED) | ||
add_dependencies(yaml-cpp::yaml-cpp yaml-cpp) | ||
set_library_properties_for_external_project(yaml-cpp::yaml-cpp yaml-cpp) | ||
list(APPEND dependencies "yaml-cpp") | ||
endif() | ||
|
||
if(CMAKE_MAKE_PROGRAM MATCHES "make") | ||
# try to inherit command line arguments passed by parent "make" job | ||
set(make_cmd $(MAKE)) | ||
else() | ||
set(make_cmd ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG> --target Jaeger) | ||
endif() | ||
set(install_cmd $(MAKE) install DESTDIR=) | ||
|
||
include(ExternalProject) | ||
ExternalProject_Add(Jaeger | ||
SOURCE_DIR ${Jaeger_SOURCE_DIR} | ||
UPDATE_COMMAND "" | ||
INSTALL_DIR "external" | ||
PREFIX ${Jaeger_INSTALL_DIR} | ||
CMAKE_ARGS ${Jaeger_CMAKE_ARGS} | ||
BINARY_DIR ${Jaeger_BINARY_DIR} | ||
BUILD_COMMAND ${make_cmd} | ||
INSTALL_COMMAND ${install_cmd} | ||
DEPENDS "${dependencies}" | ||
) | ||
endfunction() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
function(build_opentracing) | ||
set(opentracing_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/jaegertracing/opentracing-cpp") | ||
set(opentracing_BINARY_DIR "${CMAKE_BINARY_DIR}/external/opentracing-cpp") | ||
|
||
set(opentracing_CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
-DBUILD_MOCKTRACER=OFF | ||
-DENABLE_LINTING=OFF | ||
-DBUILD_STATIC_LIBS=OFF | ||
-DBUILD_TESTING=OFF | ||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/external | ||
-DCMAKE_INSTALL_RPATH=${CMAKE_BINARY_DIR}/external | ||
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE | ||
-DCMAKE_INSTALL_LIBDIR=${CMAKE_BINARY_DIR}/external/lib | ||
-DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/external) | ||
|
||
if(CMAKE_MAKE_PROGRAM MATCHES "make") | ||
# try to inherit command line arguments passed by parent "make" job | ||
set(make_cmd $(MAKE) ) | ||
else() | ||
set(make_cmd ${CMAKE_COMMAND} --build <BINARY_DIR> --target opentracing) | ||
endif() | ||
set(install_cmd $(MAKE) install DESTDIR=) | ||
|
||
include(ExternalProject) | ||
ExternalProject_Add(opentracing | ||
SOURCE_DIR ${opentracing_SOURCE_DIR} | ||
UPDATE_COMMAND "" | ||
INSTALL_DIR "external" | ||
PREFIX "external/opentracing-cpp" | ||
CMAKE_ARGS ${opentracing_CMAKE_ARGS} | ||
BUILD_IN_SOURCE 1 | ||
BUILD_COMMAND ${make_cmd} | ||
INSTALL_COMMAND ${install_cmd} | ||
) | ||
endfunction() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
function(build_thrift) | ||
set(thrift_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/jaegertracing/thrift") | ||
set(thrift_BINARY_DIR "${CMAKE_BINARY_DIR}/external/thrift") | ||
|
||
set(thrift_CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release | ||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
-DBUILD_JAVA=OFF | ||
-DBUILD_PYTHON=OFF | ||
-DBUILD_TESTING=OFF | ||
-DBUILD_TUTORIALS=OFF | ||
-DBUILD_C_GLIB=OFF | ||
-DBUILD_HASKELL=OFF | ||
-DWITH_LIBEVENT=OFF | ||
-DWITH_ZLIB=OFF | ||
-DBoost_INCLUDE_DIRS=${CMAKE_BINARY_DIR}/boost/include | ||
-DCMAKE_INSTALL_PREFIX="${CMAKE_BINARY_DIR}/boost;${CMAKE_BINARY_DIR}/boost/include;${CMAKE_BINARY_DIR}/external" | ||
-DCMAKE_FIND_ROOT_PATH="${CMAKE_BINARY_DIR}/boost;${CMAKE_BINARY_DIR}/boost/include;${CMAKE_BINARY_DIR}/external" | ||
-DCMAKE_INSTALL_RPATH=${CMAKE_BINARY_DIR}/external/lib | ||
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE | ||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/external | ||
-DCMAKE_INSTALL_LIBDIR=${CMAKE_BINARY_DIR}/external/lib) | ||
|
||
if(WITH_SYSTEM_BOOST) | ||
message(STATUS "thrift will be using system boost") | ||
set(dependencies "") | ||
list(APPEND thrift_CMAKE_ARGS -DBOOST_ROOT=/opt/ceph) | ||
list(APPEND thrift_CMAKE_ARGS -DCMAKE_FIND_ROOT_PATH=/opt/ceph) | ||
else() | ||
message(STATUS "thrift will be using external build boost") | ||
set(dependencies Boost) | ||
list(APPEND thrift_CMAKE_ARGS -DCMAKE_FIND_ROOT_PATH=${CMAKE_BINARY_DIR}/boost) | ||
list(APPEND thrift_CMAKE_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/external) | ||
endif() | ||
|
||
if(CMAKE_MAKE_PROGRAM MATCHES "make") | ||
# try to inherit command line arguments passed by parent "make" job | ||
set(make_cmd $(MAKE)) | ||
else() | ||
set(make_cmd ${CMAKE_COMMAND} --build <BINARY_DIR> --target thrift) | ||
endif() | ||
|
||
set(install_cmd $(MAKE) install DESTDIR=) | ||
|
||
include(ExternalProject) | ||
ExternalProject_Add(thrift | ||
SOURCE_DIR ${thrift_SOURCE_DIR} | ||
PREFIX "${CMAKE_BINARY_DIR}/external/thrift" | ||
CMAKE_ARGS ${thrift_CMAKE_ARGS} | ||
BINARY_DIR ${thrift_BINARY_DIR} | ||
BUILD_COMMAND ${make_cmd} | ||
INSTALL_COMMAND ${install_cmd} | ||
DEPENDS ${dependencies} | ||
) | ||
endfunction() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
function(build_yamlcpp) | ||
set(yaml-cpp_DOWNLOAD_DIR "${CMAKE_SOURCE_DIR}/src/jaegertracing") | ||
set(yaml-cpp_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/jaegertracing/yaml-cpp") | ||
set(yaml-cpp_BINARY_DIR "${CMAKE_BINARY_DIR}/external/yaml-cpp") | ||
|
||
set(yaml-cpp_CMAKE_ARGS -DBUILD_SHARED_LIBS=ON | ||
-DYAML_CPP_BUILD_TESTS=OFF | ||
-DYAML_CPP_BUILD_CONTRIB=OFF | ||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/external | ||
-DCMAKE_INSTALL_RPATH=${CMAKE_BINARY_DIR}/external/lib | ||
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE | ||
-DCMAKE_INSTALL_LIBDIR=${CMAKE_BINARY_DIR}/external/lib | ||
-DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/external) | ||
|
||
if(CMAKE_MAKE_PROGRAM MATCHES "make") | ||
# try to inherit command line arguments passed by parent "make" job | ||
set(make_cmd "$(MAKE)") | ||
else() | ||
set(make_cmd ${CMAKE_COMMAND} --build <BINARY_DIR> --target yaml-cpp) | ||
endif() | ||
set(install_cmd $(MAKE) install DESTDIR=) | ||
|
||
include(ExternalProject) | ||
ExternalProject_Add(yaml-cpp | ||
GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp.git" | ||
GIT_TAG "yaml-cpp-0.6.2" | ||
UPDATE_COMMAND "" | ||
INSTALL_DIR "${CMAKE_BINARY_DIR}/external" | ||
DOWNLOAD_DIR ${yaml-cpp_DOWNLOAD_DIR} | ||
SOURCE_DIR ${yaml-cpp_SOURCE_DIR} | ||
PREFIX "${CMAKE_BINARY_DIR}/external/yaml-cpp" | ||
CMAKE_ARGS ${yaml-cpp_CMAKE_ARGS} | ||
BUILD_COMMAND ${make_cmd} | ||
INSTALL_COMMAND ${install_cmd} | ||
) | ||
endfunction() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
function (set_library_properties_for_external_project _target _lib) | ||
# Manually create the directory, it will be created as part of the build, | ||
# but this runs in the configuration phase, and CMake generates an error if | ||
# we add an include directory that does not exist yet. | ||
set(_libfullname "${CMAKE_SHARED_LIBRARY_PREFIX}${_lib}${CMAKE_SHARED_LIBRARY_SUFFIX}") | ||
set(_libpath "${CMAKE_BINARY_DIR}/external/lib/${_libfullname}") | ||
set(_includepath "${CMAKE_BINARY_DIR}/external/include") | ||
message(STATUS "Configuring ${_target} with ${_libpath}") | ||
|
||
file(MAKE_DIRECTORY "${_includepath}") | ||
set_target_properties(${_target} PROPERTIES | ||
INTERFACE_LINK_LIBRARIES "${_libpath}" | ||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" | ||
IMPORTED_LOCATION "${_libpath}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${_includepath}") | ||
# set_property(TARGET ${_target} APPEND PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES "CXX") | ||
endfunction () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its