How To Upgrade From HDP 2.3 To HDP 2.5 Using Ambari On Centos

It's only fair to share...Share on Facebook0Share on Google+0Tweet about this on Twitter0Share on LinkedIn0Pin on Pinterest0Digg thisShare on StumbleUpon0

hdp upgrade

HDP 2.5 Upgrade Steps

######### Pre-Upgrade #########

Step 1: First, upgrade hdfs heap size to at least 2 GB (1GB will fail)

Ambari > HDFS > Configs > NameNode Java heap size  -> 2 GB +

Step 2: Login through putty and do the mentioned steps

# Make Directories
mkdir /opt/ambari-upgrade
mkdir /opt/ambari-upgrade/hdfs
mkdir /opt/ambari-upgrade/postgress

# make directories writable by all
cd /opt/ambari-upgrade
chmod 777 -R *

# stop ambari
ambari-server stop
ambari-agent stop

######### Postgress ######### 

Step 3:  postgress backup procedure
cd /opt/ambari-upgrade/postgress

pg_dump -U ambari ambari > ambari.sql
Password: ‘bigdata’

pg_dump -U mapred ambarirca > ambarirca.sql
Password: ‘mapred’

# REFERENCE FOR RESTORE: https://community.hortonworks.com/articles/37765/backing-up-the-ambari-database-with-postgres.html

######### Ambari Repo / Install ######### 

Step 4: delete the old ambari repo
rm -rf /etc/yum.repos.d/ambari.repo

Step 5: get the new ambari repo
wget -nv http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.4.1.0/ambari.repo -O /etc/yum.repos.d/ambari.repo

NOTE: Select the repository appropriate for your environment from the following list: Click Here

Step 6: YUM check
yum clean all
yum info ambari-server (should output something around 2.X)

Step 7: Upgrade server
yum upgrade ambari-server

Step 8: Upgrade agents
yum upgrade ambari-agent

Step 9: Check agent upgrade
rpm -qa | grep ambari-agent

Step 10: Upgrade ambari server DB
ambari-server upgrade

Step 11: Start Ambari Server and Agent
ambari-server start
ambari-agent start

Restart All running services using Ambari UI.

######### HDP Upgrade ######### 

step 12: Create Backups
su -l hdfs

step 13: create logs
cd /opt/ambari-upgrade/hdfs
hdfs fsck / -files -blocks -locations > dfs-old-fsck-1.log
hdfs dfsadmin -report > dfs-old-report-1.log
hdfs dfs -ls -R / > dfs-old-lsr-1.log

step 14: Save Namespace
hdfs dfsadmin -safemode enter
hdfs dfsadmin -saveNamespace

cp -r /hadoop/hdfs/namenode /opt/ambari-upgrade/hdfs

hdfs dfsadmin -safemode leave

# finalize any old hdfs upgrade
hdfs dfsadmin -finalizeUpgrade

######### Perform Install ######### 

step 15: Log into Ambari

step 16:

  • Hover over Admin -> Stack and Version
  • Versions Tab
  • Manage Versions
  • under “stack” select the desired version (HDP-2.5 in this case)
  • Press Register Version in the upper right corner (blue button)
  • scroll to the bottom and press “save”
  • Hover over “Install on” and select the cluster name
  • Press the blue “Install”

# When Finished, the install button changes to Upgrade

#########  Perform Upgrade ######### 

step 17:
Click Perform Upgrade
Run Service Checks on All Components
Use Express Upgrade (it will stop service)

Notes
- If you get connection refused  500570 – pause upgrade, go to hdfs and make sure NameNode service is started
- Could be result of out of memory (see increasing heap size above)

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">