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
- Architecture
- From the cluster to the host component
- Each save, one version
- Alerts and metrics
- Why Ambari
- In the TDP editions
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.
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.
In the Glossary: Ambari Web · REST API · Config type
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
Architecture
One Ambari Server controls the cluster. One Ambari Agent on each host does the work.
What the figure shows:
- The clients are Ambari Web, the web interface, and applications, with direct calls to the REST API and blueprints.
- The REST API serves Ambari Web and the applications: the Ambari Server receives all operations through it.
- 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.
- 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.
- 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.
- The host components are the components of the services on the hosts.
- 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.
- 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.
- 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.
- 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.
- 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.
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.
Checks the TCP connection to an endpoint.
Checks a web address, as PORT does with a port.
Queries values at JMX endpoints.
Delegates the check to a Python script accessible to the Ambari Agents.
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.
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
| Edition | Version | Documentation |
|---|---|---|
| TDP Datacenter | 3.0.0.4 | TDP Datacenter components |
In TDP Datacenter
In TDP Datacenter, Ambari is the cluster management tool, and TDP is the stack it installs and manages.
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.
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.
In the documented installation, the Ambari Server creates its metadata database on a PostgreSQL instance. The advanced installation settings allow specifying another database.
The TDP Datacenter services, from ZooKeeper and HDFS to Trino and Superset, are installed and managed by Ambari. See TDP Datacenter components.
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.
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).
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.
Cluster Kerberos can be enabled through Ambari. See Security in TDP Datacenter.
Next steps
Architecture
Management through Ambari
Where Ambari sits in the TDP Datacenter cluster and what it does at each stage.
Sources
Apache Ambari - Technology Stack
Apache Ambari - Ambari Architecture
Apache Ambari - Stacks and Services
Apache Ambari - How-To Define Stacks and Services
Apache Ambari - Configurations API
Apache Ambari - Service Config Versions API usage
Apache Ambari - Alert Definitions API