一.前言
本篇文章主要讲解Ambari Server端的高可用搭建。注意,是Ambari的Server,而不是Hadoop集群的应用。截止目前为止(Ambari 2.7.x),hortonworks官方并没有给出AmbariServer的高可用的内部实现。因此本篇文章主要讲解如何通过现有开源组件实现AmbariServer的高可用搭建。下述内容直接简称AmbariServer为Ambari。
另附:针对Hadoop集群应用组件的高可用搭建,hortonworks在以下文档中已经有所讲解(以HDP2.6.5为例):
- HDFS-NameNode高可用:https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_hadoop-high-availability/content/ch_HA-NameNode.html
- YARN-ResourceManager高可用:https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_hadoop-high-availability/content/ch_HA-ResourceManager.html
- HBase高可用:https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_hadoop-high-availability/content/ch_HA-HBase.html
- HiveMetastore高可用:https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_hadoop-high-availability/content/ch_HA-Hive.html
- HiveServer2高可用:https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_hadoop-high-availability/content/ch_multiple_hs2s.html
- Oozie高可用:https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_hadoop-high-availability/content/ha-nn-deploy-oozie.html
二.部署搭建
1.环境
- 操作系统:CentOS 7.3
- MariaDB:10.1.x
- HAProxy:1.5.x
- Keepalived:1.3.5
- Ambari :2.6.2.x
关于兼容性问题,可以参考这里:https://supportmatrix.hortonworks.com/
2.整体架构
这里对Ambari高可用部署的整体架构做下简单描述:
1)DB集群
首先,要保证上层应用服务的高可用性,下层的数据持久化必须可靠。因此选用MariaDB Galera Cluster作为Ambari的关系型数据库。Galer集群的实现方案直接解决了数据可靠性的问题,且该解决方案天生支持多点写入。