From f4035c66ca267dc42b28d5862ab9be82b5f9a4a5 Mon Sep 17 00:00:00 2001 From: SbloodyS <460888207@qq.com> Date: Tue, 25 Jun 2024 14:02:45 +0800 Subject: [PATCH] fix issue 16174 --- script/env/install_env.sh | 63 --------------------------------------- script/install.sh | 58 ----------------------------------- 2 files changed, 121 deletions(-) delete mode 100644 script/env/install_env.sh delete mode 100755 script/install.sh diff --git a/script/env/install_env.sh b/script/env/install_env.sh deleted file mode 100644 index 8de1c78637f2..000000000000 --- a/script/env/install_env.sh +++ /dev/null @@ -1,63 +0,0 @@ -# -# 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. -# - -# --------------------------------------------------------- -# INSTALL MACHINE -# --------------------------------------------------------- -# A comma separated list of machine hostname or IP would be installed DolphinScheduler, -# including master, worker, api, alert. If you want to deploy in pseudo-distributed -# mode, just write a pseudo-distributed hostname -# Example for hostnames: ips="ds1,ds2,ds3,ds4,ds5", Example for IPs: ips="192.168.8.1,192.168.8.2,192.168.8.3,192.168.8.4,192.168.8.5" -ips=${ips:-"ds1,ds2,ds3,ds4,ds5"} - -# Port of SSH protocol, default value is 22. For now we only support same port in all `ips` machine -# modify it if you use different ssh port -sshPort=${sshPort:-"22"} - -# A comma separated list of machine hostname or IP would be installed Master server, it -# must be a subset of configuration `ips`. -# Example for hostnames: masters="ds1,ds2", Example for IPs: masters="192.168.8.1,192.168.8.2" -masters=${masters:-"ds1,ds2"} - -# A comma separated list of machine : or :.All hostname or IP must be a -# subset of configuration `ips`, And workerGroup have default value as `default`, but we recommend you declare behind the hosts -# Example for hostnames: workers="ds1:default,ds2:default,ds3:default", Example for IPs: workers="192.168.8.1:default,192.168.8.2:default,192.168.8.3:default" -workers=${workers:-"ds1:default,ds2:default,ds3:default,ds4:default,ds5:default"} - -# A comma separated list of machine hostname or IP would be installed Alert server, it -# must be a subset of configuration `ips`. -# Example for hostname: alertServer="ds3", Example for IP: alertServer="192.168.8.3" -alertServer=${alertServer:-"ds3"} - -# A comma separated list of machine hostname or IP would be installed API server, it -# must be a subset of configuration `ips`. -# Example for hostname: apiServers="ds1", Example for IP: apiServers="192.168.8.1" -apiServers=${apiServers:-"ds1"} - -# The directory to install DolphinScheduler for all machine we config above. It will automatically be created by `install.sh` script if not exists. -# Do not set this configuration same as the current path (pwd). Do not add quotes to it if you using related path. -installPath=${installPath:-"/tmp/dolphinscheduler"} - -# The user to deploy DolphinScheduler for all machine we config above. For now user must create by yourself before running `install.sh` -# script. The user needs to have sudo privileges and permissions to operate hdfs. If hdfs is enabled than the root directory needs -# to be created by this user -deployUser=${deployUser:-"dolphinscheduler"} - -# The root of zookeeper, for now DolphinScheduler default registry server is zookeeper. -# It will delete ${zkRoot} in the zookeeper when you run install.sh, so please keep it same as registry.zookeeper.namespace in yml files. -# Similarly, if you want to modify the value, please modify registry.zookeeper.namespace in yml files as well. -zkRoot=${zkRoot:-"/dolphinscheduler"} diff --git a/script/install.sh b/script/install.sh deleted file mode 100755 index d36f90a3f3dd..000000000000 --- a/script/install.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# -# 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` -baseDir=`cd ${workDir}/..;pwd` - -source ${workDir}/env/install_env.sh -source ${workDir}/env/dolphinscheduler_env.sh - -echo "1.create directory" - -# If install Path equal to "/" or related path is "/" or is empty, will cause directory "/bin" be overwrite or file adding, -# so we should check its value. Here use command `realpath` to get the related path, and it will skip if your shell env -# without command `realpath`. -if [ ${baseDir} = $installPath ]; then - echo "Fatal: The installPath can not be same as the current path: ${installPath}" - exit 1 -elif [ ! -d $installPath ];then - sudo mkdir -p $installPath - sudo chown -R $deployUser:$deployUser $installPath -elif [[ -z "${installPath// }" || "${installPath// }" == "/" || ( $(command -v realpath) && $(realpath -s "${installPath}") == "/" ) ]]; then - echo "Parameter installPath can not be empty, use in root path or related path of root path, currently use ${installPath}" - exit 1 -fi - -echo "2.scp resources" -bash ${workDir}/scp-hosts.sh -if [ $? -eq 0 ];then - echo 'scp copy completed' -else - echo 'scp copy failed to exit' - exit 1 -fi - -echo "3.stop server" -bash ${workDir}/stop-all.sh - -echo "4.delete zk node" -bash ${workDir}/remove-zk-node.sh $zkRoot - -echo "5.startup" -bash ${workDir}/start-all.sh