]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: update for ceph-mgr
authorJohn Spray <john.spray@redhat.com>
Thu, 30 Jun 2016 13:04:30 +0000 (14:04 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 29 Sep 2016 16:26:56 +0000 (17:26 +0100)
Signed-off-by: John Spray <john.spray@redhat.com>
CMakeLists.txt
src/CMakeLists.txt
src/mon/CMakeLists.txt

index 0c19e2463e73a1c65ca877e8b9e860c555085aa6..aaaab4e4b20ba96000a59beac8da8ef33f793275 100644 (file)
@@ -329,6 +329,14 @@ option(WITH_RADOSGW "Rados Gateway is enabled" ON)
 #option for CephFS
 option(WITH_CEPHFS "CephFS is enabled" ON)
 
+#option for Mgr
+option(WITH_MGR "ceph-mgr is enabled" ON)
+if(WITH_MGR)
+    set(Python_ADDITIONAL_VERSIONS 2.7)
+    find_package(PythonLibs 2.7 REQUIRED)
+    find_package(Boost COMPONENTS python REQUIRED)
+endif(WITH_MGR)
+
 option(WITH_THREAD_SAFE_RES_QUERY "res_query is thread safe" OFF)
 if(WITH_THREAD_SAFE_RES_QUERY)
     set(HAVE_THREAD_SAFE_RES_QUERY 1 CACHE INTERNAL "Thread safe res_query supported.")
index 0d6586c8843c705de8c3287c070fd8f3c430cf3b..de1713c0ebb6f26ea876b9e438d18735c1028d71 100644 (file)
@@ -369,6 +369,7 @@ set(libcommon_files
   mon/MonCap.cc
   mon/MonClient.cc
   mon/MonMap.cc
+  mgr/MgrClient.cc
   msg/simple/Accepter.cc
   msg/DispatchQueue.cc
   msg/Message.cc
@@ -513,6 +514,24 @@ add_subdirectory(include)
 add_subdirectory(librados)
 add_subdirectory(libradosstriper)
 
+if (WITH_MGR)
+  set(mgr_srcs
+      ceph_mgr.cc
+      mgr/DaemonMetadata.cc
+      mgr/DaemonServer.cc
+      mgr/ClusterState.cc
+      mgr/PyModules.cc
+      mgr/PyFormatter.cc
+      mgr/PyState.cc
+      mgr/MgrPyModule.cc
+      mgr/Mgr.cc)
+  add_executable(ceph-mgr ${mgr_srcs}
+                 $<TARGET_OBJECTS:heap_profiler_objs>)
+  target_include_directories(ceph-mgr PRIVATE "${PYTHON_INCLUDE_DIRS}")
+  target_link_libraries(ceph-mgr mds osdc global
+      -lboost_python ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${TCMALLOC_LIBS})
+endif (WITH_MGR)
+
 set(librados_config_srcs
   librados-config.cc)
 add_executable(librados-config ${librados_config_srcs})
@@ -842,6 +861,7 @@ add_subdirectory(brag)
 add_custom_target(vstart DEPENDS
     ceph-osd
     ceph-mon
+    ceph-mgr
     ceph-authtool
     ceph-conf
     monmaptool
index 05980e18ff43d629c8eb3988038e9905cd856bb3..e901a0c26b08440bcfadeb1bc1e581355be54aee 100644 (file)
@@ -11,6 +11,7 @@ set(lib_mon_srcs
   PaxosService.cc
   OSDMonitor.cc
   MDSMonitor.cc
+  MgrMonitor.cc
   MonmapMonitor.cc
   LogMonitor.cc
   AuthMonitor.cc