dataCenter update

This commit is contained in:
Ubuntu 2024-01-30 12:04:28 +08:00
parent a05f69fed4
commit 5f7ae326bc
4 changed files with 25 additions and 9 deletions

View File

@ -1,5 +1,5 @@
SHELL=/bin/bash
JAVA_HOME=/usr/lib/jvm/java-1.17.0-openjdk-amd64/
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
SSH_AUTH_SOCK=/tmp/ssh-U6ap8c5J2x/agent.4132
PWD=/home/ubuntu/data/shell/autoDeploy
LOGNAME=ubuntu
@ -18,7 +18,7 @@ USER=ubuntu
LC_TERMINAL_VERSION=3.4.16
SHLVL=1
XDG_SESSION_ID=19
CLASSPATH=.:/usr/lib/jvm/java-1.17.0-openjdk-amd64//lib:/lib
CLASSPATH=.:/usr/lib/jvm/java-11-openjdk-amd64/lib:/lib
XDG_RUNTIME_DIR=/run/user/1001
SSH_CLIENT=192.168.96.16 60271 22
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop

View File

@ -3,8 +3,7 @@
PATH=$PATH:/usr/bin/:/usr/local/bin/:/usr/sbin
dataCenterPath=$1
profile=$2
jars=( data-collection\
abc\
jars=( \
data-metadata-collect-fileset\
data-metadata-collect\
data-metadata-collect\
@ -15,26 +14,43 @@ jars=( data-collection\
data-sources\
data-standard\
data-metadata-interface\
#data-asset\
data-asset\
data-quality\
)
function startModule()
{
moduleName=$1
if [ ! -f "jars/${moduleName}.jar" ];then
if [ ! -f "${moduleName}.jar" ];then
echo "startDtaCenter 文件 ${moduleName}.jar 不存在1!"
else
#${JAVA_HOME}bin/java -Xms256m -Xmx512m -Xss512K -Dspring.profiles.active=${profile} -Dspring.config.location=file:${dataCenterPath}/config/ -jar jars/${moduleName}.jar &
/usr/bin/java -Dspring.profiles.active=${profile} -jar jars/${moduleName}.jar &
/usr/bin/java -Dspring.profiles.active=${profile} -jar ${moduleName}.jar &
# > logs/${moduleName}.log &
echo "${!}" > pids/common/${moduleName}.pid
fi
sleep 1
}
function checkDir()
{
directory_path=$1
if [ ! -d "$directory_path" ]; then
echo "目录不存在,正在创建..."
mkdir -p "$directory_path"
echo "目录创建成功!"
else
echo "目录已经存在。"
fi
}
function main(){
cd ${dataCenterPath}
checkDir "logs"
checkDir "pids"
for jar in ${jars[@]}
do
startModule $jar

View File

@ -7,8 +7,8 @@ profile=$2
function startModule()
{
moduleName=$1
if [ ! -f jars/"$moduleName".jar ];then
echo startDtaCenter 文件 $(pwd)/jars/${moduleName} 不存在1!
if [ ! -f "$moduleName".jar ];then
echo startDtaCenter 文件 $(pwd)/${moduleName} 不存在1!
exit 0
fi

0
startDataCenterBase2.sh Normal file → Executable file
View File