DolphinScheduler安装部署

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介: DolphinScheduler安装部署

3.2 前置准备工作
1)三台节点均需部署JDK(1.8+),并配置相关环境变量。
2)需部署数据库,支持MySQL(5.7+)或者PostgreSQL(8.2.15+)。
3)需部署Zookeeper(3.4.6+)。
4)三台节点均需安装进程管理工具包psmisc。
[lg@hadoop102 ~]$ sudo yum install -y psmisc
[lg@hadoop103 ~]$ sudo yum install -y psmisc
[lg@hadoop104 ~]$ sudo yum install -y psmisc
3.3 解压DolphinScheduler安装包
1)上传DolphinScheduler安装包到hadoop102节点的/opt/software目录
2)解压安装包到当前目录
注:解压目录并非最终的安装目录
[lg@hadoop102 software]$ tar -zxvf apache-dolphinscheduler-1.3.9-bin.tar.gz
3.4 初始化数据库
DolphinScheduler 元数据存储在关系型数据库中,故需创建相应的数据库和用户。
1)创建数据库
mysql> CREATE DATABASE dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
2)创建用户
mysql> CREATE USER 'dolphinscheduler'@'%' IDENTIFIED BY 'dolphinscheduler';
注:
若出现以下错误信息,表明新建用户的密码过于简单。
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
可提高密码复杂度或者执行以下命令降低MySQL密码强度级别。
mysql> set global validate_password_length=4;
mysql> set global validate_password_policy=0;
3)赋予用户相应权限
mysql> GRANT ALL PRIVILEGES ON dolphinscheduler.* TO 'dolphinscheduler'@'%';

mysql> flush privileges;
4)修改数据源配置文件
进入DolphinScheduler解压目录
[lg@hadoop102 apache-dolphinscheduler-1.3.9-bin]$ cd /opt/software/apache-dolphinscheduler-1.3.9-bin/
修改conf目录下的datasource.properties文件
[lg@hadoop102 apache-dolphinscheduler-1.3.9-bin]$ vim conf/datasource.properties
修改内容如下
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://hadoop102:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
spring.datasource.username=dolphinscheduler
spring.datasource.password=dolphinscheduler
5)拷贝MySQL驱动到DolphinScheduler的解压目录下的lib中
[lg@hadoop102 apache-dolphinscheduler-1.3.9-bin]$ cp /opt/software/mysql-connector-java-5.1.27-bin.jar lib/
6)执行数据库初始化脚本
数据库初始化脚本位于DolphinScheduler解压目录下的script目录中,即/opt/software/ds/apache-dolphinscheduler-1.3.9-bin/script/。
[lg@hadoop102 apache-dolphinscheduler-1.3.9-bin]$ script/create-dolphinscheduler.sh
3.5 配置一键部署脚本
修改解压目录下的conf/config目录下的install_config.conf文件
[lg@hadoop102 apache-dolphinscheduler-1.3.9-bin]$ vim conf/config/install_config.conf

# postgresql or mysql
dbtype="mysql"

# db config
# db address and port
dbhost="hadoop102:3306"

# db username
username="dolphinscheduler"

# database name
dbname="dolphinscheduler"

# db passwprd
# NOTICE: if there are special characters, please use the \ to escape, for example, `[` escape to `\[`
password="dolphinscheduler"

# zk cluster
zkQuorum="hadoop102:2181,hadoop103:2181,hadoop104:2181"

# Note: the target installation path for dolphinscheduler, please not config as the same as the current path (pwd)
installPath="/opt/module/dolphinscheduler"

# deployment user
# Note: the deployment user needs to have sudo privileges and permissions to operate hdfs. If hdfs is enabled, the root directory needs to be created by itself
deployUser="atguigu"

# resource storage type: HDFS, S3, NONE
resourceStorageType="HDFS"

# resource store on HDFS/S3 path, resource file will store to this hadoop hdfs path, self configuration, please make sure the directory exists on hdfs and have read write permissions. "/dolphinscheduler" is recommended
resourceUploadPath="/dolphinscheduler"

# if resourceStorageType is HDFS,defaultFS write namenode address,HA you need to put core-site.xml and hdfs-site.xml in the conf directory.
# if S3,write S3 address,HA,for example :s3a://dolphinscheduler,
# Note,s3 be sure to create the root directory /dolphinscheduler
defaultFS="hdfs://hadoop102:8020"

# resourcemanager port, the default value is 8088 if not specified
resourceManagerHttpAddressPort="8088"

# if resourcemanager HA is enabled, please set the HA IPs; if resourcemanager is single, keep this value empty
yarnHaIps=

# if resourcemanager HA is enabled or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname
singleYarnIp="hadoop103"

# who have permissions to create directory under HDFS/S3 root path
# Note: if kerberos is enabled, please config hdfsRootUser=
hdfsRootUser="atguigu"

# api server port
apiServerPort="12345"


# install hosts
# Note: install the scheduled hostname list. If it is pseudo-distributed, just write a pseudo-distributed hostname
ips="hadoop102,hadoop103,hadoop104"

# ssh port, default 22
# Note: if ssh port is not default, modify here
sshPort="22"

# run master machine
# Note: list of hosts hostname for deploying master
masters="hadoop102"

# run worker machine
# note: need to write the worker group name of each worker, the default value is "default"
workers="hadoop102:default,hadoop103:default,hadoop104:default"

# run alert machine
# note: list of machine hostnames for deploying alert server
alertServer="hadoop102"

# run api machine
# note: list of machine hostnames for deploying api server
apiServers="hadoop102"
 

3.6 一键部署DolphinScheduler
0)启动hadoop集群
1)启动Zookeeper集群
[lg@hadoop102 apache-dolphinscheduler-1.3.9-bin]$ zk.sh start
2)一键部署并启动DolphinScheduler
[lg@hadoop102 apache-dolphinscheduler-1.3.9-bin]$ ./install.sh
3)查看DolphinScheduler进程
--------- hadoop102 ----------
29139 ApiApplicationServer
28963 WorkerServer
3332 QuorumPeerMain
2100 DataNode
28902 MasterServer
29081 AlertServer
1978 NameNode
29018 LoggerServer
2493 NodeManager
29551 Jps
--------- hadoop103 ----------
29568 Jps
29315 WorkerServer
2149 NodeManager
1977 ResourceManager
2969 QuorumPeerMain
29372 LoggerServer
1903 DataNode
--------- hadoop104 ----------
1905 SecondaryNameNode
27074 WorkerServer
2050 NodeManager
2630 QuorumPeerMain
1817 DataNode
27354 Jps
27133 LoggerServer
4)访问DolphinScheduler UI
DolphinScheduler UI地址为http://hadoop102:12345/dolphinscheduler

初始用户的用户名为:admin,密码为dolphinscheduler123

DolphinScheduler启停命令
DolphinScheduler的启停脚本均位于其安装目录的bin目录下。
1)一键启停所有服务
./bin/start-all.sh
./bin/stop-all.sh
注意同Hadoop的启停脚本进行区分。
2)启停 Master
./bin/dolphinscheduler-daemon.sh start master-server
./bin/dolphinscheduler-daemon.sh stop master-server
3)启停 Worker
./bin/dolphinscheduler-daemon.sh start worker-server
./bin/dolphinscheduler-daemon.sh stop worker-server
4)启停 Api
./bin/dolphinscheduler-daemon.sh start api-server
./bin/dolphinscheduler-daemon.sh stop api-server
5)启停 Logger
./bin/dolphinscheduler-daemon.sh start logger-server
./bin/dolphinscheduler-daemon.sh stop logger-server
6)启停 Alert
./bin/dolphinscheduler-daemon.sh start alert-server
./bin/dolphinscheduler-daemon.sh stop alert-server

相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
1月前
|
编解码 Linux iOS开发
openEuler系统下neofetch工具的安装与基本使用
【10月更文挑战第2天】openEuler系统下neofetch工具的安装与基本使用
58 0
openEuler系统下neofetch工具的安装与基本使用
|
3月前
|
分布式计算 Hadoop 关系型数据库
dolphinscheduler搭建
先根据伪集群来部署、部署中参考非伪集群 1、mysql数据库 mysql -h主机地址 -u用户名 -p 2、查看等 less:G、上下按键、ctrl+b、ctrl+f、q find / -iname '*mysql*' 更改目录所有者 chown -R dolphinscheduler:dolphinscheduler apache-dolphinscheduler-*-bin /usr/apache-dolphinscheduler-3.1.0-bin/tools/libs 里面也需要mysql驱动
72 1
|
3月前
|
分布式计算 Hadoop 关系型数据库
dolphinscheduler
先根据伪集群来部署、部署中参考非伪集群 1、mysql数据库 mysql -h主机地址 -u用户名 -p 2、查看等 less:G、上下按键、ctrl+b、ctrl+f、q find / -iname '*mysql*' 更改目录所有者 chown -R dolphinscheduler:dolphinscheduler apache-dolphinscheduler-*-bin /usr/apache-dolphinscheduler-3.1.0-bin/tools/libs 里面也需要mysql驱动
57 4
|
4月前
|
存储 关系型数据库 Java
极速体验DolphinScheduler 3.2.1 Standalone 版[一]
极速体验DolphinScheduler 3.2.1 Standalone 版[一]
64 0
|
4月前
|
Kubernetes 数据库 容器
DolphinScheduler3.2.1 集群部署(Cluster)[三]
DolphinScheduler3.2.1 集群部署(Cluster)[三]
84 0
|
4月前
|
Java 关系型数据库 Linux
DolphinScheduler3.2.1 伪集群部署[二]
DolphinScheduler3.2.1 伪集群部署[二]
110 0
|
4月前
|
关系型数据库 MySQL Linux
DolphinScheduler2.x 伪分布式部署
DolphinScheduler2.x 伪分布式部署
113 0
|
5月前
|
SQL 资源调度 分布式计算
Apache DolphinScheduler 【安装部署】
Apache DolphinScheduler 【安装部署】
|
6月前
|
Apache 调度 数据库
Apache DolphinScheduler VS WhaleScheduler
Apache DolphinScheduler VS WhaleScheduler
671 59
|
6月前
|
数据可视化 Linux 调度
DolphinScheduler【部署 01】分布式可视化工作流任务调度工具DolphinScheduler部署使用实例分享(一篇入门学会使用DolphinScheduler)
DolphinScheduler【部署 01】分布式可视化工作流任务调度工具DolphinScheduler部署使用实例分享(一篇入门学会使用DolphinScheduler)
772 0