Upgrading Cloudera Manager 4 to Cloudera Manager 5

Minimum Required Role: Full Administrator

This process applies to upgrading all versions of Cloudera Manager 4 to Cloudera Manager 5.

In most cases, you can upgrade without shutting down most CDH services, although you may need to stop some dependent services. CDH daemons can run unaffected while Cloudera Manager is upgraded, and the upgrade process does not affect your CDH installation. However, to use Cloudera Manager 5 features, all services must be restarted after the upgrade. After upgrading Cloudera Manager you may also want to upgrade CDH 4 clusters to CDH 5.

Review Warnings and Notes

Before You Begin

Perform the following before upgrading to Cloudera Manager 5:

Stop Selected Services and Roles

If your cluster meets any of the conditions listed in the following table, you must stop the indicated services or roles.
Condition Procedure
Running a version of Cloudera Manager that has the Cloudera Management Service Stop the Cloudera Management Service.
Upgrading from Cloudera Manager 4.5 or later, and using the embedded PostgreSQL database for the Hive metastore Stop the services that have a dependency on the Hive metastore (Hue, Impala, and Hive). You cannot stop the Cloudera Manager Server database while these services are running. If you attempt to upgrade while the embedded database is running, the upgrade fails. Stop services that depend on the Hive metastore in the following order:
  1. Stop the Hue and Impala services.
  2. Stop the Hive service.
Running Cloudera Navigator Stop any of the following roles whose service's Queue Policy configuration (navigator.batch.queue_policy) is set to SHUTDOWN:
  • HDFS - NameNode
  • HBase - Master and RegionServers
  • Hive - HiveServer2
  • Hue - Beeswax Server
Stopping these roles renders any service depending on these roles unavailable. For HDFS - NameNode, this implies most of the services in the cluster will be unavailable until the upgrade is finished.

Stop Cloudera Manager Server, Database, and Agent

  1. Use the Admin Console to stop any running commands. These include commands a user runs and commands Cloudera Manager automatically triggers in response to a state change or a schedule. You can either wait for commands to complete or abort any running commands. For more information on viewing and aborting running commands, see Viewing Running and Recent Commands. If you do not stop all commands, the Cloudera Manager Server will fail to start after upgrade.
  2. On the host running the Cloudera Manager Server, stop the Cloudera Manager Server:
    $ sudo service cloudera-scm-server stop
  3. If you are using the embedded PostgreSQL database for Cloudera Manager, stop the database:
    $ sudo service cloudera-scm-server-db stop
  4. If the Cloudera Manager host is also running the Cloudera Manager Agent, stop the Cloudera Manager Agent:
    $ sudo service cloudera-scm-agent stop

(Optional) Upgrade the JDK on Cloudera Manager Server and Agent Hosts

If you are manually upgrading the Cloudera Manager Agent software in Upgrade and Start Cloudera Manager Agents (Packages) or Install Cloudera Manager Server and Agent Software (Tarballs), and you are upgrading to CDH 5, install the Oracle JDK on the Agent hosts as described in Java Development Kit Installation.

If you are not running Cloudera Manager Server on the same host as a Cloudera Manager Agent, and you want all hosts to run the same JDK version, optionally install the Oracle JDK on that host.

Upgrade Cloudera Manager Software

Upgrade Cloudera Manager Server (Packages)

  1. To upgrade the Cloudera Manager Server packages, you can upgrade from the Cloudera repository at https://archive.cloudera.com/cm5/, or you can create your own repository, as described in Understanding Custom Installation Solutions. You must create your own repository if you are upgrading a cluster that does not have Internet access.
    1. Find the Cloudera repo file for your distribution by starting at https://archive.cloudera.com/cm5/ and navigating to the directory that matches your operating system.

      For example, for Red Hat or CentOS 6, you would go to https://archive.cloudera.com/cm5/redhat/6/x86_64/cm/. In that directory, find the repo file that contains information including the repository base URL and GPG key. The contents of the cloudera-manager.repo are similar to the following:

      [cloudera-manager]
      # Packages for Cloudera Manager, Version 5, on RHEL or CentOS 6 x86_64
      name=Cloudera Manager
      baseurl=https://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5/
      gpgkey = https://archive.cloudera.com/cm5/redhat/6/x86_64/cm/RPM-GPG-KEY-cloudera 
      gpgcheck = 1
      For Ubuntu or Debian systems, go to the appropriate release directory, for example, https://archive.cloudera.com/cm4/debian/wheezy/amd64/cm. The repo file, in this case, cloudera.list, is similar to the following:
      # Packages for Cloudera Manager, Version 5, on Debian 7.0 x86_64
      deb https://archive.cloudera.com/cm5/debian/wheezy/amd64/cm wheezy-cm5 contrib
      deb-src https://archive.cloudera.com/cm5/debian/wheezy/amd64/cm wheezy-cm5 contrib
    2. Replace the repo file in the configuration location for the package management software for your system.
      Operating System Commands
      RHEL Copy cloudera-manager.repo to /etc/yum.repos.d/.
      SLES Copy cloudera-manager.repo to /etc/zypp/repos.d/.
      Ubuntu or Debian Copy cloudera.list to /etc/apt/sources.list.d/.
    3. Run the following commands:
      Operating System Commands
      RHEL
      $ sudo yum clean all
      $ sudo yum upgrade cloudera-manager-server cloudera-manager-daemons cloudera-manager-server-db-2 cloudera-manager-agent
      SLES
      $ sudo zypper clean --all
      $ sudo zypper up -r https://archive.cloudera.com/cm5/sles/11/x86_64/cm/5/
      To download from your own repository:
      $ sudo zypper clean --all
      $ sudo zypper rr cm 
      $ sudo zypper ar -t rpm-md http://myhost.example.com/path_to_cm_repo/cm  
      $ sudo zypper up -r http://myhost.example.com/path_to_cm_repo
      Ubuntu or Debian The following commands clean cached repository information and update Cloudera Manager components:
      $ sudo apt-get clean
      $ sudo apt-get update
      $ sudo apt-get dist-upgrade
      $ sudo apt-get install cloudera-manager-server cloudera-manager-daemons cloudera-manager-server-db-2 cloudera-manager-agent
      During this process, you may be prompted about your configuration file version:
      Configuration file `/etc/cloudera-scm-agent/config.ini'
      ==> Modified (by you or by a script) since installation.
      ==> Package distributor has shipped an updated version.
      What would you like to do about it ? Your options are:
      Y or I : install the package maintainer's version
      N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : start a shell to examine the situation
      The default action is to keep your current version.

      You will receive a similar prompt for /etc/cloudera-scm-server/db.properties. Answer N to both prompts.

  2. If you customized /etc/cloudera-scm-agent/config.ini, your customized file is moved to a file with the extension .rpmsave or .dpkg-old. Merge any customizations into /etc/cloudera-scm-agent/config.ini installed by the package manager.
You should now have the following packages, corresponding to the version of Cloudera Manager you installed, on the host that will be the Cloudera Manager Server host.
OS Packages
RPM-based distributions
$ rpm -qa 'cloudera-manager-*'
cloudera-manager-repository-5.0-1.noarch
cloudera-manager-server-5.6.1-0.cm561.p0.3.el6.x86_64
cloudera-manager-server-db-2-5.6.1-0.cm561.p0.3.el6.x86_64
cloudera-manager-agent-5.6.1-0.cm561.p0.3.el6.x86_64
cloudera-manager-daemons-5.6.1-0.cm561.p0.3.el6.x86_64
Ubuntu or Debian
~# dpkg-query -l 'cloudera-manager-*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                   Version                Description
+++-======================-======================-============================================================
ii  cloudera-manager-agent 5.6.1-0.cm561.p0.3~sq The Cloudera Manager Agent
ii  cloudera-manager-daemo 5.6.1-0.cm561.p0.3~sq Provides daemons for monitoring Hadoop and related tools.
ii  cloudera-manager-serve 5.6.1-0.cm561.p0.3~sq The Cloudera Manager Server
You may also see an entry for the cloudera-manager-server-db-2 if you are using the embedded database, and additional packages for plug-ins, depending on what was previously installed on the server host. If the cloudera-manager-server-db-2 package is installed, and you do not plan to use the embedded database, you can remove this package.

Install Cloudera Manager Server and Agent Software (Tarballs)

Tarballs contain both the Cloudera Manager Server and Cloudera Manager Agent in a single file. Download tarballs from the locations listed in Cloudera Manager Version and Download Information. Copy the tarballs and unpack them on all hosts on which you intend to install Cloudera Manager Server and Cloudera Manager Agents, in a directory of your choosing. If necessary, create a new directory to accommodate the files you extract from the tarball. For instance, if /opt/cloudera-manager does not exist, create it using a command similar to:
$ sudo mkdir /opt/cloudera-manager
Extract the contents of the tarball, to this directory. For example, to copy a tar file to your home directory and extract the contents of all tar files to the /opt/ directory, use a command similar to the following:
$ sudo tar xzf cloudera-manager*.tar.gz -C /opt/cloudera-manager

The files are extracted to a subdirectory named according to the Cloudera Manager version being extracted. For example, files could be extracted to /opt/cloudera-manager/cm-5.6.0/. This full path is needed later and is referred to as tarball_root directory.

Perform Configuration Required by Single User Mode

If you are creating a Cloudera Manager deployment that employs single user mode, perform the configuration steps described in Single User Mode Requirements.

Create Users

The Cloudera Manager Server and managed services require a user account to complete tasks. When installing Cloudera Manager from tarballs, you must create this user account on all hosts manually. Because Cloudera Manager Server and managed services are configured to use the user account cloudera-scm by default, creating a user with this name is the simplest approach. This created user, is used automatically after installation is complete.

To create user cloudera-scm, use a command such as the following:
$ sudo useradd --system --home=/opt/cloudera-manager/cm-5.6.0/run/cloudera-scm-server --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm
Ensure the --home argument path matches your environment. This argument varies according to where you place the tarball, and the version number varies among releases. For example, the --home location could be /opt/cm-5.6.0/run/cloudera-scm-server.

Create the Cloudera Manager Server Local Data Storage Directory

  1. Create the following directory: /var/lib/cloudera-scm-server.
  2. Change the owner of the directory so that the cloudera-scm user and group have ownership of the directory. For example:
    $ sudo mkdir /var/lib/cloudera-scm-server
    $ sudo chown cloudera-scm:cloudera-scm /var/lib/cloudera-scm-server

Configure Cloudera Manager Agents

  • On every Cloudera Manager Agent host, configure the Cloudera Manager Agent to point to the Cloudera Manager Server by setting the following properties in the tarball_root/etc/cloudera-scm-agent/config.ini configuration file:
    Property Description
    server_host Name of the host where Cloudera Manager Server is running.
    server_port Port on the host where Cloudera Manager Server is running.
  • By default, a tarball installation has a var subdirectory where state is stored. In a non-tarball installation, state is stored in /var. Cloudera recommends that you reconfigure the tarball installation to use an external directory as the /var equivalent (/var or any other directory outside the tarball) so that when you upgrade Cloudera Manager, the new tarball installation can access this state. Configure the installation to use an external directory for storing state by editing tarball_root/etc/default/cloudera-scm-agent and setting the CMF_VAR variable to the location of the /var equivalent. If you do not reuse the state directory between different tarball installations, duplicate Cloudera Manager Agent entries can occur in the Cloudera Manager database.

Configuring for a Custom Cloudera Manager User and Custom Directories

You can change the default username and directories used by Cloudera Manager. If you do not change the default, skip to Cloudera Manager and Managed Service Datastores. By default, Cloudera Manager creates the following directories in /var/log and /var/lib:
  • /var/log/cloudera-scm-headlamp
  • /var/log/cloudera-scm-firehose
  • /var/log/cloudera-scm-alertpublisher
  • /var/log/cloudera-scm-eventserver
  • /var/lib/cloudera-scm-headlamp
  • /var/lib/cloudera-scm-firehose
  • /var/lib/cloudera-scm-alertpublisher
  • /var/lib/cloudera-scm-eventserver
  • /var/lib/cloudera-scm-server
If you are using a custom username and custom directories for Cloudera Manager, you must create these directories on the Cloudera Manager Server host and assign ownership of these directories to the custom username. Cloudera Manager installer makes no changes to any directories that already exist. Cloudera Manager cannot write to any existing directories for which it does not have proper permissions, and if you do not change ownership, Cloudera Management Service roles may not perform as expected. To resolve these issues, do one of the following:
  • Change ownership of existing directories:
    1. Use the chown command to change ownership of all existing directories to the Cloudera Manager user. If the Cloudera Manager username and group are cloudera-scm, to change the ownership of the headlamp log directory, you issue a command similar to the following:
      $ sudo chown -R cloudera-scm:cloudera-scm /var/log/cloudera-scm-headlamp
  • Use alternate directories:
    1. If the directories you plan to use do not exist, create them. For example, to create /var/cm_logs/cloudera-scm-headlamp for use by the cloudera-scm user, you can use the following commands:
      mkdir /var/cm_logs/cloudera-scm-headlamp
      chown cloudera-scm /var/cm_logs/cloudera-scm-headlamp
    2. Connect to the Cloudera Manager Admin Console.
    3. Select Clusters > Cloudera Management Service
    4. Select Scope > role name.
    5. Click the Configuration tab.
    6. Enter a term in the Search field to find the settings to be changed. For example, you might enter /var or directory.
    7. Update each value with the new locations for Cloudera Manager to use.
    8. Click Save Changes to commit the changes.

Start Cloudera Manager Server

Choose a procedure based on how you installed Cloudera Manager:

Start the Cloudera Manager Server (Packages)

On the Cloudera Manager Server host (the system on which you installed the cloudera-manager-server package) do the following:
  1. If you are using the embedded PostgreSQL database for Cloudera Manager, start the database:
    $ sudo service cloudera-scm-server-db start
  2. Start the Cloudera Manager Server:
    $ sudo service cloudera-scm-server start
    You should see the following:
    Starting cloudera-scm-server:                              [  OK  ]

If the Cloudera Manager Server does not start, see Troubleshooting Installation and Upgrade Problems.

Start the Cloudera Manager Server (Tarballs)

The way in which you start the Cloudera Manager Server varies according to what account you want the Server to run under:
  • As root:
    $ sudo tarball_root/etc/init.d/cloudera-scm-server start 
  • As another user. If you run as another user, ensure the user you created for Cloudera Manager owns the location to which you extracted the tarball including the newly created database files. If you followed the earlier examples and created the directory /opt/cloudera-manager and the user cloudera-scm, you could use the following command to change ownership of the directory:
    $ sudo chown -R cloudera-scm:cloudera-scm /opt/cloudera-manager

    Once you have established ownership of directory locations, you can start Cloudera Manager Server using the user account you chose. For example, you might run the Cloudera Manager Server as cloudera-service. In this case, you have the following options:

    • Run the following command:
      $ sudo -u cloudera-service tarball_root/etc/init.d/cloudera-scm-server start 
    • Edit the configuration files so the script internally changes the user. Then run the script as root:
      1. Remove the following line from tarball_root/etc/default/cloudera-scm-server:
        export CMF_SUDO_CMD=" "
      2. Change the user and group in tarball_root/etc/init.d/cloudera-scm-server to the user you want the server to run as. For example, to run as cloudera-service, change the user and group as follows:
        USER=cloudera-service
        GROUP=cloudera-service
      3. Run the server script as root:
        $ sudo tarball_root/etc/init.d/cloudera-scm-server start 
  • To start the Cloudera Manager Server automatically after a reboot:
    1. Run the following commands on the Cloudera Manager Server host:
      • RHEL-compatible and SLES
        $ cp tarball_root/etc/init.d/cloudera-scm-server /etc/init.d/cloudera-scm-server
        $ chkconfig cloudera-scm-server on
      • Debian/Ubuntu
        $ cp tarball_root/etc/init.d/cloudera-scm-server /etc/init.d/cloudera-scm-server
        $ update-rc.d cloudera-scm-server defaults
    2. On the Cloudera Manager Server host, open the /etc/init.d/cloudera-scm-server file and change the value of CMF_DEFAULTS from ${CMF_DEFAULTS:-/etc/default} to tarball_root/etc/default.

Upgrade and Start Cloudera Manager Agents

Choose a procedure based on how you installed Cloudera Manager:

Upgrade and Start Cloudera Manager Agents (Packages)

  1. Log in to the Cloudera Manager Admin Console.
  2. Upgrade hosts using one of the following methods:
    • Cloudera Manager installs Agent software
      1. Select Yes, I would like to upgrade the Cloudera Manager Agent packages now and click Continue.
      2. Select the release of the Cloudera Manager Agent to install. Normally, this is the Matched Release for this Cloudera Manager Server. However, if you used a custom repository (instead of archive.cloudera.com) for the Cloudera Manager server, select Custom Repository and provide the required information. The custom repository allows you to use an alternative location, but that location must contain the matched Agent version.
      3. Click Continue. The JDK Installation Options page displays.
        • Leave Install Oracle Java SE Development Kit (JDK) checked to allow Cloudera Manager to install the JDK on each cluster host, or uncheck if you plan to install it yourself.
        • If local laws permit you to deploy unlimited strength encryption, and you are running a secure cluster, check the Install Java Unlimited Strength Encryption Policy Files checkbox.
        Click Continue.
      4. Specify credentials and initiate Agent installation:
        • Select root or enter the username for an account that has password-less sudo permission.
        • Select an authentication method:
          • If you choose password authentication, enter and confirm the password.
          • If you choose public-key authentication, provide a passphrase and path to the required key files.
        • You can specify an alternate SSH port. The default value is 22.
        • You can specify the maximum number of host installations to run at once. The default value is 10.
      5. Click Continue. The Cloudera Manager Agent packages are installed.
      6. Click Continue. The Host Inspector runs to inspect your managed hosts for correct versions and configurations. If there are problems, you can make changes and then rerun the inspector. When you are satisfied with the inspection results, click Finish.
    • Manually install Agent software
      1. On all cluster hosts except the Cloudera Manager Server host, stop the Agent:
        $ sudo service cloudera-scm-agent stop
      2. In the Cloudera Admin Console, select No, I would like to skip the agent upgrade now and click Continue.
      3. Copy the appropriate repo file as described in Upgrade Cloudera Manager Server (Packages).
      4. Run the following commands:
        Operating System Commands
        RHEL
        $ sudo yum clean all
        $ sudo yum upgrade cloudera-manager-server cloudera-manager-daemons cloudera-manager-server-db-2 cloudera-manager-agent
        SLES
        $ sudo zypper clean --all
        $ sudo zypper up -r https://archive.cloudera.com/cm5/sles/11/x86_64/cm/5/
        To download from your own repository:
        $ sudo zypper clean --all
        $ sudo zypper rr cm 
        $ sudo zypper ar -t rpm-md http://myhost.example.com/path_to_cm_repo/cm  
        $ sudo zypper up -r http://myhost.example.com/path_to_cm_repo
        Ubuntu or Debian Use the following commands to clean cached repository information and update Cloudera Manager components:
        $ sudo apt-get clean
        $ sudo apt-get update
        $ sudo apt-get dist-upgrade
        $ sudo apt-get install cloudera-manager-agent cloudera-manager-daemons
        During this process, you may be prompted about your configuration file version:
        Configuration file `/etc/cloudera-scm-agent/config.ini'
        ==> Modified (by you or by a script) since installation.
        ==> Package distributor has shipped an updated version.
        What would you like to do about it ? Your options are:
        Y or I : install the package maintainer's version
        N or O : keep your currently-installed version
        D : show the differences between the versions
        Z : start a shell to examine the situation
        The default action is to keep your current version.

        You will receive a similar prompt for /etc/cloudera-scm-server/db.properties. Answer N to both prompts.

      5. If you customized /etc/cloudera-scm-agent/config.ini, your customized file is moved to a file with the extension .rpmsave or .dpkg-old. Merge any customizations into /etc/cloudera-scm-agent/config.ini installed by the package manager.
      6. On all cluster hosts, start the Agent:
        $ sudo service cloudera-scm-agent start
  3. If you are upgrading from a free version of Cloudera Manager prior to 4.6:
    1. Click Continue to assign the Cloudera Management Services roles to hosts.
    2. If you are upgrading to Cloudera Enterprise, specify required databases:
      1. Choose the database type:
        • Keep the default setting of Use Embedded Database to have Cloudera Manager create and configure required databases. Record the auto-generated passwords.

        • Select Use Custom Databases to specify external database host, enter the database type, database name, username, and password for the database that you created when you set up the database.
        • If you are adding the Oozie service, you can change your Oozie configuration to control when data is purged in order to improve performance, cut down on database disk usage, improve upgrade performance, or to keep the history for a longer period of time. See Configuring Oozie Data Purge Settings Using Cloudera Manager.
      2. Click Test Connection to confirm that Cloudera Manager can communicate with the database using the information you have supplied. If the test succeeds in all cases, click Continue; otherwise, check and correct the information you have provided for the database and then try the test again. (For some servers, if you are using the embedded database, you will see a message saying the database will be created at a later step in the installation process.)

        The Cluster Setup Review Changes screen displays.

  4. Click Finish.
  5. If you are upgrading from Cloudera Manager prior to 4.5:
    1. Select the host for the Hive Metastore Server role.
    2. Review the configuration values and click Accept to continue.
  6. If you are upgrading from Cloudera Manager 4.5 or earlier, correct the Hive home directory permissions (/user/hive) as follows:
    sudo -u hdfs hdfs dfs -chown hive:hive /user/hive/
    sudo -u hdfs hdfs dfs -chmod 1775 /user/hive/
  7. If you are upgrading from Cloudera Manager prior to 4.8 and have an Impala service, assign the Impala Catalog Server role to a host.
  8. Review the configuration changes to be applied.
  9. Click Finish.

