阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Ambari + HDP 升级 (Ambari 2.2.2 – 2.4.1 + HDP 2.4.2 – 2.5.0)

225次阅读
没有评论

共计 6766 个字符,预计需要花费 17 分钟才能阅读完成。

Ambari + HDP 升级(Ambari 2.2.2 – 2.4.1 + HDP 2.4.2 – 2.5.0)

一、Ambari 升级

1. 升级前准备

1.1 确认版本

Be sure to review the Release Notes for this Ambari release for Known Issues and
Behavioral Changes

1.2 确认拥有 root 权限

You must have root, administrative, or root-equivalent authorization on the Ambari server host and all servers in the cluster.

1.3 备份数据库

You must backup the Ambari Server database

1.4 备份 ambari.properties 配置文件

You must make a safe copy of the Ambari Server configuration file found at /etc/
ambari-server/conf/ambari.properties.

1.5 计划升级 Ambari Metrics service

Record the location of the Metrics Collector component before you begin the upgrade process.
You must stop the Ambari Metrics service from Ambari Web.
• After upgrading Ambari, you must also Upgrade Ambari Metrics service and add the
Grafana component.
• Proceed to Upgrade to Ambari 2.4.
• After upgrading Ambari, you must also Upgrade Hortonworks SmartSense

2. 开始升级 Ambari

2.1 关闭 Ambari Metrics service

If you are running Ambari Metrics service in your cluster, stop the service. From Ambari
Web, browse to Services > Ambari Metrics and select Stop from the Service Actions
menu.

2.2 停止 ambari-server

ambari-server stop

2.3 停止 ambari-agent

ambari-agent stop

2.4 获取新的 ambari.repo

本次安装方式使用本地源的方式安装,先下载要安装的资源进行离线安装,具体方法请参考下面文章中制作本地源安装方法。
 http://www.linuxidc.com/Linux/2017-03/141302.htm

下面是在线安装方式

wget -nv http://public-repo-1.hortonworks.com/ambari/CentOS7/2.x/updates/
2.4.1.0/ambari.repo -O /etc/yum.repos.d/ambari.repo

2.5 升级 Ambari Server,在服务节点进行

2.5.1 显示 ambari-server 信息
yum clean all
yum info ambari-server

输出信息如下:

[11:17:52]Installed Packages
[11:17:52]Name        : ambari-server
[11:17:52]Arch        : x86_64
[11:17:52]Version     : 2.2.2.0
[11:17:52]Release     : 460
[11:17:52]Size        : 445 M
[11:17:52]Repo        : installed
[11:17:52]From repo   : Updates-ambari-2.2.2.0
[11:17:52]Summary     : Ambari Server
[11:17:52]URL         : http://www.apache.org
[11:17:52]License     : 2012, Apache Software Foundation
[11:17:52]Description : Maven Recipe: RPM Package.
[11:17:52]
[11:17:52]Available Packages
[11:17:52]Name        : ambari-server
[11:17:52]Arch        : x86_64
[11:17:52]Version     : 2.4.1.0
[11:17:52]Release     : 22
[11:17:52]Size        : 646 M
[11:17:52]Repo        : Updates-ambari-2.4.1.0
[11:17:52]Summary     : Ambari Server
[11:17:52]URL         : http://www.apache.org
[11:17:52]License     : (c) Apache Software Foundation
[11:17:52]Description : Maven Recipe: RPM Package.

2.5.2 执行更新操作

在输出信息中确认最新可用的版本为 2.4.1.0,再进行 ambari-server 更新操作如下:

yum upgrade ambari-server

2.6 检查 ambari-server 更新是否成功

在 2.5.2 更新的过程中出现如下信息,说明更新成功

[11:24:56]Resolving Dependencies
[11:24:56]--> Running transaction check
[11:24:56]---> Package ambari-server.x86_64 0:2.2.2.0-460 will be updated
[11:24:56]---> Package ambari-server.x86_64 0:2.4.1.0-22 will be an update
[11:24:59]--> Finished Dependency Resolution
[11:24:59]
[11:24:59]Dependencies Resolved

[11:25:32]  Verifying  : ambari-server-2.4.1.0-22.x86_64                                                                                                                                                            1/2
[11:25:32]  Verifying  : ambari-server-2.2.2.0-460.x86_64                                                                                                                                                            2/2
[11:25:32]
[11:25:32]Updated:
[11:25:32]  ambari-server.x86_64 0:2.4.1.0-22                                                                                                                                                                           
[11:25:32]
[11:25:32]Complete!

2.7 更新所有的 ambari-agent 节点

yum clean all
yum info ambari-agent
yum upgrade ambari-agent

输出结果如下,则 ambari-agent 更新成功

[11:40:04]  Verifying  : ambari-agent-2.4.1.0-22.x86_64                                                                                                                                                              1/2 
[11:40:04]  Verifying  : ambari-agent-2.2.2.0-460.x86_64                                                                                                                                                             2/2 
[11:40:04]
[11:40:04]Updated:
[11:40:04]  ambari-agent.x86_64 0:2.4.1.0-22                                                                                                                                                                             
[11:40:04]
[11:40:04]Complete!

2.8 查看 ambari-agent

查看所有集群机器上的 ambari-agent 是否已经更新为最新版本

rpm -qa | grep ambari-agent

结果如下:

[11:41:57]ambari-agent-2.4.1.0-22.x86_64

2.9 升级 ambari server database schema

在 ambari-server 机器上进行 server 的更新操作

ambari-server upgrade

执行结果如下:

[13:54:05][root@nest-001 ambari2.4.1]# ambari-server upgrade
[13:54:05]Using python  /usr/bin/python
[13:54:05]Upgrading ambari-server
[13:54:05]Updating properties in ambari.properties ...
[13:54:05]WARNING: Original file ambari-env.sh kept
[13:54:05]Fixing database objects owner
[13:54:12]Ambari Server configured for MySQL. Confirm you have made a backup of the Ambari Server database [y/n] (y)? y
[13:54:12]Upgrading database schema
[13:55:12]Adjusting ambari-server permissions and ownership...
[13:55:13]Ambari Server 'upgrade' completed successfully.

2.10 启动 ambari-server

ambari-server start

结果如下:

[13:58:19][root@nest-001 ambari2.4.1]# ambari-server start
[13:58:19]Using python  /usr/bin/python
[13:58:19]Starting ambari-server
[13:58:19]Ambari Server running with administrator privileges.
[13:58:19]Organizing resource files at /var/lib/ambari-server/resources...
[13:58:19]Ambari database consistency check started...
[13:58:36]No errors were found.
[13:58:36]Ambari database consistency check finished
[13:58:36]Server PID at: /var/run/ambari-server/ambari-server.pid
[13:58:36]Server out at: /var/log/ambari-server/ambari-server.out
[13:58:36]Server log at: /var/log/ambari-server/ambari-server.log
[13:58:53]Waiting for server start....................
[13:58:53]Ambari Server 'start' completed successfully.

2.11 启动 ambari-server

ambari-agent start

结果如下:

[13:59:22][root@nest-001 ambari2.4.1]# ambari-agent start
[13:59:22]Verifying Python version compatibility...
[13:59:22]Using python  /usr/bin/python
[13:59:22]Checking for previously running Ambari Agent...
[13:59:22]Starting ambari-agent
[13:59:24]Verifying ambari-agent process status...
[13:59:24]Ambari Agent successfully started
[13:59:24]Agent PID at: /var/run/ambari-agent/ambari-agent.pid
[13:59:24]Agent out at: /var/log/ambari-agent/ambari-agent.out
[13:59:24]Agent log at: /var/log/ambari-agent/ambari-agent.log

2.12 登录 ambari 管理界面,查看版本,升级成功。

http://

3. Ambari 更新后的工作

3.1 更新 Ambari Metrics

  1. Upgrade to Ambari 2.4 and perform needed post-upgrade checks. Make sure all services
    are up and healthy.
  2. Make sure Ambari Metrics service is stopped. From Ambari Web, browse to Services >
    Ambari Metrics and select Stop from the Service Actions menu.
  3. On every host in your cluster running a Metrics Monitor, run the following commands:
yum clean all
yum upgrade ambari-metrics-monitor ambari-metrics-Hadoop-sink

Execute the following command on all hosts running the Metrics Collector:

yum upgrade ambari-metrics-collector
yum upgrade ambari-metrics-grafana

Start Ambari Metrics Service.
From Ambari Web, browse to Services > Ambari Metrics select Service Actions then
choose Start

二、HDP 升级到 2.5.0.0

1. 注册和安装目标版本

  1. 登录到 Ambari.
  2. 点击 Admin > Stack and Versions.
  3. 点击 Versions tab
  4. 点击“Manage Versions”.
  5. 点击右上角的按钮 Register Version,添加新的 hdp 版本
    Ambari + HDP 升级(Ambari 2.2.2 - 2.4.1 + HDP 2.4.2 - 2.5.0)
    6. 点击 save 保存

2. 升级 HDP 相关组件

点击 Install 就能够将 hadoop 升级到该 HDP 版本了
Ambari + HDP 升级(Ambari 2.2.2 - 2.4.1 + HDP 2.4.2 - 2.5.0)
安装后点击 upgrade,有两种升级模式,一种是保持服务运行升级,另一种是停止服务升级,后者升级更快些
Ambari + HDP 升级(Ambari 2.2.2 - 2.4.1 + HDP 2.4.2 - 2.5.0)
checks 中问题按照提示具体进行解决,解决所有问题后按照提示进行升级
Ambari + HDP 升级(Ambari 2.2.2 - 2.4.1 + HDP 2.4.2 - 2.5.0)
升级过程中可能会遇到各种问题,需要按照输出错误提示进行解决,可能需要 retry 多次
Ambari + HDP 升级(Ambari 2.2.2 - 2.4.1 + HDP 2.4.2 - 2.5.0)
升级完成后效果如下:
Ambari + HDP 升级(Ambari 2.2.2 - 2.4.1 + HDP 2.4.2 - 2.5.0)

Hadoop 集群监控工具 Ambari 安装 http://www.linuxidc.com/Linux/2014-06/103208.htm

使用 Ambari 快速部署 Hadoop 大数据环境 http://www.linuxidc.com/Linux/2014-05/101531.htm

Ambari 服务配置以及 Alert 详解  http://www.linuxidc.com/Linux/2016-12/138149.htm

Ubuntu 14.04 上搭建 Ambari 清晰 PDF  http://www.linuxidc.com/Linux/2016-01/126965.htm

CentOS 7 安装 Ambari2.4.0 图文详解 http://www.linuxidc.com/Linux/2016-12/138142.htm

CentOS 6.5 下使用 Ambari 安装 Hadoop 集群  http://www.linuxidc.com/Linux/2014-12/110824.htm

Ambari 安装指南图文详解 http://www.linuxidc.com/Linux/2017-03/141295.htm

CentOS 6.5+Ambari+HDP 集群安装  http://www.linuxidc.com/Linux/2017-03/141297.htm

本文永久更新链接地址 :http://www.linuxidc.com/Linux/2017-03/141303.htm

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计6766字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中