Selectdb+doris 集群搭建(现已舍弃)

97 阅读3分钟

 文档链接:SelectDB Distribution Core 安装手册 - 云原生实时数据仓库

1、文件句柄数


vi /etc/security/limits.conf 
* soft nproc 65536 
* hard nproc 65536 
* soft nofile 65536 
* hard nofile 65536 
* - memlock unlimited

2、调整vm.max_map_count的大小

vi /etc/sysctl.conf 
vm.max_map_count=2000000 
vm.swappiness=0 


sysctl -p

3、时钟同步

yum -y install ntp ntpdate ntpdate cn.pool.ntp.org

4、免密登陆

ssh-keygen -t rsa cat .ssh/id_rsa.pub vim .ssh/authorized_keys

5、关闭swap分区

vim /etc/sysctl.conf vm.swappiness=0 swapoff /dev/mapper/centos-swap vim /etc/fstab 注释swap分区信息

6、创建目录

/opt/suecheer/service /data/service/

7、上传安装包

selectdb_doris_x.x.x.x-x86_64-avx2.tar.gz selectdb_distribution_toolkit-<toolkit_version>-x86_64.tar.gz

8、文件内容

selectdb_doris_x.x.x.x-x86_64-avx2 |-- README.md ## 发行包说明文档 |-- apache_hdfs_broker ## FS_Broker |-- audit_loader ## 审计日志插件 |-- be ## Doris be |-- fe ## Doris FE |-- java8 ## Doris FE/BE/Broker 运行所依赖的 Java 运行环境 |-- jdbc_drivers ## Doris FE/BE JDBC 外表及Muitl Catalog 运行所依赖的数据库驱动 `-- udf

9、编辑.yaml文件

# common configuration of all frontends and backends global: user: root #启动用户 ssh_port: 22 #连接端口 deploy_dir: /opt/selectdb #部署目录 data_dir: /data/selectdb #数据目录 # simple configuration of frontends. For detailed configuration, refer to the full template frontends: # 预分配fe节点 (奇数) - host: 192.168.88.31 - host: 192.168.88.32 - host: 192.168.88.33 # simple configuration of backends. For detailed configuration, refer to the full template backends: # 预分配be节点 (奇数) - host: 192.168.88.31 - host: 192.168.88.32 - host: 192.168.88.33

可通过 dorisctrl cluster template --full 命令 生成详细版的集群拓扑文件样例

10、自动完成集群部署

dorisctrl cluster deploy <cluster_name> -v <version> -f <topology_file> dorisctrl cluster deploy doris-test -v 1.2.1.1 -f doris-c2.yaml

可能出现问题

1. Please specify directory to store Doris packages:

询问安装包存放目录,填写doris安装包的存放路径。

2. Please Enter os password to set up ssh authentication:

填写部署机的密码,用来做中控机对部署机的免秘钥连接。

11、查看安装集群信息

dorisctrl cluster display <cluster_name>

返回举例

> dorisctrl cluster display doris-test INFO[2022-11-20 16:05:45] start to fetch node status of cluster [doris-test] ID ROLE HOST QUERY PORT HTTP PORT STAT DEPLOYDIR -------------------- ------ -------------------- --------------- --------------- ---------- -------------------------------------------------- 192.168.88.41:9010 FE 192.168.88.41 9030 8030 UP/L /opt/selectdb/fe 192.168.88.42:9010 FE 192.168.88.42 9030 8030 UP /opt/selectdb/fe 192.168.88.43:9010 FE 192.168.88.43 9030 8030 UP /opt/selectdb/fe 192.168.88.41:9050 BE 192.168.88.41 - 8040 UP /opt/selectdb/be 192.168.88.42:9050 BE 192.168.88.42 - 8040 UP /opt/selectdb/be 192.168.88.43:9050 BE 192.168.88.43 - 8040 UP /opt/selectdb/be

12、查看管理的集群

> dorisctrl cluster list ClusterName Version User CreateDate --------------- ---------- ---------- ------------------------- doris-test 1.2.0 root 2023-01-08T21:13Z doris-demo 1.2.0 root 2023-01-08T22:10Z

13、启动集群

dorisctrl cluster start <cluster_name>

14、启动指定角色

dorisctrl cluster start <cluster_name> -r FE dorisctrl cluster start <cluster_name> -r BE dorisctrl cluster start <cluster_name> -i <node_id>

15、停止集群

dorisctrl cluster stop <cluster_name>

16、停止节点

dorisctrl cluster stop <cluster_name> -r FE dorisctrl cluster stop <cluster_name> -r BE dorisctrl cluster stop <cluster_name> -i <node_id>

17、集群扩容

dorisctrl cluster scale-out <cluster_name> -f <cluster_conf>

可能出现的问题

扩容成功但是启动还是未找到信息

在根目录的临时目录修改具体的信息

18、集群缩容

dorisctrl cluster scale-in <cluster_name> -f <cluster_conf>

可能出现的问题

扩容成功但是启动还是未找到信息

在根目录的临时目录修改具体的信息

19、输出studio_config样例

dorisctrl studio template

20、修改config

# specify which host to install the studio service. target_host: host: localhost ssh_port: 22 user: root # configurations of studio and its deps. studio: deploy_dir: /opt/selectdb data_dir: /data/selectdb http_port: 8003 # optional, the mail server used by studio to send notifications. # mail_config: # host: mailserver.com # username: name@company.com # password: Pass123456 # port: 25 # protocol: smtp

21、部署studio

dorisctrl studio deploy -f <studio_config>

22、启动studio

dorisctrl studio start

23、加载集群

dorisctrl studio reload <cluster_name>

可能出现的问题

当对集群进行启停、扩容等改变集群状态的操作时,需要手动进行 studio reload 重新加载当前集群的状态,来保证集群查询和监控告警功能的可用。

24、卸载集群

dorisctrl studio unload <cluster_name>

25、停止studio

dorisctrl studio stop

26、升级studio

dorisctrl upgrade stop -v <target_version>

可能出现的问题

需要确保在 repo 目录下有目标版本 toolkit 包或者有权限下载。