基于Ansible实现Apache Doris快速部署运维指南 - 张家锋
source link: https://www.cnblogs.com/hf200012/p/16171216.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Doris Ansible 使用指南
Apache Doris 介绍
Apache Doris是一个现代化的MPP分析型数据库产品。仅需亚秒级响应时间即可获得查询结果,有效地支持实时数据分析。Apache Doris的分布式架构非常简洁,易于运维,并且可以支持10PB以上的超大数据集。
Apache Doris可以满足多种数据分析需求,例如固定历史报表,实时数据分析,交互式数据分析和探索式数据分析等。令您的数据分析工作更加简单高效!
Doris Ansible简介
Doris_ansible是基于ansible构建的Doris高可用集群轻量化自动运维工具,它能够在本地方便快捷的一键拉起Doris高可用集群,并且集群的启停、升降级、扩缩容都可以通过一条简单的命令来实现,使用户可以将注意力专注于Doris强大的分析能力,而不用在运维上面耗费心力。后续将会增加更多使用者关注的自动化功能。如监控、运维巡检等一系列功能。
Doris Ansible使用步骤
1. 安装ansible
yum install -y ansible
2. 下载Doris_Ansible
git clone https://github.com/mklzl/doris_ansible
3. 集群规划(无需配置,仅作参考)
# fe
master : 192.168.1.241
follower1: 192.168.1.239
follower2: 192.168.2.243
# be
backend1: 192.168.1.239
backend2: 192.168.1.241
backend3: 192.168.1.243
# broker
broker1: 192.168.1.239
broker2: 192.168.1.241
broker3: 192.168.1.243
# 安装版本及软件包所在位置
/home/doris_ansible/PALO-0.15.1-rc09-binary.tar.gz
# 安装目录
/home/doris_ansible
# 升降级软件包所在路径
/home/doris_ansible/PALO-0.15.3-
release-binary.tar.gz
1. 配置集群初始化配置
-
分配集群角色hosts
vi /etc/ansible/hosts(cluster1为对应Doris集群的集群id,这里可以部署多个不同的集群配置,启动时,指定对应的集群ID即可操作对应的集群)
## 集群cluster1中参与的机器ip [cluster1.doris_hosts] 192.168.1.239 192.168.1.241 192.168.1.243 ##集群cluster1中fe所在机器的ip [cluster1.frontends] 192.168.1.239 192.168.1.241 192.168.1.243 ##集群cluster1中master节点所在的ip [cluster1.master] 192.168.1.241 ##集群cluster1中follower所在节点的ip [cluster1.follower] 192.168.1.239 192.168.1.243 ##集群cluster1中be所在节点的ip [cluster1.backends] 192.168.1.239 192.168.1.241 192.168.1.243 ## 要进行扩缩容的fe所在的ip [cluster1.scale_fe] 192.168.1.239 ## 要进行扩缩容的be所在的ip [cluster1.scale_be] 192.168.1.239 ## 要进行扩缩容的broker所在的ip [cluster1.scale_broker] 192.168.1.239 ##集群cluster1中broker节点所在的ip [cluster1.brokers] 192.168.1.239 192.168.1.241 192.168.1.243
-
配置初始化文件
vi ./conf/cluster1.yml(这里配置集群cluster1的对应ip组) --- follower: [192.168.1.239,192.168.1.243] backends: [192.168.1.239,192.168.1.241,192.168.1.243] brokers: [192.168.1.239,192.168.1.241,192.168.1.243] master: 192.168.1.241 vi ./conf/setup_vars.yml --- # 生产环境的fe.conf所在路径。 # 如果没有特殊配置,建议使用安装包内的fe.conf,请根据机器情况酌情配置priority_networks fe_conf_path: /home/doris_ansible/fe.conf #生产环境的be.conf所在路径。 # 如果没有特殊配置,建议使用安装包内的be.conf,请根据机器情况酌情配置priority_networks be_conf_path: /home/doris_ansible/be.conf # heartbeat_service_port,请和be.conf中的heartbeat_service_port配置保持一致 heartbeat_service_port: 9050 # edit_log_port,请和fe.conf中的edit_log_port配置保持一致 edit_log_port: 9010 # query_port,请和fe.conf中的query_port配置保持一致 query_port: 9030 # broker_ipc_port,请和apache_hdfs_broker.conf中的broker_ipc_port保持一致 broker_ipc_port: 8000 # 待安装的doris压缩包所在路径,请写绝对路径 doris_filepath: /home/doris_ansible/PALO-0.15.1-rc09-binary.tar.gz # doris压缩包要解压安装的位置 dest_filepath: /home/doris_ansible #解压后,doris的安装目录 doris_home: /home/doris_ansible/PALO-0.15.1-rc09-binary # 机器java_home所在路径,请确保所有机器保持一致 java_home: /usr/java/jdk1.8.0_131
2. 初始化集群
#cluster=cluster1 是指定的对对应集群的操作
ansible-playbook -e "cluster=cluster1" ./core/setup.yml
3. 添加角色
ansible-playbook -e "cluster=cluster1" ./core/add_roles.yml
4. 启停集群
#一键停止对应集群
ansible-playbook -e "cluster=cluster1" ./core/stop_all.yml
#一键启动对应集群
ansible-playbook -e "cluster=cluster1" ./core/start_all.yml
5. 集群升降级
-
配置集群升降级配置
vi ./conf/upgrade_vars.yml --- #需要回滚或者升级的压缩包所在路径 newdoris_filepath: /home/doris_ansible/PALO-0.15.3-release-binary.tar.gz #压缩包解压路径 newdoris_destpath: /home/doris_ansible #解压后的doirs_home newdoris_home: /home/doris_ansible/PALO-0.15.3-release-binary #java_home所在路径 java_home: /usr/java/jdk1.8.0_131
-
进行升降级操作
ansible-playbook -e "cluster=cluster1" ./core/upgrade.yml
6. 集群扩缩容
- 配置集群扩缩容配置
vi /etc/ansible/hosts (配置要进行扩缩容的角色的hosts,可以配置多个hosts)
## 要进行扩缩容的fe所在的ip
[cluster1.scale_fe]
192.168.1.239
## 要进行扩缩容的be所在的ip
[cluster1.scale_be]
192.168.1.239
## 要进行扩缩容的broker所在的ip
[cluster1.scale_broker]
192.168.1.239
- FE 扩缩容
vi ./conf/scale_fe_vars.yml
---
## 要进行扩缩容的fe
frontends: 192.168.1.239
##(多个ip使用数组的方式)
frontends: [192.168.1.239,192.168.1.241]
- BE 扩缩容
vi ./conf/scale_be_vars.yml
---
## 要进行扩缩容的be
backends: 192.168.1.239
##(多个ip使用数组的方式)
backends: [192.168.1.239,192.168.1.241]
- Broker 扩缩容
vi ./conf/scale_broker_vars.yml
---
## 要进行扩缩容的broker
brokers: 192.168.1.239
##(多个ip使用数组的方式)
brokers: [192.168.1.239,192.168.1.241]
- 执行扩缩容
# 扩容
# 扩容broker
ansible-playbook -e "cluster=cluster1 action=out" ./core/scale_broker.yml
# 扩容be
ansible-playbook -e "cluster=cluster1 action=out" ./core/scale_be.yml
# 扩容fe
ansible-playbook -e "cluster=cluster1 action=out" ./core/scale_fe.yml
# 缩容
#缩容broker
ansible-playbook -e "cluster=cluster1 action=out" ./core/scale_broker.yml
#缩容be
ansible-playbook -e "cluster=cluster1 action=out" ./core/scale_be.yml
#缩容fe
ansible-playbook -e "cluster=cluster1 action=out" ./core/scale_fe.yml
Recommend
-
85
模板templates功能:根据模块文件动态生成对应的配置文件Jinja2语言,使用字面量,有下面形式字符串:使用单引号或双引号数字:整数,浮点数列表:[item1,item2,...]元组:(item1,item2,...)字典:{key1:value1,key2:value2,...}布尔型:true/false算术运算:+,-...
-
86
Ansible是新出现的自动化运维工具,基于Python开发,集合了众多运维工具(puppet、cfengine、chef、func、fabric)的优点。实现了批量系统配置、批量程序部署、批量运行命令等功能。Ansible是基于模块工作的,本身没有批量部署的能力。真正具有批量部署的是Ansible...
-
82
-
40
Ansible简介Ansible使用Python语言开发,巧妙的设计、实现了简单易用、功能强大的自动化管理工具。目前它已经广泛应用于各种规模、各个领域的企业。Ansible应用领域Ansible的编排引擎可以出色地完成配置管理、流程控制、资源部署等工作,与其他IT自动化产品比较,A...
-
41
由于互联网的快速发展导致产品更新换代速度逐渐加快,运维人员每天都要进行大量的维护操作,仍旧按照传统方式进行维护使得工作效率低下。这时,部署自动化运维就可以尽可能安全,高效地完成这些工作。
-
82
一、Ansible介绍Ansible简单的说是一个配置管理系统(configurationmanagementsystem)。你只需要可以使用ssh访问你的服务器或设备就行。它也不同于其他工具,因为它使用推送的方式,而不是像puppet等那样使用拉取安装agent的方式。你可以将代码部署到任意数量的服务...
-
9
SpringBoot + DDD + Apache Kafka实现最终一致性:在Kubernetes与Istio运维微服务本文是SpringBoot + DDD + Apache Kafka实现最终一致性的教程与源码的运维DevOps部分:如本文第一部分所述,对于一个现代由多...
-
5
1. Ansible-playbook实现MySQL的二进制部署1.1 架构及主机
-
3
使用 NodeJS + Redis + Ansible 实现分布式爬虫并且自动化批量部署上线。 本文章基于以下CC协议进行知识共享:署名(BY)-非商业性使用(NC)-禁止演绎(ND) 分布式爬虫之前在爬取一个网站的...
-
8
Etcd 是一个可靠的分布式键值存储, 常用于分布式系统关键数据的存储;而 etcdadm 是一个用于操作 etcd 集群的命令行工具...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK