Skip to main content

The whole cluster managed from one place.
Install, configure, and monitor the services.

Apache Ambari provisions, manages, and monitors the cluster: it installs the services on the hosts, centralizes starting, stopping, and reconfiguring them, and shows the health of the environment. Follow a configuration change from Ambari Web to the component restarted on each host.

A stack defines the services of a platform and where their packages come from, and Ambari installs, configures, and tracks those services on all the hosts of the cluster.

In TDP Datacenter, TDP is the stack, and Ambari is the cluster management tool.

One central point

One server, one agent per host

The Ambari Server controls the cluster, and an Ambari Agent on each host runs the commands. Every operation goes through the REST API.

Versioned configurations

Each save, one version

Every configuration applied to the cluster becomes a numbered service configuration version, and it is possible to go back to an earlier version.

Health at a glance

Alerts and metrics

Alert definitions check ports, web addresses, metrics, and scripts on the hosts, or combine the results of other definitions, and Ambari Metrics collects the metrics of the hosts and services.

On this page

See a configuration change​

Press Play or move forward step by step. A property changes in Ambari Web. At the end, the components on each host are restarted with the new value. The underlined names lead to the Glossary.

Ambari WebWho requests
Ambari WebAdministrator web interface
Ambari ServerWho coordinates
REST APIReceives the requests
Ambari ServerPlans and tracks
Ambari databaseState, configurations, and operations
Ambari AgentsWho executes
Ambari AgentOn host 1
Ambari AgentOn host 2
Host componentsWhat changes
Step 1 of 7

1 The change is saved

In Ambari Web, the administrator changes properties of a service config type and saves. Ambari Web does everything through the Ambari Server REST API, the same one that serves applications and scripts.

  1. The change is saved. In Ambari Web, the administrator changes properties of a service config type and saves. Ambari Web does everything through the Ambari Server REST API, the same one that serves applications and scripts.
  2. A version is created. The Ambari Server stores the new configuration in the Ambari database and creates a new service configuration version, which becomes the current one. Earlier versions remain stored.
  3. Ambari knows what to restart. Each host component reports the configurations it has applied: this is the actual configuration. Now the desired one is different, and this difference indicates which components need to be restarted.
  4. The restart becomes an operation. The restart request arrives through the REST API and becomes an operation. The Ambari Server splits it into stages, executed one after the other, and each stage into tasks, which run in parallel on different hosts. The API returns the address of the operation, where progress can be tracked.
  5. The agents receive the tasks. The Ambari Server delivers to each Ambari Agent the tasks for its host. The agent runs the command with the Python scripts that are part of the service definition in the stack.
  6. The components restart. On each host, the agent restarts the host component with the new configuration. After applying it, the host component reports the new configurations as the actual ones.
  7. The result comes back. Through the heartbeat, each agent sends the Ambari Server the progress and the result of the tasks. The server records the completion in the Ambari database, and Ambari Web shows the progress in near real time.
Figure 1 - A configuration change in Ambari. Ambari Web talks only to the REST API; the Ambari Server plans and tracks; the Ambari Agents do the work on each host.

Architecture​

One Ambari Server controls the cluster. One Ambari Agent on each host does the work.

Apache Ambari architecture: clients, Ambari Server, Ambari database and Ambari Agents on the hostsAmbari Web and the applications that use the REST API talk to the Ambari Server. Inside the Ambari Server are the REST API, the operations divided into stages and tasks, the stack definitions and the configuration versions; state is kept in the Ambari database. Each cluster host has an Ambari Agent, which receives commands from the Ambari Server and returns heartbeat and status, and the services' host components. The hosts' Metrics Monitors send metrics to the Metrics Collector of Ambari Metrics.ClientsAmbari WebWeb interfaceApplicationsDirect callsto the REST API andblueprintsAmbari ServerREST APIServes Ambari Web and applicationsOperationsSplit into stages and tasksStackServices, components and config typesConfiguration versionsDesired and current configurationAmbari databaseCluster state and operationsHOSTHOSTHOSTAmbariAgentAmbariAgentAmbariAgentCommands and alertsCommands and alertsCommands and alertsHostcomponentsHostcomponentsOf the servicesOf the servicesMetricsMonitorMetricsMonitorMetricsMonitorMetricsCollectorRequests and commandsHeartbeatand statusHost metrics
Figure 2 - Apache Ambari architecture: clients, Ambari Server with the Ambari database, and one Ambari Agent on each host. The underlined terms lead to the Glossary.

