2
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-12-21 13:23:02 +01:00

fix ambari

This commit is contained in:
kev
2019-09-30 07:58:46 +08:00
parent a254181fae
commit 3a476285b6
3 changed files with 14 additions and 12 deletions

View File

@@ -11,7 +11,7 @@ ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
RUN set -xe \ RUN set -xe \
&& apt-get update \ && apt-get update \
&& apt-get install -y curl gnupg libpostgresql-jdbc-java openjdk-8-jdk \ && apt-get install -y curl gnupg libpostgresql-jdbc-java openjdk-8-jdk openssh-client \
&& curl -sSL ${AMBARI_SOURCE} > /etc/apt/sources.list.d/ambari.list \ && curl -sSL ${AMBARI_SOURCE} > /etc/apt/sources.list.d/ambari.list \
&& apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD \ && apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD \
&& apt-get update \ && apt-get update \
@@ -23,4 +23,7 @@ VOLUME /etc/ambari-server/conf
EXPOSE 8080 EXPOSE 8080
CMD ["sleep", "inf"] CMD set -ex \
&& ambari-server start \
&& sleep 5 \
&& tail --pid=$(cat /var/run/ambari-server/ambari-server.pid) -f /var/log/ambari-server/ambari-server.log

View File

@@ -3,17 +3,15 @@ ambari
The [Apache Ambari][1] project is aimed at making Hadoop management simpler by The [Apache Ambari][1] project is aimed at making Hadoop management simpler by
developing software for provisioning, managing, and monitoring Apache Hadoop developing software for provisioning, managing, and monitoring Apache Hadoop
clusters. Ambari provides an intuitive, easy-to-use Hadoop management web UI clusters. [Ambari][2] provides an intuitive, easy-to-use Hadoop management web UI
backed by its RESTful APIs. backed by its RESTful APIs.
Make sure that ambari-server is reachable by ambari-agents. Make sure that ambari-server is reachable by ambari-agents via DNS.
## Up and Running ## Up and Running
```bash ```bash
$ docker-compose up -d $ docker-compose run --rm server bash
$ docker-compose exec ambari bash
>>> ambari-server setup >>> ambari-server setup
Customize user account for ambari-server daemon [y/n] (n)? Customize user account for ambari-server daemon [y/n] (n)?
Do you want to change Oracle JDK [y/n] (n)? Do you want to change Oracle JDK [y/n] (n)?
@@ -30,12 +28,12 @@ Proceed with configuring remote database connection properties [y/n] (y)?
CREATE TABLE ... CREATE TABLE ...
CREATE INDEX ... CREATE INDEX ...
$ docker-compose exec ambari ambari-server start $ docker-compose up -d
Waiting for server start........................ Starting ambari_postgres_1 ... done
Server started listening on 8080 Starting ambari_server_1 ... done
Ambari Server 'start' completed successfully.
$ curl http://localhost:8080/ $ curl http://localhost:8080/
``` ```
[1]: https://ambari.apache.org/ [1]: https://ambari.apache.org/
[2]: https://docs.cloudera.com/HDPDocuments/Ambari/Ambari-2.7.4.0/index.html

View File

@@ -2,7 +2,7 @@ version: "3.7"
services: services:
ambari: server:
image: vimagick/ambari image: vimagick/ambari
hostname: ambari-server hostname: ambari-server
ports: ports:
@@ -11,6 +11,7 @@ services:
- "8441:8441" - "8441:8441"
volumes: volumes:
- ./data/ambari:/etc/ambari-server/conf - ./data/ambari:/etc/ambari-server/conf
- ./data/log:/var/log/ambari-server
extra_hosts: extra_hosts:
- ambari-agent1:172.16.1.101 - ambari-agent1:172.16.1.101
- ambari-agent2:172.16.1.102 - ambari-agent2:172.16.1.102