[improvement][launcher]Rename service and binary names

This commit is contained in:
jerryjzhang
2023-09-14 09:47:21 +08:00
parent 6a98ce9d28
commit b6d984475c
8 changed files with 25 additions and 25 deletions

View File

@@ -7,7 +7,7 @@ buildDir=$baseDir/build
cd $baseDir cd $baseDir
#1. build semantic chat service #1. build backend java modules
rm -fr ${buildDir}/*.tar.gz rm -fr ${buildDir}/*.tar.gz
rm -fr dist rm -fr dist
@@ -16,13 +16,13 @@ mvn -f $baseDir/../ clean package -DskipTests
#2. move package to build #2. move package to build
cp $baseDir/../launchers/standalone/target/*.tar.gz ${buildDir}/supersonic.tar.gz cp $baseDir/../launchers/standalone/target/*.tar.gz ${buildDir}/supersonic.tar.gz
#3. build webapp #3. build frontend webapp
chmod +x $baseDir/../webapp/start-fe-prod.sh chmod +x $baseDir/../webapp/start-fe-prod.sh
cd ../webapp cd ../webapp
sh ./start-fe-prod.sh sh ./start-fe-prod.sh
cp -fr ./supersonic-webapp.tar.gz ${buildDir}/ cp -fr ./supersonic-webapp.tar.gz ${buildDir}/
#4. copy webapp to java classpath
cd $buildDir cd $buildDir
tar xvf supersonic-webapp.tar.gz tar xvf supersonic-webapp.tar.gz
mv supersonic-webapp webapp mv supersonic-webapp webapp

View File

@@ -13,10 +13,10 @@ set "APP_NAME=standalone-service"
set "MAIN_CLASS=com.tencent.supersonic.StandaloneLauncher" set "MAIN_CLASS=com.tencent.supersonic.StandaloneLauncher"
set "python_path=python" set "python_path=python"
set "pip_path=pip3.9" set "pip_path=pip3"
set "llm_host=127.0.0.1" set "llm_host=127.0.0.1"
set "llm_port=9092" set "llm_port=9092"
set "start_name=api_service" set "start_name=supersonic-llmparser"
if "%module%"=="" ( if "%module%"=="" (

View File

@@ -38,56 +38,56 @@ echo $service
case "$command" in case "$command" in
start) start)
if [[ "$service" == "semantic" ]];then if [[ "$service" == "semantic" ]];then
echo -e "Starting semantic" echo -e "Starting semantic java service"
sh ${runtimeDir}/supersonic-semantic/bin/service.sh start sh ${runtimeDir}/supersonic-semantic/bin/service.sh start
elif [[ "$service" == "chat" ]];then elif [[ "$service" == "chat" ]];then
echo -e "Starting chat" echo -e "Starting chat java service"
sh ${runtimeDir}/supersonic-chat/bin/service.sh start sh ${runtimeDir}/supersonic-chat/bin/service.sh start
elif [[ "$service" == "llmparser" ]];then elif [[ "$service" == "llmparser" ]];then
echo -e "Starting LLM" echo -e "Starting llmparser python service"
sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh start sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh start
elif [[ -z "$service" ]]; then elif [[ -z "$service" ]]; then
echo -e "Starting supersonic" echo -e "Starting supersonic services"
sh ${runtimeDir}/supersonic-standalone/bin/service.sh start sh ${runtimeDir}/supersonic-standalone/bin/service.sh start
sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh start sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh start
else else
echo "Use command {semantic|semantic||} to run." echo "Use command {chat|semantic|llmparser} to run."
fi fi
;; ;;
stop) stop)
if [[ "$service" == "semantic" ]];then if [[ "$service" == "semantic" ]];then
echo -e "Stopping semantic" echo -e "Stopping semantic java service"
sh ${runtimeDir}/supersonic-semantic/bin/service.sh stop sh ${runtimeDir}/supersonic-semantic/bin/service.sh stop
elif [[ "$service" == "chat" ]];then elif [[ "$service" == "chat" ]];then
echo -e "Stopping chat" echo -e "Stopping chat java service"
sh ${runtimeDir}/supersonic-chat/bin/service.sh stop sh ${runtimeDir}/supersonic-chat/bin/service.sh stop
elif [[ "$service" == "llmparser" ]];then elif [[ "$service" == "llmparser" ]];then
echo -e "Stopping LLM" echo -e "Stopping llmparser python service"
sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh stop sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh stop
elif [[ -z "$service" ]]; then elif [[ -z "$service" ]]; then
echo -e "Stopping supersonic" echo -e "Stopping supersonic services"
sh ${runtimeDir}/supersonic-standalone/bin/service.sh stop sh ${runtimeDir}/supersonic-standalone/bin/service.sh stop
sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh stop sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh stop
else else
echo "Use command {semantic|semantic||} to run." echo "Use command {chat|semantic|llmparser} to run."
fi fi
;; ;;
restart) restart)
if [[ "$service" == "semantic" ]];then if [[ "$service" == "semantic" ]];then
echo -e "Restarting semantic" echo -e "Restarting semantic java service"
sh ${runtimeDir}/supersonic-semantic/bin/service.sh restart sh ${runtimeDir}/supersonic-semantic/bin/service.sh restart
elif [[ "$service" == "chat" ]];then elif [[ "$service" == "chat" ]];then
echo -e "Restarting chat" echo -e "Restarting chat java service"
sh ${runtimeDir}/supersonic-chat/bin/service.sh restart sh ${runtimeDir}/supersonic-chat/bin/service.sh restart
elif [[ "$service" == "llmparser" ]];then elif [[ "$service" == "llmparser" ]];then
echo -e "Restarting LLM" echo -e "Restarting llmparser python service"
sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh restart sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh restart
elif [[ -z "$service" ]]; then elif [[ -z "$service" ]]; then
echo -e "Restarting supersonic" echo -e "Restarting supersonic services"
sh ${runtimeDir}/supersonic-standalone/bin/service.sh restart sh ${runtimeDir}/supersonic-standalone/bin/service.sh restart
sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh restart sh ${runtimeDir}/supersonic-standalone/llm/bin/service.sh restart
else else
echo "Use command {semantic|semantic||} to run." echo "Use command {chat|semantic|llmparser} to run."
fi fi
;; ;;
*) *)

View File

@@ -1,7 +1,7 @@
# python path # python path
export python_path="/usr/local/bin/python3.9" export python_path="/usr/local/bin/python3"
# pip path # pip path
export pip_path="/usr/local/bin/pip3.9" export pip_path="/usr/local/bin/pip3"
# host # host
export llm_host="127.0.0.1" export llm_host="127.0.0.1"
# port # port

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 KiB

After

Width:  |  Height:  |  Size: 182 KiB

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export APP_NAME=chat-service export APP_NAME=supersonic-chat
export MAIN_CLASS=com.tencent.supersonic.ChatLauncher export MAIN_CLASS=com.tencent.supersonic.ChatLauncher

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export APP_NAME=semantic-service export APP_NAME=supersonic-semantic
export MAIN_CLASS=com.tencent.supersonic.SemanticLauncher export MAIN_CLASS=com.tencent.supersonic.SemanticLauncher

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export APP_NAME=chat-service export APP_NAME=supersonic-standalone
export MAIN_CLASS=com.tencent.supersonic.StandaloneLauncher export MAIN_CLASS=com.tencent.supersonic.StandaloneLauncher