What the figure shows:

  1. The clients are Ambari Web, the web interface, and applications, with direct calls to the REST API and blueprints.
  2. The REST API serves Ambari Web and the applications: the Ambari Server receives all operations through it.
  3. The Ambari Server controls the cluster. It brings together the operations, divided into stages and tasks, the stack, with services, components, and config types, and the configuration versions, with the desired and current configuration.
  4. The Ambari database stores the state and the operations of the cluster: the desired state and the pending operations are kept in it, and after a restart the server resumes what was left pending.
  5. The Ambari Agent, on each host, receives the commands from the server, runs them, and keeps the server informed through the heartbeat and the status. The agent keeps no state, and recovering an agent is just restarting it.
  6. The host components are the components of the services on the hosts.
  7. Ambari Metrics brings together the Metrics Monitors of the hosts, which send the metrics to the Metrics Collector.

From the cluster to the host component​

How Ambari sees the platform: four levels, each one inside the other.

Level 1 of 4

Cluster

The named set of hosts and services that the Ambari Server manages. Every cluster runs a version of a stack.

  • StackDefines the services of a platform version and where the packages come from. A stack version can extend another and inherit its services.
  • HostA machine, physical or virtual, that is part of the cluster, with its Ambari Agent.
  1. Cluster. The named set of hosts and services that the Ambari Server manages. Every cluster runs a version of a stack.
    • Stack. Defines the services of a platform version and where the packages come from. A stack version can extend another and inherit its services.
    • Host. A machine, physical or virtual, that is part of the cluster, with its Ambari Agent.
  2. Service. A stack service, such as Ambari Metrics, made up of one or more components. A service can also be just a client library, with no continuously running process.
    • Config type. A named group of service properties, such as ams-site and ams-env. Each save generates a new revision.
  3. Component. A part of a service with its own lifecycle: install, start, stop, and check the status. Ambari Metrics has the Metrics Collector, the Metrics Monitor, and Grafana.
    • Category. Master, Slave, or Client. The Metrics Collector and Grafana are masters. The Metrics Monitor is a slave.
    • Cardinality. How many instances the component allows in the cluster. The Metrics Monitor's is ALL: one on each host.
  4. Host component. The instance of a component on a host: the Metrics Monitor of a specific machine. This is where the Ambari Agent runs the commands.
    • Ambari Agent. Runs the Ambari Server commands on the host and reports the result.
Figure 3 - Ambari hierarchy: each level contains the next. The terms on the side accompany each level. The examples are from the Ambari Metrics service.

Each level has its own address in the REST API: clusters, services, components, hosts, and host components are API resources, and the host component is a sub-resource of the host.

Each save, one version​

Every applied configuration becomes a numbered version of the service.

A configuration is a set of key-value pairs stored in the Ambari Server, identified by the config type and by a tag, which marks the revision.

Creating a configuration and applying it are different steps: the desired configuration is the one the cluster should have. The actual one is what each host component reports having applied.

Numbered

One version per application

Each configuration applied to the cluster generates a new configuration version, with the service's own numbering, the author, the time, and an optional note.

One is in effect

The current version

In each service, one version is the current one: the service uses its configurations.

Back

Reverting creates a version

Going back to an earlier version creates a new version, with the configurations copied from the chosen version.

Alerts and metrics​

Ambari tracks the health of the cluster in two ways: checks and metric series.

Each service can declare, in the stack definition, the alert definitions that Ambari tracks.

The definitions are the templates distributed to the Ambari Agents, with the check type, the thresholds, and the information used in the notification.