All services (except for the services you stopped in Stop Selected Services and Roles) should be running.

Restart Cloudera Manager Agents (Tarballs)

Stop Cloudera Manager Agents (Tarballs)

  • To stop the Cloudera Manager Agent, run this command on each Agent host:
    $ sudo tarball_root/etc/init.d/cloudera-scm-agent stop
  • If you are running single user mode, stop Cloudera Manager Agent using the user account you chose. For example, if you are running the Cloudera Manager Agent as cloudera-scm, you have the following options:
    • Run the following command:
      $ sudo -u cloudera-scm tarball_root/etc/init.d/cloudera-scm-agent stop 
    • Edit the configuration files so the script internally changes the user, and then run the script as root:
      1. Remove the following line from tarball_root/etc/default/cloudera-scm-agent:
        export CMF_SUDO_CMD=" "
      2. Change the user and group in tarball_root/etc/init.d/cloudera-scm-agent to the user you want the Agent to run as. For example, to run as cloudera-scm, change the user and group as follows:
        USER=cloudera-scm
        GROUP=cloudera-scm
      3. Run the Agent script as root:
        $ sudo tarball_root/etc/init.d/cloudera-scm-agent stop 

Start Cloudera Manager Agents (Tarballs)

Start the Cloudera Manager Agent according to the account you want the Agent to run under:
  • To start the Cloudera Manager Agent, run this command on each Agent host:
    $ sudo tarball_root/etc/init.d/cloudera-scm-agent start
    When the Agent starts, it contacts the Cloudera Manager Server.
  • If you are running single user mode, start Cloudera Manager Agent using the user account you chose. For example, to run the Cloudera Manager Agent as cloudera-scm, you have the following options:
    • Run the following command:
      $ sudo -u cloudera-scm tarball_root/etc/init.d/cloudera-scm-agent start 
    • Edit the configuration files so the script internally changes the user, and then run the script as root:
      1. Remove the following line from tarball_root/etc/default/cloudera-scm-agent:
        export CMF_SUDO_CMD=" "
      2. Change the user and group in tarball_root/etc/init.d/cloudera-scm-agent to the user you want the Agent to run as. For example, to run as cloudera-scm, change the user and group as follows:
        USER=cloudera-scm
        GROUP=cloudera-scm
      3. Run the Agent script as root:
        $ sudo tarball_root/etc/init.d/cloudera-scm-agent start 
  • To start the Cloudera Manager Agents automatically after a reboot:
    1. Run the following commands on each Agent host:
      • RHEL-compatible and SLES
        $ cp tarball_root/etc/init.d/cloudera-scm-agent /etc/init.d/cloudera-scm-agent
        $ chkconfig cloudera-scm-agent on
      • Debian/Ubuntu
        $ cp tarball_root/etc/init.d/cloudera-scm-agent /etc/init.d/cloudera-scm-agent
        $ update-rc.d cloudera-scm-agent defaults
    2. On each Agent, open the tarball_root/etc/init.d/cloudera-scm-agent file and change the value of CMF_DEFAULTS from ${CMF_DEFAULTS:-/etc/default} to tarball_root/etc/default.

