Skip to content

Commit ffb6256

Browse files
committed
Reorganize repo: Move Hue and Superset away from main docker-compose.yml.
1 parent b65a34c commit ffb6256

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+157
-100
lines changed

README.md

Lines changed: 7 additions & 2 deletions

docker-compose.yml

Lines changed: 18 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "3"
1+
version: "3.5"
22

33
services:
44

@@ -15,6 +15,8 @@ services:
1515
- ./config/hadoop-hive.env
1616
ports:
1717
- "50070:50070"
18+
networks:
19+
- base_net
1820

1921
datanode:
2022
image: johannestang/hadoop-datanode:2.0.0-hadoop2.8.5-java8
@@ -27,6 +29,8 @@ services:
2729
SERVICE_PRECONDITION: "namenode:50070"
2830
ports:
2931
- "50075:50075"
32+
networks:
33+
- base_net
3034

3135
# Hive
3236

@@ -43,6 +47,8 @@ services:
4347
ports:
4448
- "10000:10000"
4549
- "10002:10002"
50+
networks:
51+
- base_net
4652

4753
hive-metastore:
4854
image: johannestang/hive:2.3.4-postgresql-metastore-s3
@@ -56,11 +62,15 @@ services:
5662
HDFS_CONF_fs_s3a_secret_key: ${MINIO_SECRET_KEY}
5763
ports:
5864
- "9083:9083"
65+
networks:
66+
- base_net
5967

6068
hive-metastore-postgresql:
6169
image: bde2020/hive-metastore-postgresql:2.3.0
6270
volumes:
6371
- ${DATADIR}/hive-metastore:/var/lib/postgresql/data
72+
networks:
73+
- base_net
6474

6575
# Presto
6676

@@ -73,6 +83,8 @@ services:
7383
S3_ACCESS_KEY: ${MINIO_ACCESS_KEY}
7484
S3_SECRET_KEY: ${MINIO_SECRET_KEY}
7585
S3_ENDPOINT: "http://minio:9000"
86+
networks:
87+
- base_net
7688

7789
# Minio
7890

@@ -88,57 +100,9 @@ services:
88100
- ${DATADIR}/minio/data:/data
89101
- ${DATADIR}/minio/config:/root/.minio
90102
command: server /data
103+
networks:
104+
- base_net
91105

92-
# Superset
93-
94-
superset:
95-
image: amancevice/superset:0.28.1
96-
restart: always
97-
depends_on:
98-
- superset-postgres
99-
- superset-redis
100-
environment:
101-
MAPBOX_API_KEY: ${MAPBOX_API_KEY}
102-
ports:
103-
- "8088:8088"
104-
volumes:
105-
- ./config/superset_config.py:/etc/superset/superset_config.py
106-
107-
superset-redis:
108-
image: redis:3.2
109-
restart: always
110-
volumes:
111-
- ${DATADIR}/superset/redis:/data
112-
113-
superset-postgres:
114-
image: postgres:10
115-
restart: always
116-
environment:
117-
POSTGRES_DB: superset
118-
POSTGRES_PASSWORD: superset
119-
POSTGRES_USER: superset
120-
volumes:
121-
- ${DATADIR}/superset/postgres:/var/lib/postgresql/data
122-
123-
# Hue
124-
125-
hue:
126-
image: johannestang/hue:4.3.0-presto0.215
127-
restart: always
128-
depends_on:
129-
- hue-postgres
130-
ports:
131-
- "8888:8888"
132-
volumes:
133-
- ./config/pseudo-distributed.ini:/hue/desktop/conf/pseudo-distributed.ini
134-
135-
hue-postgres:
136-
image: postgres:10
137-
restart: always
138-
environment:
139-
POSTGRES_DB: hue
140-
POSTGRES_PASSWORD: hue
141-
POSTGRES_USER: hue
142-
volumes:
143-
- ${DATADIR}/hue/postgres:/var/lib/postgresql/data
144-
106+
networks:
107+
base_net:
108+
name: bigdatanet

hadoop-base/build-local.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

hadoop-datanode/build-local.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

hadoop-hive/build-local.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

hadoop-namenode/build-local.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

hue/build-local.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

hue/docker-compose.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: "3.5"
2+
3+
services:
4+
5+
# Hue
6+
7+
hue:
8+
image: johannestang/hue:4.3.0-presto0.215
9+
restart: always
10+
depends_on:
11+
- hue-postgres
12+
ports:
13+
- "8888:8888"
14+
volumes:
15+
- ./config/pseudo-distributed.ini:/hue/desktop/conf/pseudo-distributed.ini
16+
networks:
17+
- hue_net
18+
19+
hue-postgres:
20+
image: postgres:10
21+
restart: always
22+
environment:
23+
POSTGRES_DB: hue
24+
POSTGRES_PASSWORD: hue
25+
POSTGRES_USER: hue
26+
volumes:
27+
- ${DATADIR}/hue/postgres:/var/lib/postgresql/data
28+
networks:
29+
- hue_net
30+
31+
networks:
32+
hue_net:
33+
external:
34+
name: bigdatanet