PORT

Checks the TCP connection to an endpoint.

WEB

Checks a web address, as PORT does with a port.

METRIC

Queries values at JMX endpoints.

SCRIPT

Delegates the check to a Python script accessible to the Ambari Agents.

AGGREGATE

Combines the results of another definition across several hosts, such as the percentage of available Metrics Monitors.

Each alert is in OK, WARNING, CRITICAL, or UNKNOWN, and each state change is recorded in the history.

Email and SNMP notifications are configurable in Ambari.

Ambari Metrics collects, aggregates, and serves the metrics of the hosts and services.

Each service can define, in the stack, which metrics Ambari Metrics collects.

On each host

Metrics Monitor

Collects the system metrics and sends them to the Metrics Collector.

In the components

Metrics Hadoop Sinks

Plugged into the service components, they send their metrics to the Metrics Collector.

At the center

Metrics Collector

Server that receives, aggregates, and serves the metrics. It stores the data in the local file system or in an HDFS.

Why Ambari​

Provision

An installation wizard

A step-by-step wizard installs the services on any number of hosts and handles their configuration.

Manage

Central control

Starting, stopping, and reconfiguring the services of the whole cluster from one place.

Monitor

Cluster health and state

A dashboard shows the health and state of the cluster, and alerts warn when something needs attention.

Integrate

Everything through the REST API

Provisioning, management, and monitoring can be integrated with other applications through the REST API.

Reproduce

Clusters by blueprint

A blueprint describes the stack, the component layout, and the configurations, and creates the cluster through the REST API, without the wizard.

Extend

Stacks and services

New services come in through the stack definition: each one declares its components, configurations, scripts, alerts, and metrics.

Project principles

Ambari was designed to recover from component failures to a consistent state and complete pending operations after recovery, to give near real-time feedback on long operations, with the progress of the tasks under way, and to make it easy to add new services, components, and APIs.

In the TDP editions​

Available in the TDP editions
EditionVersionDocumentation
TDP Datacenter3.0.0.4TDP Datacenter components

In TDP Datacenter​

In TDP Datacenter, Ambari is the cluster management tool, and TDP is the stack it installs and manages.

TDP stack

TDP is the stack registered in Ambari, and the cluster runs a version of the TDP stack. Each stack version extends the previous one and inherits its services.

Where they run

The Ambari Server runs on the Utility or Edge machine, and an Ambari Agent is installed on each machine of the cluster. See Each machine with its role.

Ambari database

In the documented installation, the Ambari Server creates its metadata database on a PostgreSQL instance. The advanced installation settings allow specifying another database.

Stack services

The TDP Datacenter services, from ZooKeeper and HDFS to Trino and Superset, are installed and managed by Ambari. See TDP Datacenter components.

Ambari Metrics

A stack service that requires ZooKeeper, with the Metrics Collector (master component), the Metrics Monitor (slave component, on all hosts), and Grafana (master component, optional). The ams-site and ams-env config types, among others, are configurable in Ambari.

Infra Solr

A shared service used by the components managed by Ambari, which also requires ZooKeeper, with the Infra Solr Instance (master component) and the Infra Solr Client (client component).

Alerts

Each installed service brings its own alert definitions, which can be enabled and configured in Ambari, among them the Ambari Agent Heartbeat, which warns when the server loses contact with an agent. See Observability in TDP Datacenter.

Security

Cluster Kerberos can be enabled through Ambari. See Security in TDP Datacenter.

Next steps​

Sources​

Apache Ambari

Apache Ambari - Introduction

Apache Ambari - Technology Stack

Apache Ambari - Ambari Architecture

Apache Ambari - Stacks and Services

Apache Ambari - How-To Define Stacks and Services

Apache Ambari - API v1

Apache Ambari - Configurations API

Apache Ambari - Service Config Versions API usage

Apache Ambari - Alert Definitions API

Apache Ambari - Alerts

Apache Ambari - Ambari Metrics

Apache Ambari - Blueprints