Sign inSign up

jialiangcai/ambari-community

By jialiangcai

Updated 12 days ago

One-command Apache Ambari community cluster with prebuilt Hadoop, Hive, HBase, and Metrics RPMs.

Image
1

65

jialiangcai/ambari-community repository overview

Apache Ambari Community Quickstart

Choose your language / 选择语言

English Guide ↓
中文指南 ↓

Quick Start

On a Linux x86_64 host with Docker Engine running, launch the default 3-node cluster with an 8 GiB memory limit per node:

mkdir -p ambari-community && cd ambari-community

docker run --rm -it --pull=always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" \
  -w /workspace \
  jialiangcai/ambari-community:latest \
  up --nodes 3 --memory 8g

Open http://127.0.0.1:8080/latest/ and sign in with admin / admin. The default cluster includes ZooKeeper, HDFS, YARN, Hive, HBase, and Metrics. See the English section below for customization and lifecycle commands.

中文

这是一个用于本地体验和验证 Apache Ambari 社区代码的自部署镜像。镜像已经包含 Ambari Server、Ambari Agent、Ambari Metrics,以及默认集群需要的 Hadoop、ZooKeeper、Hive、HBase、Tez 和相关 RPM。启动时不会再从外部 yum 仓库安装这些组件。

当前镜像基于 apache/ambari PR #4208 的提交 a62fe4959dc948210d844295a097a3311321dea6 构建,并包含自部署工具修复 0bcc481。它仅用于社区尝鲜、功能验证和问题复现,不建议用于生产环境。

环境要求
  • Linux x86_64 主机
  • 已安装并运行 Docker Engine
  • 当前用户可以访问 /var/run/docker.sock
  • 默认配置为 3 个节点、每节点内存上限 8 GiB;请为宿主机预留足够资源
  • 启动的节点容器需要 privileged 权限
一键启动
mkdir -p ambari-community && cd ambari-community

docker run --rm -it --pull=always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" \
  -w /workspace \
  jialiangcai/ambari-community:latest \
  up --nodes 3 --memory 8g

部署完成后访问 http://127.0.0.1:8080/latest/,默认用户名和密码为 admin / admin

默认服务包括 ZooKeeper、HDFS、YARN、Hive、HBase 和 Metrics。Metrics 使用 Ambari Server 自带的 VictoriaMetrics provider。

自定义节点数、内存和端口
docker run --rm -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" \
  -w /workspace \
  jialiangcai/ambari-community:latest \
  up --nodes 5 --memory 12g --port 18080

此时 Ambari 地址为 http://127.0.0.1:18080/latest/--memory 是每个节点的内存上限。

如需指定服务:

docker run --rm -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" \
  -w /workspace \
  jialiangcai/ambari-community:latest \
  up --nodes 3 --memory 8g \
  --services ambari,zookeeper,hdfs,yarn,hive,hbase,metrics
状态、恢复和销毁

请始终在第一次启动时使用的同一目录执行命令。部署状态保存在当前目录的 .ambari-community/ 中。

# 查看状态
docker run --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" -w /workspace \
  jialiangcai/ambari-community:latest status

# 从失败阶段继续
docker run --rm -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" -w /workspace \
  jialiangcai/ambari-community:latest resume

# 销毁集群容器和网络
docker run --rm -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" -w /workspace \
  jialiangcai/ambari-community:latest destroy

destroy 会删除该测试集群的节点容器、网络和容器内数据;.ambari-community/ 中仍保留部署记录。默认密码仅适用于本机临时验证,不要把 8080 端口直接暴露到不受信任的网络。

English

This is a self-deploying image for local evaluation and validation of Apache Ambari community code. It includes Ambari Server, Ambari Agent, Ambari Metrics, and the RPMs required by the default Hadoop, ZooKeeper, Hive, HBase, and Tez stack. The default deployment does not download component packages from external yum repositories.

The current image was built from commit a62fe4959dc948210d844295a097a3311321dea6 of apache/ambari PR #4208, with self-deployment fix 0bcc481. It is intended for community previews, feature validation, and issue reproduction, not production use.

Requirements
  • A Linux x86_64 host
  • A running Docker Engine
  • Permission to access /var/run/docker.sock
  • Enough host resources for the default three nodes with an 8 GiB per-node memory limit
  • Permission to create privileged node containers
One-command cluster
mkdir -p ambari-community && cd ambari-community

docker run --rm -it --pull=always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" \
  -w /workspace \
  jialiangcai/ambari-community:latest \
  up --nodes 3 --memory 8g

Open http://127.0.0.1:8080/latest/ after deployment. The disposable default login is admin / admin.

The default services are ZooKeeper, HDFS, YARN, Hive, HBase, and Metrics. Metrics uses the VictoriaMetrics provider bundled with Ambari Server.

Customize nodes, memory, port, and services
docker run --rm -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" \
  -w /workspace \
  jialiangcai/ambari-community:latest \
  up --nodes 5 --memory 12g --port 18080

The Ambari URL is then http://127.0.0.1:18080/latest/. --memory is the memory limit for each node.

Use --services ambari,zookeeper,hdfs,yarn,hive,hbase,metrics to provide an explicit service set.

Status, recovery, and cleanup

Always run lifecycle commands from the same directory used for the first up. Deployment state is stored under .ambari-community/ in that directory.

# Inspect deployment state
docker run --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" -w /workspace \
  jialiangcai/ambari-community:latest status

# Resume from a failed phase
docker run --rm -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" -w /workspace \
  jialiangcai/ambari-community:latest resume

# Remove cluster containers and network
docker run --rm -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/workspace" -w /workspace \
  jialiangcai/ambari-community:latest destroy

destroy removes the test cluster containers, network, and data stored inside those containers. The .ambari-community/ deployment records remain. The default credentials are for disposable local testing only; do not expose the Ambari port to an untrusted network.

Image details

  • Platform: linux/amd64
  • Ambari source: apache/ambari PR #4208, commit a62fe4959dc948210d844295a097a3311321dea6
  • Default topology: 3 nodes, 8 GiB memory limit per node
  • Default UI port: 8080
  • Default services: ZooKeeper, HDFS, YARN, Hive, HBase, Metrics
  • Package mode: verified local RPM repository embedded in the image

Tag summary

Content type

Image

Digest

sha256:1401759b6

Size

2.9 GB

Last updated

12 days ago

docker pull jialiangcai/ambari-community