dolphinscheduler 2.0.3 Docker部署 不支持mysql的解决办法

由于商业许可证的原因,不能直接使用mysql驱动包,但是我们可以自己制作镜像,官网也有回答.
https://dolphinscheduler.apache.org/zh-cn/docs/2.0.3/user_doc/guide/installation/docker.html
按照官网的回答,依然会有些坑,docker-compose.yml的配置注意事项应当如下:

1:mysql数据源的配置
dolphinscheduler-mysql:image:  bitnami/mysql:latestenvironment:TZ: Asia/ShanghaiMYSQL_USERNAME: rootMYSQL_ROOT_PASSWORD: rootMYSQL_DATABASE: dolphinschedulervolumes:- dolphinscheduler-mysql:/bitnami/mysqlrestart: unless-stoppednetworks:- dolphinscheduler

2: zookeeper,官方的这条回答中在这里插入图片描述
其中zookeeper的image字段是不能更换的,所以配置如下,不变

在这里插入图片描述
3:api,alert,master,worker中,depends_on字段依然是- dolphinscheduler-postgresql,需要注释掉,更换为- dolphinscheduler-mysql,官方文档并未说明。应当如下:
在这里插入图片描述

4:最后vollumes加上mysql
在这里插入图片描述
其他操作和官方文档一样,以上为补充点。
所以docker-compose.yml全部配置如下

# 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.

version: "3.1"

services:

  dolphinscheduler-mysql:
    #image: apache/dolphinscheduler:mysql-driver
    image:  bitnami/mysql:latest
    environment:
      TZ: Asia/Shanghai
      MYSQL_USERNAME: root
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: dolphinscheduler
    volumes:
    - dolphinscheduler-mysql:/bitnami/mysql
    restart: unless-stopped
    networks:
    - dolphinscheduler

 # dolphinscheduler-postgresql:
 #   image: bitnami/postgresql:11.11.0
  #  environment:
 #     TZ: Asia/Shanghai
  #    POSTGRESQL_USERNAME: root
  #    POSTGRESQL_PASSWORD: root
  #    POSTGRESQL_DATABASE: dolphinscheduler
  #  volumes:
  #  - dolphinscheduler-postgresql:/bitnami/postgresql
  #  restart: unless-stopped
  #  networks:
  #  - dolphinscheduler

  dolphinscheduler-zookeeper:
    image: bitnami/zookeeper:3.6.2
    environment:
      TZ: Asia/Shanghai
      ALLOW_ANONYMOUS_LOGIN: "yes"
      ZOO_4LW_COMMANDS_WHITELIST: srvr,ruok,wchs,cons
    volumes:
    - dolphinscheduler-zookeeper:/bitnami/zookeeper
    restart: unless-stopped
    networks:
    - dolphinscheduler

  dolphinscheduler-api:
   # image: apache/dolphinscheduler:2.0.3
    image: apache/dolphinscheduler:mysql-driver
    command: api-server
    ports:
    - 12345:12345
    environment:
      TZ: Asia/Shanghai
    env_file: config.env.sh
    healthcheck:
      test: ["CMD", "/root/checkpoint.sh", "ApiApplicationServer"]
      interval: 30s
      timeout: 5s
      retries: 3
    depends_on:
    - dolphinscheduler-mysql
    #- dolphinscheduler-postgresql
    - dolphinscheduler-zookeeper
    volumes:
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    - dolphinscheduler-shared-local:/opt/soft
    - dolphinscheduler-resource-local:/dolphinscheduler
    restart: unless-stopped
    networks:
    - dolphinscheduler

  dolphinscheduler-alert:
    #image: apache/dolphinscheduler:2.0.3
    image: apache/dolphinscheduler:mysql-driver
    command: alert-server
    environment:
      TZ: Asia/Shanghai
    env_file: config.env.sh
    healthcheck:
      test: ["CMD", "/root/checkpoint.sh", "AlertServer"]
      interval: 30s
      timeout: 5s
      retries: 3
    depends_on:
    #- dolphinscheduler-postgresql
    - dolphinscheduler-mysql
    volumes:
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    restart: unless-stopped
    networks:
    - dolphinscheduler

  dolphinscheduler-master:
    #image: apache/dolphinscheduler:2.0.3
    image: apache/dolphinscheduler:mysql-driver
    command: master-server
    environment:
      TZ: Asia/Shanghai
    env_file: config.env.sh
    healthcheck:
      test: ["CMD", "/root/checkpoint.sh", "MasterServer"]
      interval: 30s
      timeout: 5s
      retries: 3
    depends_on:
    #- dolphinscheduler-postgresql
    - dolphinscheduler-mysql
    - dolphinscheduler-zookeeper
    volumes:
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    - dolphinscheduler-shared-local:/opt/soft
    restart: unless-stopped
    networks:
    - dolphinscheduler

  dolphinscheduler-worker:
    #image: apache/dolphinscheduler:2.0.3
    image: apache/dolphinscheduler:mysql-driver
    command: worker-server
    environment:
      TZ: Asia/Shanghai
    env_file: config.env.sh
    healthcheck:
      test: ["CMD", "/root/checkpoint.sh", "WorkerServer"]
      interval: 30s
      timeout: 5s
      retries: 3
    depends_on:
    #- dolphinscheduler-postgresql
    - dolphinscheduler-mysql
    - dolphinscheduler-zookeeper
    volumes:
    - dolphinscheduler-worker-data:/tmp/dolphinscheduler
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    - dolphinscheduler-shared-local:/opt/soft
    - dolphinscheduler-resource-local:/dolphinscheduler
    restart: unless-stopped
    networks:
    - dolphinscheduler

networks:
  dolphinscheduler:
    driver: bridge

volumes:
  dolphinscheduler-mysql:
  dolphinscheduler-postgresql:
  dolphinscheduler-zookeeper:
  dolphinscheduler-worker-data:
  dolphinscheduler-logs:
  dolphinscheduler-shared-local:
  dolphinscheduler-resource-local:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
Apache DolphinScheduler是一个新一代分布式大数据工作流任务调度系统,致力于“解决大数据任务之间错综复杂的依赖关系,整个数据处理开箱即用”。它以 DAG(有向无环图) 的方式将任务连接起来,可实时监控任务的运行状态,同时支持重试、从指定节点恢复失败、暂停及 Kill任务等操作。目前已经有像IBM、腾讯、美团、360等400多家公司生产上使用。 调度系统现在市面上的调度系统那么多,比如老牌的Airflow, Oozie,Kettle,xxl-job ,Spring Batch等等, 为什么要选DolphinScheduler ? DolphinScheduler 的定位是大数据工作流调度。通过把大数据和工作流做了重点标注. 从而可以知道DolphinScheduler的定位是针对于大数据体系。DolphinScheduler 发展很快 很多公司调度都切换到了DolphinScheduler,掌握DolphinScheduler调度使用势在必行,抓住新技术机遇,为跳巢涨薪做好准备。 优秀的框架都是有大师级别的人写出来的,包含了很多设计思想和技术。DolphinScheduler也不例外,它是一个非常优秀的框架,用到很多技术和设计思想,本课程会带大家深入DolphinScheduler框架源码,包括设计的思想和技术都会讲解,DolphinScheduler源码很多,会按照模块进行讲解,学习完课程后,不仅可以熟悉DolphinScheduler使用,而且可以掌握很多优秀的设计思想和技术,给自己的技术带来很大提升,为跳巢涨薪做好准备。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值