Upgrade the cluster components.
Install the new version packages and run the upgrade through Ambari.
Upgrade the components through Ambari in two stages: install the new version packages and run the upgrade.
Before starting the upgrade, make sure that all prerequisites have been met, services are functional, and the Auto Start function is disabled in Ambari.
Scenarios
- 1 · Install the packages
- 2 · Upgrade
- 3 · Finalize, postpone, or go back
- 4 · Wrap up
Install the packages on the cluster machines. Until then the cluster keeps running the current version.
With the new TDP stack version registered in Ambari, as described in New version registration, the next step is to install its packages on the Cluster machines. This is the first of the two stages of the component upgrade.
The new stack version is registered and appears in the VERSIONS tab.
Ambari, Stack and Versions page, VERSIONS tab.
Install the new version packages
The new version packages installed on the cluster machines.
In Ambari, on the "Stack and Versions" page, VERSIONS tab, click the INSTALL PACKAGES button of the new version.
Confirm the package installation.
Check the total of machines with installed packages
The total of machines with the new version packages installed.
Click the "Show details" link of both versions to view the total number of machines with installed packages.
Until this point, even if the new version packages are already installed on the machines, the Cluster still runs with the component binaries of the current version ("CURRENT"). At this stage, any problem is limited to the RPM installation.
It worked when
Run the upgrade through Ambari and follow the service check.
With the new version packages installed, the next step is to run the upgrade. Ambari now offers two options: the Express Upgrade, the fastest option, in which all Cluster services are suspended for the upgrade, and the Rolling Upgrade, in which the upgrade runs without a full stop of the services. Choose below. The text and the steps change with the choice.
New version packages installed (scenario 1) and prerequisites met.
Service check and options to complete the process: scenario 3.
The steps of the component upgrade
- New version registration. The new stack version is registered in Ambari on its own page. After registration, the VERSIONS tab already shows the new version.
- Package installation. Until this point, the cluster still runs with the component binaries of the current version (CURRENT). Any problem at this stage is limited to the RPM installation. (
INSTALL PACKAGES) - Express Upgrade. It is the fastest option, and all cluster services are suspended for the upgrade. (
UPGRADE > Express) - Complete the process. FINALIZE completes the process and sets the new version as CURRENT. The other options are DOWNGRADE, which reverts the upgrade, and FINALIZE LATER, which postpones finalization. (
FINALIZE) - Upgrade wrap-up. Check the UPGRADE HISTORY, add the new services available in the STACK tab, restart the Ambari Server, and re-enable automatic service start. (
ambari-server restart)
The Express Upgrade upgrades the Cluster components to the new version quickly and safely, but requires a full stop of the Cluster services. Best suited when a full stop of the Cluster services is acceptable.
Although slower, the Rolling Upgrade upgrades the Cluster components to a new version without completely interrupting the services. This is possible as long as the services are highly available or their components run in a distributed architecture with no single point of coordination and control (No Master). Best suited when the services cannot be completely interrupted and are highly available or have components in a distributed architecture, with no single point of coordination and control.
Start the upgrade
The chosen upgrade type started in Ambari.
With the prerequisites met, follow the steps below.
Click the UPGRADE button of the new version, select the "Express" upgrade option, click "Proceed" to continue, and confirm the operation.
Click the UPGRADE button of the new version and select and confirm the "Rolling Upgrade" option.
It worked when
Follow the process and respond to the prompts
The upgrade in progress, with the Ambari prompts answered.
Follow the upgrade process and pay attention to the messages and prompts displayed on the screen.
During the Express Upgrade, the services are unavailable. The total downtime depends on several factors, such as the number of machines, the number of services, and the network speed, among others.
If the Apache Hive service is installed, during the upgrade you will be asked for a backup of the Hive Metastore database. This backup is required to recover the environment in case of failure or for the version downgrade. Then, back in Ambari, confirm that the backup was made to proceed with the upgrade.
Confirm that the backup of the metadata databases was made.
A series of configurations is made automatically during the upgrade.
You can suspend the "Rolling Upgrade" at any time: select the "Pause Upgrade" button. This lets you pause the upgrade to fix any irregularity or revert the operation (rollback).
Confirm that the requested manual steps (steps) were performed.
To check whether the upgraded components are already working, click the "all service checks" link. This way you identify and fix any problems before the service check (Service Check) stage, performed at the end of the upgrade.
It worked when
Follow the service check
The check of all upgraded services (Service Check).
Follow the check of all upgraded services (Service Check).
It worked when
Choose between DOWNGRADE, FINALIZE LATER, and FINALIZE, and confirm the finalization.
The check of the upgraded services is done and Ambari presents the options to complete the upgrade process. The choice is the same in the Express Upgrade and in the Rolling Upgrade: revert, finalize later, or finalize now.
Reverts the upgrade process. All components go back to their previous versions.
Lets you finalize the upgrade process at another time, so you can run tests and validations.
Finalizes the upgrade process and sets the new version as "CURRENT".
Select how to complete the process
DOWNGRADE, FINALIZE LATER, or FINALIZE, as described in the table above.
Select one of the options to complete the upgrade process.
If Apache HBase is among the upgraded services, at the end of the upgrade you will be asked to confirm the deletion of the snapshot created during the process.
Finalize the upgrade
The process finalized, with the new version set as CURRENT.
Select "Finalize" to finalize the upgrade process.
Click "Proceed" to confirm the finalization of the upgrade process.
It worked when
Check the history, add the new services, restart the Ambari Server, and re-enable Auto Start.
The upgrade was finalized and the closing tasks remain: check the version and the history, add the new services available, restart the Ambari Server, and re-enable automatic service start.
Check the version and the history
The new version as CURRENT and the upgrade record in Ambari.
In the VERSIONS tab of the "Stack and Versions" page, the previous version was removed and the new version is set as "CURRENT".
Note that the UPGRADE HISTORY tab was added to the "Stack and Versions" page. In this tab you see the cluster upgrade history, with details such as the type of upgrade performed, the previous and the new version of the stack and its services.
It worked when
Add the new servicesOpcional
The services available in the new TDP version added to the cluster.
Now, in the STACK tab of the "Stack and Versions" page, you can add the new services available in the new TDP version.
Restart the Ambari Server
The Ambari Server service restarted.
Restart the Ambari Server service:
ambari-server restart
Restarting the Ambari Server is required to consolidate certain changes and configurations.
It worked when
$ ambari-server restart
Using python /usr/bin/python
Restarting ambari-server
Waiting for server stop...
Ambari Server stopped
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start....................
Server started listening on 8080
DB configs consistency check: no errors and warnings were found.Re-enable automatic service start
Auto Start enabled again.
After finalizing, re-enable Automatic Service Start: in the Ambari side menu, select the "Service Auto-Start" option and change the "Auto Start Settings" switch to "Enabled".
It worked when
Next steps
Requirements
Upgrade prerequisites
Check what must be met before the upgrade, including the Auto Start function.