diff --git a/cpp/.gitignore b/cpp/.gitignore index b9ba83ac8aacd24a907adfcc86d96d5864b89227..d8368bd79b028f707cc0acba2174ae91cc128944 100644 --- a/cpp/.gitignore +++ b/cpp/.gitignore @@ -1,4 +1,5 @@ milvus/ conf/server_config.yaml +conf/log_config.conf version.h megasearch/ diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 05cbc1db64f4617fe8b940969dd8b538f7419118..98c493b9a95a292c77d8d253dd94f02ef8601166 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -141,6 +141,10 @@ endif(BUILD_UNIT_TEST) add_custom_target(Clean-All COMMAND ${CMAKE_BUILD_TOOL} clean) +set(MILVUS_PATH "/tmp/milvus") +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf/server_config.template ${CMAKE_CURRENT_SOURCE_DIR}/conf/server_config.yaml) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf/log_config.template ${CMAKE_CURRENT_SOURCE_DIR}/conf/log_config.conf) + #install install(FILES scripts/start_server.sh @@ -153,4 +157,6 @@ install(FILES DESTINATION conf) + + config_summary() diff --git a/cpp/conf/log_config.conf b/cpp/conf/log_config.conf index 80710b570e92c5b4cb8418204f448261ceb5082c..29d46a7fe5e4a24a8c9406ce6a4e424ce7733620 100644 --- a/cpp/conf/log_config.conf +++ b/cpp/conf/log_config.conf @@ -20,8 +20,8 @@ TO_STANDARD_OUTPUT = false ## Error logs * ERROR: - ENABLED = false + ENABLED = true FILENAME = "/tmp/milvus/logs/milvus-%datetime{%H:%m}-error.log" * FATAL: - ENABLED = false - FILENAME = "/tmp/milvus/logs/milvus-%datetime{%H:%m}-fatal.log" \ No newline at end of file + ENABLED = true + FILENAME = "/tmp/milvus/logs/milvus-%datetime{%H:%m}-fatal.log" diff --git a/cpp/conf/log_config.template b/cpp/conf/log_config.template new file mode 100644 index 0000000000000000000000000000000000000000..ce421bac531850c6c10f9150e47ef9f81e80da38 --- /dev/null +++ b/cpp/conf/log_config.template @@ -0,0 +1,27 @@ +* GLOBAL: + FORMAT = "%datetime | %level | %logger | %msg" + FILENAME = "@MILVUS_PATH@/logs/milvus-%datetime{%H:%m}-global.log" + ENABLED = true + TO_FILE = true + TO_STANDARD_OUTPUT = false + SUBSECOND_PRECISION = 3 + PERFORMANCE_TRACKING = false + MAX_LOG_FILE_SIZE = 2097152 ## Throw log files away after 2MB +* DEBUG: + FILENAME = "@MILVUS_PATH@/logs/milvus-%datetime{%H:%m}-debug.log" + ENABLED = true +* WARNING: + FILENAME = "@MILVUS_PATH@/logs/milvus-%datetime{%H:%m}-warning.log" +* TRACE: + FILENAME = "@MILVUS_PATH@/logs/milvus-%datetime{%H:%m}-trace.log" +* VERBOSE: + FORMAT = "%datetime{%d/%M/%y} | %level-%vlevel | %msg" + TO_FILE = false + TO_STANDARD_OUTPUT = false +## Error logs +* ERROR: + ENABLED = true + FILENAME = "@MILVUS_PATH@/logs/milvus-%datetime{%H:%m}-error.log" +* FATAL: + ENABLED = true + FILENAME = "@MILVUS_PATH@/logs/milvus-%datetime{%H:%m}-fatal.log" \ No newline at end of file diff --git a/cpp/conf/server_config.template b/cpp/conf/server_config.template new file mode 100644 index 0000000000000000000000000000000000000000..b5f6ee29931c7f1bc61910e6a8b794e5932aff9a --- /dev/null +++ b/cpp/conf/server_config.template @@ -0,0 +1,28 @@ +server_config: + address: 0.0.0.0 + port: 19530 # the port milvus listen to, default: 19530, range: 1025 ~ 65534 + gpu_index: 0 # the gpu milvus use, default: 0, range: 0 ~ gpu number - 1 + mode: single # milvus deployment type: single, cluster + +db_config: + db_path: @MILVUS_PATH@ # milvus data storage path + db_backend_url: http://127.0.0.1 # meta database uri + index_building_threshold: 1024 # index building trigger threshold, default: 1024, unit: MB + archive_disk_threshold: 512 # triger archive action if storage size exceed this value, unit: GB + archive_days_threshold: 30 # files older than x days will be archived, unit: day + +metric_config: + is_startup: off # if monitoring start: on, off + collector: prometheus # metrics collector: prometheus + prometheus_config: # following are prometheus configure + collect_type: pull # prometheus collect data method + port: 8080 # the port prometheus use to fetch metrics + push_gateway_ip_address: 127.0.0.1 # push method configure: push gateway ip address + push_gateway_port: 9091 # push method configure: push gateway port + + +license_config: # license configure + license_path: "@MILVUS_PATH@/system.license" # license file path + +cache_config: # cache configure + cpu_cache_capacity: 16 # how many memory are used as cache, unit: GB, range: 0 ~ less than total memory \ No newline at end of file diff --git a/cpp/conf/server_config.yaml b/cpp/conf/server_config.yaml index 1c26c0aa521dfd47476fa1eec0a1594cd2a1f821..90194619400afa148508a9a03401e252cdeba84c 100644 --- a/cpp/conf/server_config.yaml +++ b/cpp/conf/server_config.yaml @@ -22,7 +22,7 @@ metric_config: license_config: # license configure - license_path: "/tmp/system.license" # license file path + license_path: "/tmp/milvus/system.license" # license file path cache_config: # cache configure - cpu_cache_capacity: 16 # how many memory are used as cache, unit: GB, range: 0 ~ less than total memory \ No newline at end of file + cpu_cache_capacity: 16 # how many memory are used as cache, unit: GB, range: 0 ~ less than total memory