Mesos-mastered Spark with Mesos workers
3.6K
This repo provides Docker containers to run:
Please see the accompanying blog posts for the technical details and motivation behind this project:
Docker containers provide a portable and repeatable method for deploying the cluster:
| Pattern | NLTK | Pandas | NumPy | SciPy | SymPy | Seaborn |
| Cython | Numba | Biopython | Rmagic | 0MQ | Matplotlib | Scikit-Learn |
| Statsmodels | Beautiful Soup | NetworkX | LLVM | Bokeh | Vincent | MDP |
Install Mesos with Docker Containerizer and Docker Images: Install a Mesos cluster configured to use the Docker containerizer, which enables the Mesos slaves to execute Spark tasks within a Docker container.
A. End-to-end Installation: The script mesos/1-setup-mesos-cluster.sh uses the Python library Fabric to install and configure a cluster according to How To Configure a Production-Ready Mesosphere Cluster on Ubuntu 14.04. After installation, it also pulls the Docker images that will execute Spark tasks. To use:
mesos/fabfile.py. Find instances to change with:grep 'ip-address' mesos/fabfile.py./mesos/1-setup-mesos-cluster.shOptional: ./1-build.sh if you prefer instead to build the docker images from scratch (rather than the script pulling from Docker Hub)
B. Manual Installation: Follow the general steps in mesos/1-setup-mesos-cluster.sh to manually install:
docker pull lab41/spark-mesos-dockerworker-ipython
docker pull lab41/spark-mesos-mesosworker-ipython
./5-run-spark-mesos-dockerworker-ipython.sh username-for-sparkjobs mesos://mesos-master-fqdn:5050Installation and Deployment - Build each Docker image and run each on separate dedicated hosts
Build and configure hosts
Install Docker v1.5+, jq JSON processor, and iptables. For example, on an Ubuntu host:
./0-prepare-host.shUpdate the Hadoop configuration files in runtime/cdh5/<hadoop|hive>/<multiple-files> with the correct hostnames for your Hadoop cluster. Use grep FIXME -R . to find hostnames to change.
Generate new SSH keypair (dockerfiles/base/lab41/spark-base/config/ssh/id_rsa and dockerfiles/base/lab41/spark-base/config/ssh/id_rsa.pub), adding the public key to dockerfiles/base/lab41/spark-base/config/ssh/authorized_keys.
(optional) Update SPARK_WORKER_CONFIG environment variable for Spark-specific options such as executor cores. Update the variable via a shell export command or by updating dockerfiles/standalone/lab41/spark-client-ipython/config/service/ipython/run.
(optional) Comment out any unwanted Python packages in the base Dockerfile image dockerfiles/base/lab41/python-datatools/Dockerfile.
Get Docker images:
docker pull lab41/spark-master
docker pull lab41/spark-worker
docker pull lab41/spark-client-ipython./1-build.sh./2-run-spark-master.sh./3-run-spark-worker.sh spark://spark-master-fqdn:7077./4-run-spark-client-ipython.sh spark://spark-master-fqdn:7077Content type
Image
Digest
sha256:fbf6a304b…
Size
4.3 GB
Last updated
over 10 years ago
docker pull lab41/spark-mesos-mesosworker-ipython