From 583a6155190ed12dddfca39194290a320c42018c Mon Sep 17 00:00:00 2001 From: zhuangchong <37063904+zhuangchong@users.noreply.github.com> Date: Thu, 30 Jul 2020 18:30:57 +0800 Subject: [PATCH] [Improvement][install] The new shell script is used to view the server processes of nodes #3347 (#3348) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dev 开发环境变量 * add status-all.sh ,used to view the server processes of nodes. * update. * update. * update. * add status-all.sh ,used to view the server processes of nodes. Co-authored-by: unknown --- dolphinscheduler-dist/pom.xml | 1 + .../main/assembly/dolphinscheduler-binary.xml | 1 + .../main/assembly/dolphinscheduler-nginx.xml | 1 + install.sh | 6 ++- script/status-all.sh | 41 +++++++++++++++++++ 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 script/status-all.sh diff --git a/dolphinscheduler-dist/pom.xml b/dolphinscheduler-dist/pom.xml index ca3834e90b..b193dd85c8 100644 --- a/dolphinscheduler-dist/pom.xml +++ b/dolphinscheduler-dist/pom.xml @@ -318,6 +318,7 @@ start-all.sh stop-all.sh dolphinscheduler-daemon.sh + status-all.sh diff --git a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-binary.xml b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-binary.xml index 28bbb361cd..9b61c5e094 100644 --- a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-binary.xml +++ b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-binary.xml @@ -189,6 +189,7 @@ start-all.sh stop-all.sh dolphinscheduler-daemon.sh + status-all.sh ./bin diff --git a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-nginx.xml b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-nginx.xml index f41151cd09..b47a0ae393 100644 --- a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-nginx.xml +++ b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-nginx.xml @@ -197,6 +197,7 @@ start-all.sh stop-all.sh dolphinscheduler-daemon.sh + status-all.sh ./bin diff --git a/install.sh b/install.sh index b904f68f8e..ae16a1d199 100755 --- a/install.sh +++ b/install.sh @@ -97,4 +97,8 @@ sh ${workDir}/script/remove-zk-node.sh $zkRoot # 6.startup echo "6.startup" -sh ${workDir}/script/start-all.sh \ No newline at end of file +sh ${workDir}/script/start-all.sh + +# 7.query status +echo "7.query status" +sh ${workDir}/script/status-all.sh diff --git a/script/status-all.sh b/script/status-all.sh new file mode 100644 index 0000000000..64dfaa46b8 --- /dev/null +++ b/script/status-all.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +workDir=`dirname $0` +workDir=`cd ${workDir};pwd` +source $workDir/../conf/config/install_config.conf + +echo -e '\n' +echo "====================== dolphinscheduler install config=============================" +echo -e "1.dolphinscheduler server node install hosts:[ \033[1;32m ${ips} \033[0m ]" +echo -e "2.master server node install hosts:[ \033[1;32m ${masters} \033[0m ]" +echo -e "3.worker server node install hosts:[ \033[1;32m ${workers} \033[0m ]" +echo -e "4.alert server node install hosts:[ \033[1;32m ${alertServer} \033[0m ]" +echo -e "5.api server node install hosts:[ \033[1;32m ${apiServers} \033[0m ]" + +echo -e '\n' + + +ipsHost=(${ips//,/ }) +for ip in ${ipsHost[@]} +do + echo -e "====================== [ \033[1;32m ${ip} \033[0m ] node all servers ==========================" + ssh -p $sshPort $ip "jps" + echo -e '\n' +done +