Verify the Upgrade Succeeded

If the commands to update and start the Cloudera Manager Server complete without errors, you can assume the upgrade has completed successfully. To verify, you can check that the server versions have been updated.
  1. In the Cloudera Manager Admin Console, click the Hosts tab.
  2. Click Host Inspector. On large clusters, the host inspector may take some time to finish running. You must wait for the process to complete before proceeding to the next step.
  3. Click Show Inspector Results. All results from the host inspector process are displayed, including the currently installed versions. If this includes listings of current component versions, the installation completed as expected.

Add Hive Gateway Roles

If you are upgrading from a release prior to Cloudera Manager 4.5, add Hive gateway roles to any hosts where Hive clients should run.
  1. Go to the Hive service.
  2. Click the Instances tab.
  3. Click the Add Role Instances button.
  4. Select the hosts on which you want a Hive gateway role to run. This ensures that the Hive client configurations are deployed on these hosts.

Configure Cluster Version for Package Installs

If you have installed CDH as a package, after an installation or upgrade, make sure that the cluster CDH version matches the package CDH version, using the procedure in Configuring the CDH Version of a Cluster. If the cluster CDH version does not match the package CDH version, Cloudera Manager incorrectly enables and disables service features based on the cluster's configured CDH version.

Upgrade Impala

