常见问题

手把手教你源码安装 Dolphin Scheduler 作业调度系统(作业调度程序)新鲜出炉,

时间:2024-06-27 21:09:17 来源:快捷一键重装官网 人气:65

核心提示: Apache DolphinScheduler 是一个分布式去中心化,易扩展的可视化DAG开源工作流任务调度平台,今年8月份最新发布了 3.0....

Apache DolphinScheduler 是两个分布式控制系统去虚拟化,易扩充的建模DAG开放源码组织工作流任务运维网络平台,去年8月末新一代正式发布了 3.0.0-release 版。责任编辑如是说怎样透过源代码校对的加装形式,对 DolphinScheduler 3.0.0-release 展开伪软件产业布署,此次布署采用 MySQL 8 做为 DolphinScheduler 的元资料库。

相连加装好的 MySQL 统计数据笔记本电脑是不是重装控制系统库,为 DS 建立资料库和采用者

特别注意:MySQL 8 预设不容许应用流程从伺服器以获取私钥,假如其中网自然环境下能透过实用性: allowPublicKeyRetrieval=true 绕开

CREATE DATABASE dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; CREATE USER dolphin@% IDENTIFI笔记本电脑是不是重装控制系统ED BY dolphin; GRANT ALL PRIVILEGES ON dolphinscheduler.* TO dolphin@%; CREATE USER dolphin@localhost IDENTIFIED BY dolphin; GRANT ALL PRIVILEGES ON dolphinscheduler.* TO dolphin@localhost; FLUSH PRIVILEGES;

验证资料库和采用者建立成功。

方便快捷全屏重装控制系统

加装并启笔记本电脑是不是重装控制系统动 Zookeeper

下载地址:

https://www.apache.org/dyn/closer.lua/zookeeper/zookeeper-3.8.0/apache-zookeeper-3.8.0-bin.tar.gz

克隆 DolphinScheduler 源代码

DS 的源代码地址是:

https://github.com/apache/dolphinscheduler,透过 Fork 到自己的笔记本电脑是不是重装控制系统 Git Rrepositories 中,能维护两个属于自己的 DolphinScheduler 项目。
方便快捷全屏重装控制系统

Fork 成功之后,就能透过 git clone 命令,将自己 Repositories 中的 DS 项目克隆下来,并且切换到 3.0.0-release 分支。

git clone git@github.com:your_git/dolphinscheduler.git git ch笔记本电脑是不是重装控制系统eckout3.0.0-release

采用 Intelli IDEA 打开上一步克隆好的 DS 项目

方便快捷全屏重装控制系统

修改 pom.xml 文件

将 mysql-connector-java 的 <scope>test</scope> 删掉。因为我们采用 MySQL 8 做为 DS 元资料库,要用到 mysql-connector-java 这个 jar 包相连 MySQL,假如不删掉这行的话,打完包会少这个 jar笔记本电脑是不是重装控制系统 文件。

方便快捷全屏重装控制系统

编辑自然环境实用性文件

1.编辑 script/env/install_env.sh

由于是伪软件产业布署的布署形式,将主机名称都改成 localhost。设置 installPath 的路径为 DS 的加装目录:/home/dolphin/software/apache-dolphinscheduler-3.0.1-SNAPSHOT-bin/

# # Licensed to the Apache Soft笔记本电脑是不是重装控制系统ware 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 thi笔记本电脑是不是重装控制系统s 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 K笔记本电脑是不是重装控制系统IND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # --------------------------------------------------------- # INSTAL笔记本电脑是不是重装控制系统L MACHINE # --------------------------------------------------------- # A comma separated list of machine hostname or IP would be installed DolphinScheduler, # including master, worker, api, alert. If yo笔记本电脑是不是重装控制系统u 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:-"localhost"} # 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: mas笔记本电脑是不是重装控制系统ters="192.168.8.1,192.168.8.2" masters=${masters:-"localhost"} # A comma separated list of machine <hostname>:<workerGroup> or <IP>:<workerGroup>.All hostname or IP must be a # subset of configuration `i笔记本电脑是不是重装控制系统ps`, 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:-"localhost: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:-"localhost"} # A comma separated list of machine hostname or IP wo笔记本电脑是不是重装控制系统uld 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:-"localhost"} # The di笔记本电脑是不是重装控制系统rectory 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:-"/home/dolphin/software/apache-dolphinscheduler-3.0.1-SNAPSHOT-bin/"} # The user to deploy DolphinScheduler for all machi笔记本电脑是不是重装控制系统ne 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 d笔记本电脑是不是重装控制系统irectory needs # to be created by this user deployUser=${deployUser:-"dolphin"} # The root of zookeeper, for now DolphinScheduler default registry server is zookeeper. zkRoot=${zkRoot:-"/dolphinscheduler"笔记本电脑是不是重装控制系统}

