Skip to content

Commit c808350

Browse files
author
astroshim
committed
add image file and doc
1 parent a3b0ded commit c808350

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed
75.7 KB
Loading
76.9 KB
Loading

docs/install/spark_cluster_mode.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,67 @@ ps -ef | grep spark
7272
```
7373

7474

75+
## Spark on Mesos mode
76+
You can simply set up [Spark on Mesos](http://spark.apache.org/docs/latest/running-on-mesos.html) docker environment with below steps.
77+
78+
> **Note :** Since Apache Zeppelin and Spark use same `8080` port for their web UI, you might need to change `zeppelin.server.port` in `conf/zeppelin-site.xml`.
79+
80+
### 1. Build Docker file
81+
You can find docker script files under `scripts/docker/spark-cluster-managers`.
82+
83+
84+
```
85+
cd $ZEPPELIN_HOME/scripts/docker/spark-cluster-managers/spark_mesos
86+
docker build -t "spark_mesos" .
87+
```
88+
89+
90+
### 2. Run docker
91+
92+
```
93+
docker run --net=host -it \
94+
-p 8080:8080 \
95+
-p 7077:7077 \
96+
-p 8888:8888 \
97+
-p 8081:8081 \
98+
-p 8082:8082 \
99+
-p 5050:5050 \
100+
-p 5051:5051 \
101+
-p 4040:4040 \
102+
-h sparkmaster \
103+
--name spark_mesos \
104+
spark_mesos bash;
105+
```
106+
107+
### 3. Verify running Spark on Mesos.
108+
109+
You can simply verify the processes of Spark and Mesos is running well in Docker with below command.
110+
111+
112+
```
113+
ps -ef
114+
```
115+
116+
You can also check each application web UI for Mesos on `http://<hostname>:5050/cluster` and Spark on `http://<hostname>:8080/`.
117+
118+
119+
### 4. Configure Spark interpreter in Zeppelin
120+
Set following configurations to `conf/zeppelin-env.sh`.
121+
122+
```
123+
export MASTER=mesos://127.0.1.1:5050
124+
export MESOS_NATIVE_JAVA_LIBRARY=[PATH OF libmesos.so]
125+
export SPARK_HOME=[PATH OF SPARK HOME]
126+
```
127+
128+
129+
Don't forget to set Spark `master` as `mesos://127.0.1.1:5050` in Zeppelin **Interpreters** setting page like below.
130+
131+
<img src="../assets/themes/zeppelin/img/docs-img/zeppelin_mesos_interpreter.png" />
132+
133+
134+
135+
### 5. Run Zeppelin with Spark interpreter
136+
After running a single paragraph with Spark interpreter in Zeppelin, browse `http://<hostname>:5050/#/frameworks` and check Zeppelin application is running well or not.
137+
138+
<img src="../assets/themes/zeppelin/img/docs-img/mesos_frameworks.png" />

0 commit comments

Comments
 (0)