If your version of Impala is 1.1 or earlier, upgrade to Impala 1.2.1 or later.

(Optional) Configure TLS/SSL for Cloudera Management Service

If you have enabled TLS security for the Cloudera Manager Admin Console, as of Cloudera Manager 5.1, Cloudera Management Service roles try to communicate with Cloudera Manager using TLS, and fail to start until TLS/SSL properties have been configured. Configure Cloudera Management Service roles to communicate with Cloudera Manager over TLS/SSL as follows:
  1. Do one of the following:
    • Select Clusters > Cloudera Management Service > Cloudera Management Service.
    • On the Status tab of the Home > Status tab, in Cloudera Management Service table, click the Cloudera Management Service link.
  2. Click the Configuration tab.
  3. Select Scope > Cloudera Management Service (Service-Wide).
  4. Select Category > Security.
  5. Edit the following TLS/SSL properties according to your cluster configuration.
    Property Description
    TLS/SSL Client Truststore File Location Path to the client truststore file used in HTTPS communication. The contents of this truststore can be modified without restarting the Cloudera Management Service roles. By default, changes to its contents are picked up within ten seconds.
    TLS/SSL Client Truststore File Password Password for the client truststore file.
  6. Click Save Changes to commit the changes.
  7. Restart the Cloudera Management Service.
