Wednesday, November 27, 2013

Upgrade Cloudera Manager from 4.7.0 to 4.8.0

CDH4.5, Cloudera Manager 4.8, Cloudera Impala 1.2.1 and Cloudera Search 1.1

1. Backup databases:
Log in to the host where the Cloudera Manager Server is installed.
Run the following command as root:
# cat /etc/cloudera-scm-server/

The file contains something like this:
# Auto-generated by
# Mon Jul 27 22:36:36 PDT 2011

Run the following command as root using the parameters from the preceding step:
# pg_dump -h localhost -p 7432 -U scm > /tmp/scm_server_db_backup.$(date +%Y%m%d)

Enter the password specified for the com.cloudera.cmf.db.password property on the last line of the file. If you are using the embedded database, Cloudera Manager generated the password for you during installation. If you are using an external database, enter the appropriate information for your database.

2. Stop Hadoop cluster and other services.
From the Services tab select All Services in the Cloudera Manager Admin Console.
Choose Stop on the Actions menu for the Cloudera Management Services.
If you are upgrading from Cloudera Manager 4.5 to a newer version, and you are using the embedded PostgreSQL database, you must stop the services that have a dependency on the Hive Metastore (Hive, Hue, and Impala). You will not be able to stop the Cloudera Manager server's database while these services are running.
Choose Stop on the Actions menus for the Hive and Hue services. Do the same for Impala if you have it running.

3. Stop Cloudera client/server services and DB service.
Log into all the server where CM agents are installed:
# service cloudera-scm-agent stop

Log into the server where CM server is installed:
# service cloudera-scm-server stop
# service cloudera-scm-server-db stop

4. Update repo file, go to, find the repo file that contains information including the repository's base URL and gpgkey. For example, it might look like:
name = Cloudera Manager, Version 4.8.0
baseurl =
gpgkey =
gpgcheck = 1

5. Verify the currenly installed Cloudera packages:
# rpm -qa | grep cloudera

6. Clean up yum's cache directories, ensuring that you download and install the latest versions of the packages. Now you can see you have all 4.8.0 version.
# yum clean all
[root@rtlnn1 ~]# yum list | grep cloudera-*
cloudera-manager-agent.x86_64            4.7.0-1.cm470.p0.122.el6       @cloudera-manager
cloudera-manager-daemons.x86_64          4.7.0-1.cm470.p0.122.el6       @cloudera-manager
cloudera-manager-repository.noarch       4.0-1                          installed
cloudera-manager-server.x86_64           4.7.0-1.cm470.p0.122.el6       @cloudera-manager
cloudera-manager-server-db.x86_64        4.7.0-1.cm470.p0.122.el6       @cloudera-manager
jdk.x86_64                               2000:1.6.0_31-fcs              @cloudera-manager
cloudera-manager-agent.x86_64            4.8.0-1.cm480.p0.50.el6        cloudera-manager
cloudera-manager-daemons.x86_64          4.8.0-1.cm480.p0.50.el6        cloudera-manager
cloudera-manager-server.x86_64           4.8.0-1.cm480.p0.50.el6        cloudera-manager
cloudera-manager-server-db.x86_64        4.8.0-1.cm480.p0.50.el6        cloudera-manager
enterprise-debuginfo.x86_64              4.8.0-1.cm480.p0.50.el6        cloudera-manager

7. Upgrade Cloudera manager:
# yum update 'cloudera-*'

8. Verify the upgrade:
# rpm -qa 'cloudera-manager-*'

9. Now CM-4.8.0 is installed, let's bring back all the services:
Start DB server:
# service cloudera-scm-server-db start
DB initialization done.
waiting for server to start..... done
server started

Start scm server:
# service cloudera-scm-server start
Starting cloudera-scm-server:                              [  OK  ]

10. Deploy the Upgraded Agent Software:
Log in to the Cloudera Manager Admin Console. If you have just restarted the Cloudera Manager server, you may need to log in again.
Install Cloudera Standard

Click "Start Upgrade"

Choose "Matched release for this Cloudera Manager server"

Provide SSH login info

Start upgrading, the whole process might take couple of minutes or more, depends on the network speed.

Once all complete, click continue

Let the hosts inspection run, make sure all green :)

It will ask you to add a role instance for Impala1, I choose the same server that installed Impala statestore role

Finally upgrade finishes, click continue

11. Start all services. You are done.

12. Make sure you upgrade Impala to 1.2.1, CM4.8.0 requires Impala-1.2.1, because there is a new role called catalog server. 

No comments: