修改部署脚本和配置,部署到0.16服务器上
This commit is contained in:
parent
141673020d
commit
658c554c8c
|
|
@ -21,11 +21,11 @@ spring:
|
||||||
password: nacos
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@ spring:
|
||||||
password: nacos
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,11 @@ for source_jar in "${app_source_jars[@]}"; do
|
||||||
new_filename="${base_name}${suffix}.jar"
|
new_filename="${base_name}${suffix}.jar"
|
||||||
echo "filename:$new_filename"
|
echo "filename:$new_filename"
|
||||||
|
|
||||||
scp -P 22 -r ${app_workspace}/${source_jar} "root@192.168.0.16:$deploy_path/$new_filename"
|
scp "root@192.168.0.56:"${app_workspace}/${source_jar} "$deploy_path/$new_filename"
|
||||||
echo "copied ${app_workspace}/${source_jar} to '$deploy_path/$new_filename'"
|
echo "copied ${app_workspace}/${source_jar} to '$deploy_path/$new_filename'"
|
||||||
done
|
done
|
||||||
|
|
||||||
scp -P 22 -r ${ai_workspace}/"bonus-modules/bonus-ai/target/bonus-modules-ai-v2.jar" root@192.168.0.16:$deploy_path
|
scp "root@192.168.0.56:"${ai_workspace}/"bonus-modules/bonus-ai/target/bonus-modules-ai-v2.jar" $deploy_path
|
||||||
echo "copied ${app_workspace}/${source_jar} to $deploy_path"
|
echo "copied ${app_workspace}/${source_jar} to $deploy_path"
|
||||||
|
|
||||||
# Define an array of JAR files to run
|
# Define an array of JAR files to run
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@ spring:
|
||||||
password: nacos
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,11 @@ spring:
|
||||||
password: nacos
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@ spring:
|
||||||
password: nacos
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@ spring:
|
||||||
password: nacos
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Define an array of JAR files to run
|
||||||
|
jars=("bonus-auth-ai-v2.jar --spring.config.location=file:auth_bootstrap.yml"
|
||||||
|
"bonus-gateway-ai-v2.jar --spring.config.location=file:gateway_bootstrap.yml"
|
||||||
|
"bonus-system-ai-v2.jar --spring.config.location=file:system_bootstrap.yml"
|
||||||
|
"bonus-file-ai-V2.jar --spring.config.location=file:file_bootstrap.yml")
|
||||||
|
|
||||||
|
# 遍历数组并检查每个JAR文件的进程
|
||||||
|
for jar_with_args in "${jars[@]}"; do
|
||||||
|
# 提取JAR文件名(不包括参数)
|
||||||
|
jar=$(echo $jar_with_args | awk '{print $1}')
|
||||||
|
|
||||||
|
# 检查进程是否启动
|
||||||
|
echo "原应用程序1 $jar "
|
||||||
|
pids=$(pgrep -f $jar || true)
|
||||||
|
echo "原应用程序2 $jar "
|
||||||
|
if [ -n "$pids" ]; then
|
||||||
|
echo "$jar is running with PID(s): $pids"
|
||||||
|
# 杀死进程
|
||||||
|
for pid in $pids; do
|
||||||
|
kill -9 $pid
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "Process $pid for $jar killed successfully"
|
||||||
|
else
|
||||||
|
echo "Failed to kill process $pid for $jar"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "$jar is not running"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
@ -16,11 +16,11 @@ spring:
|
||||||
password: nacos
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:18848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: bonus-ai
|
namespace: bonus-ai
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,12 @@ spring:
|
||||||
password: nacos
|
password: nacos
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 192.168.0.56:8848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: 39c95294-eb64-4096-ada1-30a215bdd511
|
namespace: bonus-ai
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 192.168.0.56:8848
|
server-addr: 192.168.0.16:18848
|
||||||
namespace: 39c95294-eb64-4096-ada1-30a215bdd511
|
namespace: bonus-ai
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue