Ambari概述
Apache Ambari是一种基于Web的工具,支持Apache Hadoop集群的创建、管理和监控。Ambari已支持大多数Hadoop组件,包括HDFS、MapReduce、Hive、Pig、 Hbase、Zookeeper、Sqoop和Hcatalog等;除此之外,Ambari还支持Spark、Storm等计算框架及资源调度平台YARN。
Apache Ambari 从集群节点和服务收集大量信息,并把它们表现为容易使用的,集中化的接口:Ambari Web.
Ambari Web显示诸如服务特定的摘要、图表以及警报信息。可通过Ambari Web对Hadoop集群进行创建、管理、监视、添加主机、更新服务配置等;也可以利用Ambari Web执行集群管理任务,例如启用 Kerberos 安全以及执行Stack升级。任何用户都可以查看Ambari Web特性。拥有administrator-level 角色的用户可以访问比 operator-level 或 view-only 的用户能访问的更多选项。例如,Ambari administrator 可以管理集群安全,一个 operator 用户可以监控集群,而 view-only 用户只能访问系统管理员授予他的必要的权限。
Ambari体系结构
Ambari 自身也是一个分布式架构的软件,主要由两部分组成:Ambari Server 和 Ambari Agent。简单来说,用户通过Ambari Server通知 Ambari Agent 安装对应的软件;Agent 会定时地发送各个机器每个软件模块的状态给 Ambari Server,最终这些状态信息会呈现在 Ambari 的 GUI,方便用户了解到集群的各种状态,并进行相应的维护。
Ambari Server 从整个集群上收集信息。每个主机上都有 Ambari Agent, Ambari Server 通过 Ambari Agent 控制每部主机。
配置本地YUM源
参考文档
- https://docs.cloudera.com/HDPDocuments
- https://docs.cloudera.com/HDPDocuments/Ambari-2.7.5.0/bk_ambari-installation/content/ambari_repositories.html
- https://docs.cloudera.com/HDPDocuments/Ambari-2.7.5.0/bk_ambari-installation/content/hdp_315_repositories.html
目录结构
[root@192-168-5-12 ~]# mkdir -p /tmp/temp
wget -N http://192.168.12.62/ambari/ambari2.6.2.2/HDP-2.6.5.0-centos7-rpm.tar.gz -P /tmp/temp/
wget -N http://192.168.12.62/ambari/ambari2.6.2.2/HDP-GPL-2.6.5.0-centos7-gpl.tar.gz -P /tmp/temp/
wget -N http://192.168.12.62/ambari/ambari2.6.2.2/HDP-UTILS-1.1.0.22-centos7.tar.gz -P /tmp/temp/
wget -N http://192.168.12.62/ambari/ambari2.6.2.2/ambari-2.6.2.2-centos7.tar.gz -P /tmp/temp/
[root@192-168-5-12 ~]# for file in `ls -1 /tmp/temp/*.tar.gz` ; do tar -xzvf $file -C /tmp/temp/ ; done ;
[root@192-168-5-12 ~]# mkdir -p /data/wwwroot/yum/{ambari,hdp,hdp-utils,hdp-gpl}
mv /tmp/temp/ambari/centos7/2.6.2.2-1/* /data/wwwroot/yum/ambari/
mv /tmp/temp/HDP/centos7/2.6.5.0-292/* /data/wwwroot/yum/hdp/
mv /tmp/temp/HDP-GPL/centos7/2.6.5.0-292/* /data/wwwroot/yum/hdp-gpl/
mv /tmp/temp/HDP-UTILS/centos7/1.1.0.22/* /data/wwwroot/yum//hdp-utils/
[root@yum ambari2.7.4]# pwd
/data/wwwroot/yum/ambari2.7.4
[root@yum ambari2.7.4]# tree -d -L 2
.
├── ambari
│ ├── ambari
│ ├── repodata
│ ├── RPM-GPG-KEY
│ ├── smartsense
│ └── tars
├── hdp
│ ├── accumulo
│ ├── atlas
│ ├── bigtop-jsvc
│ ├── bigtop-tomcat
│ ├── datafu
│ ├── druid
│ ├── hadoop
│ ├── hbase
│ ├── hdp-select
│ ├── hive
│ ├── hive_warehouse_connector
│ ├── kafka
│ ├── knox
│ ├── livy
│ ├── oozie
│ ├── phoenix
│ ├── pig
│ ├── ranger
│ ├── repodata
│ ├── RPM-GPG-KEY
│ ├── shc
│ ├── spark2
│ ├── spark_atlas_connector
│ ├── spark_schema_registry
│ ├── sqoop
│ ├── storm
│ ├── superset
│ ├── tez
│ ├── vrpms
│ ├── zeppelin
│ └── zookeeper
├── hdp-gpl
│ ├── hadooplzo
│ ├── repodata
│ ├── RPM-GPG-KEY
│ └── vrpms
└── hdp-utils
├── openblas
├── repodata
├── RPM-GPG-KEY
└── snappy
48 directories
nginx server配置
server {
listen 80;
server_name localhost;
location / {
#root /data/wwwroot/yum;
root /data/wwwroot/yum ;
charset utf-8;
autoindex on;
# set to on means use localtime
autoindex_localtime on;
# show size with unit 'MB' instead of 'Byte'
autoindex_exact_size off;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
repo文件
[root@s03 yum.repos.d]# cat ambari.repo
#VERSION_NUMBER=2.7.4.0-118
[ambari-2.7.4.0]
#json.url = http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json
name=ambari Version - ambari-2.7.4.0
#baseurl=http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.4.0
baseurl=http://192.168.12.70/ambari2.7.4/ambari/
gpgcheck=1
#gpgkey=http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.4.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
gpgkey=http://192.168.12.70/ambari2.7.4/ambari/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
[root@s03 yum.repos.d]# cat hdp*repo
#VERSION_NUMBER=3.1.4.0-315
[HDP-GPL-3.1.4.0]
name=HDP-GPL Version - HDP-GPL-3.1.4.0
#baseurl=http://public-repo-1.hortonworks.com/HDP-GPL/centos7/3.x/updates/3.1.4.0
baseurl=http://192.168.12.70/ambari2.7.4/hdp-gpl
gpgcheck=1
#gpgkey=http://public-repo-1.hortonworks.com/HDP-GPL/centos7/3.x/updates/3.1.4.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
gpgkey=http://192.168.12.70/ambari2.7.4/hdp-gpl/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
#VERSION_NUMBER=3.1.4.0-315
[HDP-3.1.4.0]
name=HDP Version - HDP-3.1.4.0
#baseurl=http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.1.4.0
baseurl=http://192.168.12.70/ambari2.7.4/hdp/
gpgcheck=1
#gpgkey=http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.1.4.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
gpgkey=http://192.168.12.70/ambari2.7.4/hdp/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
[HDP-UTILS-1.1.0.22]
name=HDP-UTILS Version - HDP-UTILS-1.1.0.22
#baseurl=http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7
baseurl=http://192.168.12.70/ambari2.7.4/hdp-utils
gpgcheck=1
#gpgkey=http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.1.4.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
gpgkey=http://192.168.12.70/ambari2.7.4/hdp-utils/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
[HDP-UTILS-1.1.0.22]
name=Hortonworks Data Platform Utils Version - HDP-UTILS-1.1.0.22
#baseurl=http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7
baseurl=http://192.168.12.70/ambari2.7.4/hdp-utils
gpgcheck=1
enabled=0
priority=1