Skip to main content
Version: 3.1.0 (Preview)

Building Apache Ambari from Source

Apache Ambari Maven, Java, Python, React, testing, and RPM build pipeline

Prerequisites

Use JDK 17 and Maven 3.9.x. Ambari packaging targets CPython 3.9 (cp39) on Linux x86_64; the build interpreter must satisfy the source requirements but is not interchangeable with a package ABI. Install Node 22 and npm for the React applications, plus rpmbuild/rpm-build, a C++ compiler, and the platform libraries described in the Java dependencies and Python runtime guides.

Use a matching Linux x86_64, CPython 3.9 build environment for the default packaging-and-test commands below: Python tests load staged private dependencies through the Maven-configured environment. Cross-building another target does not prove those native extensions can run on the build host; validate them on the matching target runtime separately.

Clone And Inspect

git clone https://github.com/apache/ambari.git
cd ambari
mvn -version

The root pom.xml is the Maven reactor. Use -pl for a module and -am to include required reactor dependencies.

Build The Main Reactor

Build without tests or packaging checks while iterating:

mvn -B -T 2C -pl ambari-server -am clean install -DskipTests -DskipPythonTests -DskipUiBuild=true -Drat.skip

Build the normal reactor packages without excluding tests or the UI:

mvn -B clean package rpm:rpm -Dbuild.os_arch=x86_64

The Server and Agent RPMs are written below their module target/rpm directories. Confirm the architecture and version before publishing an artifact. The VictoriaMetrics provider has a separate metrics-rpm profile and is covered by RPM packaging.

React Applications

The ambari-web Maven module builds ambari-web/latest with the repository Node/npm toolchain and packages latest/dist. The separate ambari-admin module builds its React application and packages its output under classes/latest. A Maven build that uses -DskipUiBuild=true does not validate these applications.

Python Packaging

Agent and Server dependencies are installed into Ambari private libraries during Maven packaging. CPython 3.9 (cp39) is the default target selected by the wheel properties, not a profile named python-wheel-cp39. Use the locked dependencies and a supplied wheelhouse when offline; do not run pip install on production nodes. The source Python runner and packaged ABI are related contracts, not interchangeable version claims.

Focused Profiles

Use the project profiles for a supported platform or wheel ABI rather than editing dependency versions ad hoc. Offline builds must provide the approved wheelhouse and use the repository’s no-index settings. Keep generated RPMs, wheel metadata, and SBOM output under target for review.