images/build_local.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
REPO=johannestang
3+
4+
# Hadoop base
5+
cd hadoop-base
6+
IMAGE=hadoop-base
7+
VERSION=2.0.0-hadoop$(grep HADOOP_VERSION Dockerfile | head -n 1 | awk '{print $3}')-java8
8+
docker build -t ${REPO}/${IMAGE}:${VERSION} .
9+
cd ..
10+
11+
# Hadoop datanode
12+
cd hadoop-datanode
13+
IMAGE=hadoop-datanode
14+
VERSION=2.0.0-$(grep hadoop-base Dockerfile | cut -d '-' -f 3)-java8
15+
docker build -t ${REPO}/${IMAGE}:${VERSION} .
16+
cd ..
17+
18+
# Hadoop namenode
19+
cd hadoop-namenode
20+
IMAGE=hadoop-namenode
21+
VERSION=2.0.0-$(grep hadoop-base Dockerfile | cut -d '-' -f 3)-java8
22+
docker build -t ${REPO}/${IMAGE}:${VERSION} .
23+
cd ..
24+
25+
# Hive
26+
cd hadoop-hive
27+
IMAGE=hive
28+
VERSION=$(grep HIVE_VERSION Dockerfile | head -n 1 | awk '{print $3}')-postgresql-metastore-s3
29+
docker build -t ${REPO}/${IMAGE}:${VERSION} .
30+
cd ..
31+
32+
# Presto
33+
cd prestodb
34+
IMAGE=prestodb
35+
VERSION=$(grep PRESTO_VERSION Dockerfile | head -n 1 | awk '{print $2}' | cut -d '=' -f 2)
36+
docker build -t ${REPO}/${IMAGE}:${VERSION} .
37+
cd ..
38+
39+
# Hue
40+
cd hue
41+
IMAGE=hue
42+
HUE_VERSION=$(grep HUE_VERSION Dockerfile | head -n 1 | awk '{print $2}' | cut -d '=' -f 2)
43+
PRESTO_VERSION=$(grep PRESTO_VERSION Dockerfile | head -n 1 | awk '{print $2}' | cut -d '=' -f 2)
44+
VERSION=${HUE_VERSION}-presto${PRESTO_VERSION}
45+
docker build -t ${REPO}/${IMAGE}:${VERSION} .
46+
cd ..
47+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

prestodb/build-local.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

scripts/hadoop-client.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22
cd "${0%/*}"
3-
docker run -it --rm --network="bigdata_stack_default" --env-file ../config/hadoop-hive.env -v /:/host johannestang/hadoop-base /bin/bash
3+
docker run -it --rm --network="bigdatanet" --env-file ../config/hadoop-hive.env -v /:/host johannestang/hadoop-base:2.0.0-hadoop2.8.5-java8 /bin/bash
44

scripts/init-hue.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22
cd "${0%/*}"
3-
docker-compose -f ../docker-compose.yml exec hue ./build/env/bin/hue syncdb --noinput
4-
docker-compose -f ../docker-compose.yml exec hue ./build/env/bin/hue migrate
3+
docker-compose -f ../hue/docker-compose.yml exec hue ./build/env/bin/hue syncdb --noinput
4+
docker-compose -f ../hue/docker-compose.yml exec hue ./build/env/bin/hue migrate

scripts/init-superset.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22
cd "${0%/*}"
3-
docker-compose -f ../docker-compose.yml exec superset superset-init
4-
docker cp add-presto.yml $(docker-compose -f ../docker-compose.yml ps -q superset):/tmp
5-
docker-compose -f ../docker-compose.yml exec superset superset import_datasources -p /tmp/add-presto.yml
3+
docker-compose -f ../superset/docker-compose.yml exec superset superset-init
4+
docker cp add-presto.yml $(docker-compose -f ../superset/docker-compose.yml ps -q superset):/tmp
5+
docker-compose -f ../superset/docker-compose.yml exec superset superset import_datasources -p /tmp/add-presto.yml

superset/docker-compose.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
version: "3.5"
2+
3+
services:
4+
5+
# Superset
6+
7+
superset:
8+
image: amancevice/superset:0.28.1
9+
restart: always
10+
depends_on:
11+
- superset-postgres
12+
- superset-redis
13+
environment:
14+
MAPBOX_API_KEY: ${MAPBOX_API_KEY}
15+
ports:
16+
- "8088:8088"
17+
volumes:
18+
- ./config/superset_config.py:/etc/superset/superset_config.py
19+
networks:
20+
- superset_net
21+
22+
superset-redis:
23+
image: redis:3.2
24+
restart: always
25+
volumes:
26+
- ${DATADIR}/superset/redis:/data
27+
networks:
28+
- superset_net
29+
30+
superset-postgres:
31+
image: postgres:10
32+
restart: always
33+
environment:
34+
POSTGRES_DB: superset
35+
POSTGRES_PASSWORD: superset
36+
POSTGRES_USER: superset
37+
volumes:
38+
- ${DATADIR}/superset/postgres:/var/lib/postgresql/data
39+
networks:
40+
- superset_net
41+
42+
networks:
43+
superset_net:
44+
external:
45+
name: bigdatanet

0 commit comments

Comments
 (0)