From fab9a4a98152bf312f9be4e2d58f3b458c7f1e2f Mon Sep 17 00:00:00 2001 From: ycwang Date: Mon, 15 Dec 2025 00:18:34 +0800 Subject: [PATCH] add meta-service deploy --- functionsystem/apps/cli/internal/stop/yr_stop.go | 4 ++-- .../runtime_manager/executor/runtime_executor.cpp | 2 +- scripts/config/meta_service/metaservice_config.json | 4 ++-- scripts/deploy/function_system/install.sh | 12 +++++------- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/functionsystem/apps/cli/internal/stop/yr_stop.go b/functionsystem/apps/cli/internal/stop/yr_stop.go index 441b0d7..df8834d 100644 --- a/functionsystem/apps/cli/internal/stop/yr_stop.go +++ b/functionsystem/apps/cli/internal/stop/yr_stop.go @@ -90,8 +90,8 @@ func yrStopYuanRong(cmd *cobra.Command, args []string) error { } var keywords = []string{ filepath.Join(yuanRongDir, "deploy", "process", "deploy.sh"), - filepath.Join(yuanRongDir, "function_system"), - filepath.Join(yuanRongDir, "data_system"), + filepath.Join(yuanRongDir, "functionsystem"), + filepath.Join(yuanRongDir, "datasystem"), filepath.Join(yuanRongDir, "third_party"), filepath.Join(yuanRongDir, "runtime"), } diff --git a/functionsystem/src/runtime_manager/executor/runtime_executor.cpp b/functionsystem/src/runtime_manager/executor/runtime_executor.cpp index fc5c42e..2b8280f 100644 --- a/functionsystem/src/runtime_manager/executor/runtime_executor.cpp +++ b/functionsystem/src/runtime_manager/executor/runtime_executor.cpp @@ -92,7 +92,7 @@ const std::string JAVA_SYSTEM_LIBRARY_PATH = "-Djava.library.path="; const std::string JAVA_LOG_LEVEL = "-DlogLevel="; const std::string JAVA_JOB_ID = "-DjobId=job-"; const std::string JAVA_MAIN_CLASS = "com.yuanrong.runtime.server.RuntimeServer"; -const std::string PYTHON_NEW_SERVER_PATH = "/python/fnruntime/server.py"; +const std::string PYTHON_NEW_SERVER_PATH = "/python/yr/main/yr_runtime_main.py"; const std::string YR_JAVA_RUNTIME_PATH = "/java/yr-runtime-1.0.0.jar"; const std::string POST_START_EXEC_REGEX = R"(^(uv )?pip3.[0-9]* install [a-zA-Z0-9\-\s:/\.=_]* && pip3.[0-9]* check$)"; // should be read from deploy request in the future diff --git a/scripts/config/meta_service/metaservice_config.json b/scripts/config/meta_service/metaservice_config.json index bdb8615..230eaa6 100644 --- a/scripts/config/meta_service/metaservice_config.json +++ b/scripts/config/meta_service/metaservice_config.json @@ -131,8 +131,8 @@ "dirDepthMax": 1, "ioReadTimeout": 100000 }, - "versionMax": {maxFunctionVersion}, - "instanceLabelMax": {maxInstanceLabel}, + "versionMax": 8, + "instanceLabelMax": 100, "aliasMax": 8, "layerMax": 1 }, diff --git a/scripts/deploy/function_system/install.sh b/scripts/deploy/function_system/install.sh index a05e626..0e4d765 100644 --- a/scripts/deploy/function_system/install.sh +++ b/scripts/deploy/function_system/install.sh @@ -427,14 +427,12 @@ function install_function_master() { } function install_metaservice() { - log_info "start metaservice, ip=${IP_ADDRESS}, port=${METASERVICE_PORT}..." + log_info "start metaservice, ip=${IP_ADDRESS}, port=${META_SERVICE_PORT}..." metaservice_config=${FUNCTION_SYSTEM_DIR}/config/meta_service/metaservice_config.json install_metaservice_config=${config_install_dir}/metaservice_config.json cp ${metaservice_config} ${install_metaservice_config} sed -i "s/{ip}/${IP_ADDRESS}/g" ${install_metaservice_config} - sed -i "s/{port}/${METASERVICE_PORT}/g" ${install_metaservice_config} - sed -i "s/{maxFunctionVersion}/${MAX_FUNCTION_VERSION}/g" ${install_metaservice_config} - sed -i "s/{maxInstanceLabel}/${MAX_INSTANCE_LABEL}/g" ${install_metaservice_config} + sed -i "s/{port}/${META_SERVICE_PORT}/g" ${install_metaservice_config} sed -i "s/{functionMasterAddr}/${IP_ADDRESS}:${GLOBAL_SCHEDULER_PORT}/g" ${install_metaservice_config} sed -i "s/{frontendAddr}/${IP_ADDRESS}:${FAAS_FRONTEND_HTTP_PORT}/g" ${install_metaservice_config} sed -i "s/{etcdAddr}/$(echo ${ETCD_CLUSTER_ADDRESS} | sed 's/,/","/g')/g" ${install_metaservice_config} @@ -478,13 +476,13 @@ function install_metaservice() { sed -i "s*{logConfigPath}*${metaservice_log_path}*g" ${metaservice_temp_log} sed -i "s/{logLevel}/${FS_LOG_LEVEL}/g" ${metaservice_temp_log} LD_LIBRARY_PATH=${FUNCTION_SYSTEM_DIR}/lib:${ld_library_path} \ - ${FUNCTION_SYSTEM_DIR}/bin/meta-service \ + ${FUNCTION_SYSTEM_DIR}/bin/meta_service \ --config_path="${install_metaservice_config}" \ --log_config_path="${metaservice_temp_log}" \ >>"${FS_LOG_PATH}/${NODE_ID}-metaservice${STD_LOG_SUFFIX}" 2>&1 & METASERVICE_PID=$! if metaservice_health_check ${METASERVICE_PID}; then - log_info "succeed to start metaservice process, ip=${IP_ADDRESS} port=${METASERVICE_PORT} pid=${METASERVICE_PID}" + log_info "succeed to start metaservice process, ip=${IP_ADDRESS} port=${META_SERVICE_PORT} pid=${METASERVICE_PID}" return 0 fi return 1 @@ -515,7 +513,7 @@ function install_function_system() { function_scheduler) install_function_scheduler ;; - metaservice) + meta_service) install_metaservice ;; *) -- Gitee