mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-23 01:39:27 +02:00
update ambari
This commit is contained in:
parent
d15c9a23a6
commit
b9677fcf8a
@ -11,8 +11,7 @@ ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
|
||||
RUN set -xe \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y curl gnupg libpostgresql-jdbc-java openjdk-8-jdk openssh-client supervisor \
|
||||
&& mkdir -m 700 /root/.ssh \
|
||||
&& apt-get install -y curl gnupg libpostgresql-jdbc-java openjdk-8-jdk \
|
||||
&& curl -sSL ${AMBARI_SOURCE} > /etc/apt/sources.list.d/ambari.list \
|
||||
&& apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD \
|
||||
&& apt-get update \
|
||||
@ -20,12 +19,8 @@ RUN set -xe \
|
||||
&& ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql.jar \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
VOLUME /etc/ambari-server/conf/ /root/.ssh/
|
||||
VOLUME /etc/ambari-server/conf
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["sleep", "inf"]
|
||||
|
||||
#
|
||||
# ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql.jar
|
||||
#
|
||||
|
@ -6,5 +6,46 @@ developing software for provisioning, managing, and monitoring Apache Hadoop
|
||||
clusters. Ambari provides an intuitive, easy-to-use Hadoop management web UI
|
||||
backed by its RESTful APIs.
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```yaml
|
||||
ambari:
|
||||
image: vimagick/ambari
|
||||
hostname: ambari-server
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- ./data/ambari:/etc/ambari-server/conf
|
||||
links:
|
||||
- postgres
|
||||
extra_hosts:
|
||||
- ambari-agent1:172.16.1.101
|
||||
- ambari-agent2:172.16.1.102
|
||||
- ambari-agent3:172.16.1.103
|
||||
restart: unless-stopped
|
||||
|
||||
postgres:
|
||||
image: postgres:alpine
|
||||
volumes:
|
||||
- /data/postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_USER=ambari
|
||||
- POSTGRES_PASSWORD=ambari
|
||||
- POSTGRES_DB=ambari
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
> Make sure that ambari-server is reachable by ambari-agents.
|
||||
|
||||
## Up and Running
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d
|
||||
$ docker-compose exec ambari bash
|
||||
>>> ambari-server setup
|
||||
>>> PGUSER=ambari PGPASSWORD=ambari psql -h postgres -d ambari -f /var/lib/ambari-server/resources/Ambari-DDL-Postgres-CREATE.sql
|
||||
>>> ambari-server start
|
||||
$ curl localhost:8080
|
||||
```
|
||||
|
||||
[1]: https://ambari.apache.org/
|
||||
|
11
ambari/data/ssh/config
Normal file
11
ambari/data/ssh/config
Normal file
@ -0,0 +1,11 @@
|
||||
Host ambari-agent1
|
||||
HostName 172.16.1.101
|
||||
User root
|
||||
|
||||
Host ambari-agent2
|
||||
HostName 172.16.1.102
|
||||
User root
|
||||
|
||||
Host ambari-agent3
|
||||
HostName 172.16.1.102
|
||||
User root
|
@ -6,6 +6,8 @@ ambari:
|
||||
volumes:
|
||||
- ./data/ssh:/root/.ssh
|
||||
- ./data/ambari:/etc/ambari-server/conf
|
||||
links:
|
||||
- postgres
|
||||
extra_hosts:
|
||||
- ambari-agent1:172.16.1.101
|
||||
- ambari-agent2:172.16.1.102
|
||||
@ -14,8 +16,6 @@ ambari:
|
||||
|
||||
postgres:
|
||||
image: postgres:alpine
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- /data/postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
|
Loading…
Reference in New Issue
Block a user