2.编辑

script/env/dolphinscheduler_env.sh

将 “export DATABASE=${DATABASE:-postgresql}” 改成 “export DATABASE=${DATABASE:-mysql}”,表示采用 mysql 做为元资料库。其它自然环境变量,根据情况展开相应的设置。

# # Licensed to the Apache Software Found笔记本电脑是不是重装控制系统ation (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/L笔记本电脑是不是重装控制系统ICENSE-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, eithe笔记本电脑是不是重装控制系统r express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # JAVA_HOME, will use it to start DolphinScheduler server export JAVA_HOME=${JA笔记本电脑是不是重装控制系统VA_HOME:-/usr/lib/jvm/java-1.8.0} # Database related configuration, set database type, username and password export DATABASE=${DATABASE:-mysql} export SPRING_PROFILES_ACTIVE=${DATABASE} exportSPRING_DATASOU笔记本电脑是不是重装控制系统RCE_URL="jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8&useSSL=false&allowPublicKeyRetrieval=true" export SPRING_DATASOURCE_USERNAME=dolphin exportSPRING_DATASOURCE_笔记本电脑是不是重装控制系统PASSWORD=dolphin# DolphinScheduler server related configuration export SPRING_CACHE_TYPE=${SPRING_CACHE_TYPE:-none} export SPRING_JACKSON_TIME_ZONE=${SPRING_JACKSON_TIME_ZONE:-UTC} exportMASTER_FETCH_COMMA笔记本电脑是不是重装控制系统ND_NUM=${MASTER_FETCH_COMMAND_NUM:-10} # Registry center configuration, determines the type and link of the registry center export REGISTRY_TYPE=${REGISTRY_TYPE:-zookeeper} exportREGISTRY_ZOOKEEPER_CONNEC笔记本电脑是不是重装控制系统T_STRING=${REGISTRY_ZOOKEEPER_CONNECT_STRING:-localhost:2181} # Tasks related configurations, need to change the configuration if you use the related tasks. export HADOOP_HOME=${HADOOP_HOME:-/opt/apps/HA笔记本电脑是不是重装控制系统DOOP-COMMON/hadoop-common-current/} export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/opt/apps/HADOOP-COMMON/hadoop-common-current/etc/hadoop} export SPARK_HOME1=${SPARK_HOME1:-/opt/apps/SPARK2/spark2-current} ex笔记本电脑是不是重装控制系统port SPARK_HOME2=${SPARK_HOME2:-/opt/apps/SPARK2/spark2-current} export PYTHON_HOME=${PYTHON_HOME:-/usr/bin/python3} export HIVE_HOME=${HIVE_HOME:-/opt/apps/HIVE/hive-current} export FLINK_HOME=${FLINK_HOME:笔记本电脑是不是重装控制系统-/opt/soft/flink} export DATAX_HOME=${DATAX_HOME:-/opt/soft/datax} export PATH=$HADOOP_HOME/bin:$SPARK_HOME1/bin:$SPARK_HOME2/bin:$PYTHON_HOME/bin:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_HOME笔记本电脑是不是重装控制系统/bin:$PATH

透过 Maven 命令打包

mvn clean install -Prelease -Dmaven.test.skip=true

打包成功后,能在以下路径,找到 DS 加装包:dolphinscheduler-dist/target/apache-dolphinscheduler-3.0.1-SNAPSHOT-bin.tar.gz

方便快捷全屏重装控制系统

将该加装包解压到与前面 script/env/ins笔记本电脑是不是重装控制系统tall_env.sh 加装实用性一致的目录:/home/dolphin/software/apache-dolphinscheduler-3.0.1-SNAPSHOT-bin/

加装 DolphinScheduler

将目录切换到上述 DS 加装路径下,执行以下命令,加装 DS。

bash bin/install.sh
方便快捷全屏重装控制系统
方便快捷全屏重装控制系统

透过 jps 命令,验证 DS 相关的服务都正常启动了。

方便快捷全屏重装控制系统

透过浏览器,登录 Dolphin笔记本电脑是不是重装控制系统 Scheduler 界面

预设采用者名 / 密码:admin / dolphinscheduler123

方便快捷全屏重装控制系统

参考文档:

https://dolphinscheduler.apache.org/zh-cn/docs/latest/user_doc/guide/installation/pseudo-cluster.html