For more information, see HTTPS Communication in Cloudera Manager.

(Optional) Deploy a Cloudera Manager Agent Upgrade

Several conditions require you to upgrade the Cloudera Manager Agent:
  • Deploying a fix to an issue where Cloudera Manager did not always correctly restart services
  • Using the maximum file descriptor feature
  • Enabling HDFS DataNodes to start if you perform the step (Optional) Upgrade CDH after upgrading Cloudera Manager
To deploy the Cloudera Manager Agent upgrade, perform the following steps:
  1. Stop all CDH and managed services.
  2. On all hosts with Cloudera Manager Agents, hard restart the Agents. Before performing this step, ensure you understand the semantics of the hard_restart command by reading Hard Stopping and Restarting Agents.
    • Packages
      • RHEL-compatible 7 and higher:
        $ sudo service cloudera-scm-agent next_stop_hard
        $ sudo service cloudera-scm-agent restart
      • All other Linux distributions:
        $ sudo service cloudera-scm-agent hard_restart
        
    • Tarballs
      • To stop the Cloudera Manager Agent, run this command on each Agent host:
        • RHEL-compatible 7 and higher:
          $ sudo tarball_root/etc/init.d/cloudera-scm-agent next_stop_hard
          $ sudo tarball_root/etc/init.d/cloudera-scm-agent restart
        • All other Linux distributions:
          $ sudo tarball_root/etc/init.d/cloudera-scm-agent hard_restart
      • If you are running single user mode, start Cloudera Manager Agent using the user account you chose. For example to run the Cloudera Manager Agent as cloudera-scm, you have the following options:
        • Run the following command:
          • RHEL-compatible 7 and higher:
            $ sudo -u cloudera-scm tarball_root/etc/init.d/cloudera-scm-agent next_stop_hard
            $ sudo -u cloudera-scm tarball_root/etc/init.d/cloudera-scm-agent restart
          • All other Linux distributions:
            $ sudo -u cloudera-scm tarball_root/etc/init.d/cloudera-scm-agent hard_restart 
        • Edit the configuration files so the script internally changes the user, and then run the script as root:
          1. Remove the following line from tarball_root/etc/default/cloudera-scm-agent:
            export CMF_SUDO_CMD=" "
          2. Change the user and group in tarball_root/etc/init.d/cloudera-scm-agent to the user you want the Agent to run as. For example, to run as cloudera-scm, change the user and group as follows:
            USER=cloudera-scm
            GROUP=cloudera-scm
          3. Run the Agent script as root:
            • RHEL-compatible 7 and higher:
              $ sudo -u cloudera-scm tarball_root/etc/init.d/cloudera-scm-agent next_stop_hard
              $ sudo -u cloudera-scm tarball_root/etc/init.d/cloudera-scm-agent restart
            • All other Linux distributions:
              $ sudo -u cloudera-scm tarball_root/etc/init.d/cloudera-scm-agent hard_restart 
  3. Start all services.

