doris docker安装 及监控

2021/5/19 10:58:44

本文主要是介绍doris docker安装 及监控,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

此处不再重复造轮子

详见:

Docker搭建Doris集群监控grafana+prometheus: https://blog.csdn.net/zuoliansheng/article/details/108736188

使用Docker快速搭建Doris集群: https://blog.csdn.net/jklcl/article/details/112910796

制作docker镜像

# centos7:jdk8是我们自己做的基础镜像
FROM centos7:jdk8

RUN mkdir -p /home/doris

ENV JAVA_HOME /usr/lib/jvm/java

COPY ./fe/ /home/doris/fe

COPY ./be/ /home/doris/be

COPY ./apache_hdfs_broker/ /home/doris/fs_broker

EXPOSE 8030 9020 9030 9010 9070 9060 8060 8040 9050 8000

VOLUME ["/home/doris/fe/conf", "/home/doris/fe/log", "/home/doris/fe/doris-meta", "/home/doris/be/conf", "/home/doris/be/log", "/home/doris/be/storage", "/home/doris/fs_brokers/conf"]

COPY entrypoint.sh /

RUN chmod +x entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

 

entrypoint.sh

#!/bin/sh

echo "fe_role:"$FE_ROLE
echo "leader:"$FE_LEADER

if [[ $FE_ROLE = 'fe-leader' ]]; then
    /home/doris/fe/bin/start_fe.sh
elif [[ $FE_ROLE = 'be' ]]; then
    /home/doris/be/bin/start_be.sh
elif [[ $FE_ROLE = 'fe-follower' ]]; then
    /home/doris/fe/bin/start_fe.sh --helper $FE_LEADER
else
    /home/doris/fs_broker/bin/start_broker.sh
fi

 

创建镜像

docker build -f DockerFile -t doris:0.12.21-release .

docker-compose启动

FE

version: '3.7'
services:
    doris-fe:
        image: doris:0.12.21-release
        restart: always
        network_mode: "host"
        container_name: "doris-fe"
        ports:
            - "8030:8030"
            - "9010:9010"
            - "9020:9020"
            - "9030:9030"
        volumes:
            - "/xxx/doris/fe/log:/home/doris/fe/log"
            - "/xxx/doris/fe/doris-meta:/home/doris/fe/doris-meta"
            - "/xxx/doris/fe/conf:/home/doris/fe/conf"
            - "/etc/localtime:/etc/localtime:ro"
        environment:
            - FE_ROLE=fe-follower
            - FE_LEADER=xxxx:9010
        security_opt:
            - seccomp:unconfined

创建文件夹: mkdir /xxx/doris/fe/conf
启动leader: docker-compose -f docker-compose-doris-fe-leader.yml up -d
启动follower: 略
UI界面: http://s-hadoop-log01:8030/
注:第一次启动时先启动leader,再启动follower,因为follower指向leader所在机器之后的启动,都按照leader起就可以了

BE

version: '3.7'
services:
    doris-be:
        image: doris:0.12.21-release
        restart: always
        network_mode: "host"
        container_name: "doris-be"
        ports:
            - "8040:8040"
            - "8060:8060"
            - "9050:9050"
            - "9060:9060"
            - "9070:9070"
        volumes:
            - "/xxx/doris/be/log:/home/doris/be/log"
            - "/xxx/doris/be/storage:/home/doris/be/storage"
            - "/xxx/doris/be/conf:/home/doris/be/conf/"
            - "/etc/localtime:/etc/localtime:ro"
        environment:
            - FE_ROLE=be

创建文件夹: mkdir /xxx/doris/be/conf
启动be: docker-compose -f docker-compose-doris-be.yml up -d
UI界面: http://s-hadoop-log01:8040/

 

doris-fs-broker:

version: '3.7'
services:
    doris-fs-broker:
        image: doris:0.12.21-release
        restart: always
        network_mode: "host"
        container_name: "doris-fs-broker"
        ports:
            - "8000:8000"
        volumes:
            - "/xxx/doris/fs_broker/conf:/home/doris/fs_broker/conf"
            - "/xxx/doris/fs_broker/log:/home/doris/fs_broker/log"
            - "/etc/localtime:/etc/localtime:ro"
        environment:
            - FE_ROLE=fs

创建文件夹: mkdir /xxx/doris/fs_broker/conf
启动fs: docker-compose -f docker-compose-doris-fs-broker.yml up -d

 

 



这篇关于doris docker安装 及监控的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程