-
Notifications
You must be signed in to change notification settings - Fork 1
/
start-containers.sh
executable file
·38 lines (33 loc) · 1.38 KB
/
start-containers.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
PWD=`pwd`
HOST_MASTER_HADOOP_CONF_PATH="$PWD/master/hadoop/conf"
HOST_MASTER_SPARK_CONF_PATH="$PWD/master/spark/conf"
CONT_MASTER_HADOOP_CONF_PATH='/usr/local/hadoop/etc/hadoop'
HOST_HIVE_CONF_PATH="$PWD/hive/conf"
DAGS_FOLDER="$PWD/dags"
docker run --tmpfs /run -itd -v $HOST_MASTER_HADOOP_CONF_PATH:$CONT_MASTER_HADOOP_CONF_PATH \
-v $HOST_MASTER_SPARK_CONF_PATH:/usr/local/spark/conf \
-v $DAGS_FOLDER:/usr/local/dags \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
-p 8088:8088 -p 50070:50070 -p 9001:9001 -p 50010:50010 -p 4040:4040 -p 8081:8081 -p 80:80 -p 18080:18080 \
--network=my-bridge-network \
--name=hadoop-master \
hadoop-master-img-centos7
docker run --tmpfs /run -itd -v $HOST_MASTER_HADOOP_CONF_PATH:$CONT_MASTER_HADOOP_CONF_PATH \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
--network=my-bridge-network \
--name=hadoop-slave1 \
hadoop-slave-img-centos7
docker run --tmpfs /run -itd -v $HOST_MASTER_HADOOP_CONF_PATH:$CONT_MASTER_HADOOP_CONF_PATH \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
--network=my-bridge-network \
--name=hadoop-slave2 \
hadoop-slave-img-centos7
docker run --tmpfs /run -itd -v $HOST_HIVE_CONF_PATH:/usr/local/hive/conf \
--network=my-bridge-network \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
-p 9083:9083 -p 10002:10002 \
--name=hive-db \
hive-db-img-centos7
docker run --name mysql-hive -e MYSQL_ROOT_PASSWORD=root -d \
-p 3306:3306 \
--network=my-bridge-network mysql-for-hive-img