Deploy a JDK Upgrade

If you upgraded the JDK when installing the Cloudera Manager Agents, do the following:

  1. If the Cloudera Manager Server host is also running a Cloudera Manager Agent, restart the Cloudera Manager Server:
    • Packages
      $ sudo service cloudera-scm-server restart
    • Tarballs
      $ sudo tarball_root/etc/init.d/cloudera-scm-agent restart

    If the Cloudera Manager Server does not start, see Troubleshooting Installation and Upgrade Problems.

  2. If you have not restarted services in previous steps, restart all services:
    1. On the Home > Status tab, click next to the cluster name and select Restart.
    2. In the confirmation dialog box, click Restart.

(Optional) Deploy Monitoring Upgrade

Cloudera Manager 5 provides monitoring support for all roles. However, the Cloudera Manager Agent does not send monitoring data for these roles until:
  1. The Cloudera Manager Agent has been upgraded and restarted.
  2. The monitored roles have been restarted.
Until you restart the roles, some data is not in the monitoring charts and health tests. To enable monitoring for all roles, if you have not restarted services in previous steps, perform the following steps:
  1. On the Home > Status tab, click next to the cluster name and select Restart.
  2. In the confirmation dialog box that displays, click Restart.

Start Selected Services and Roles

Start services and roles you shut down in Stop Selected Services and Roles that have not been started in other steps:
  1. If you are not upgrading CDH, do the following:
    1. If you are running Cloudera Navigator, start the following roles of audited services:
      • HDFS - NameNode
      • HBase - Master and RegionServers
      • Hive - HiveServer2
      • Hue - Beeswax Server
    2. On the Home > Status tab, click next to the name of each service you shut down and select Start.
    3. In the confirmation dialog box, click Start.
  2. On the Home > Status tab, click next to the Cloudera Management Service and select Start.
  3. In the confirmation dialog box, click Start.

Deploy Updated Client Configurations

The services for which client configurations require redeployment are indicated with the icon on the Home > Status tab. To ensure clients have current information about resources, update the client configuration:
  1. On the Home > Status tab, click next to the cluster name and select Deploy Client Configuration.
  2. In the confirmation dialog box, click Deploy Client Configuration.

Test the Installation

When you have finished the upgrade to Cloudera Manager, you can test the installation to verify that the monitoring features are working as expected; follow the instructions in Testing the Installation.

(Optional) Upgrade CDH

Cloudera Manager 5 can manage both CDH 4 and CDH 5, so upgrading existing CDH 4 installations is not required, but you may want to upgrade to the latest version. For more information on upgrading CDH, see Upgrading CDH and Managed Services Using Cloudera Manager.