Skip to content
This repository was archived by the owner on Aug 19, 2020. It is now read-only.

Commit edb29a3

Browse files
committed
Merge pull request #21 from kylef-lab41/master
Update mesos installation instructions
2 parents 09e674a + afad8a8 commit edb29a3

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,29 @@ Docker containers provide a portable and repeatable method for deploying the clu
6565
## Usage
6666

6767
### Option 1. Mesos-mastered Spark Jobs
68-
0. <strong>Install Mesos with Docker Containerizer</strong>: Install a Mesos cluster configured to use the Docker containerizer, which enables the Mesos slaves to execute Spark tasks within a Docker container. The following script uses the Python library [Fabric](http://www.fabfile.org/) to install and configure a cluster according to [How To Configure a Production-Ready Mesosphere Cluster on Ubuntu 14.04](https://www.digitalocean.com/community/tutorials/how-to-configure-a-production-ready-mesosphere-cluster-on-ubuntu-14-04):
69-
- Update IP Addresses of Mesos nodes in ```mesos/fabfile.py```
68+
1. <strong>Install Mesos with Docker Containerizer and Docker Images</strong>: Install a Mesos cluster configured to use the Docker containerizer, which enables the Mesos slaves to execute Spark tasks within a Docker container.
69+
70+
A. <strong>End-to-end Installation</strong>: The script ```mesos/1-setup-mesos-cluster.sh``` uses the Python library [Fabric](http://www.fabfile.org/) to install and configure a cluster according to [How To Configure a Production-Ready Mesosphere Cluster on Ubuntu 14.04](https://www.digitalocean.com/community/tutorials/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:
71+
- Update IP Addresses of Mesos nodes in ```mesos/fabfile.py```. Find instances to change with:
7072
<pre><code>grep 'ip-address' mesos/fabfile.py</code></pre>
7173

72-
- Install/configure the cluster
73-
<pre><code>mesos/1-setup-mesos-cluster.sh</code></pre>
74+
- Install/configure the cluster:
75+
<pre><code>./mesos/1-setup-mesos-cluster.sh</code></pre>
7476
Optional: ```./1-build.sh``` if you prefer instead to build the docker images from scratch (rather than the script pulling from Docker Hub)
7577

76-
1. <strong>Run the client container on a client host</strong> (replace 'username-for-sparkjobs' and 'mesos-master-fqdn' below): <pre><code>./5-run-spark-mesos-dockerworker-ipython.sh username-for-sparkjobs mesos://mesos-master-fqdn:5050</code></pre>
78+
B. <strong>Manual Installation</strong>: Follow the general steps in ```mesos/1-setup-mesos-cluster.sh``` to manually install:
79+
80+
- Install mesosphere on masters
81+
- Install mesos on slaves
82+
- Configure zookeeper on all nodes
83+
- Configure and start masters
84+
- Configure and start slaves
85+
- Load docker images:
86+
<pre><code>docker pull lab41/spark-mesos-dockerworker-ipython
87+
docker pull lab41/spark-mesos-mesosworker-ipython</code></pre>
88+
89+
90+
2. <strong>Run the client container on a client host</strong> (replace 'username-for-sparkjobs' and 'mesos-master-fqdn' below): <pre><code>./5-run-spark-mesos-dockerworker-ipython.sh username-for-sparkjobs mesos://mesos-master-fqdn:5050</code></pre>
7791
*Note: the client container will create username-for-sparkjobs when started, providing the ability to submit Spark jobs as a specific user and/or deploy different IPython servers for different users.
7892

7993

mesos/1-setup-mesos-cluster.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ fab --parallel \
2424
fab --parallel \
2525
--roles=slaves \
2626
configure_and_start_slaves
27+
28+
# load docker images
29+
fab --parallel \
30+
--roles=slaves \
31+
pull_docker_images

mesos/fabfile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ def configure_and_start_masters():
102102

103103
def configure_and_start_slaves():
104104
execute(start_slaves)
105+
106+
def pull_docker_images():
105107
execute(docker_pull_containers)
106108

107109
def docker_restart():

0 commit comments

Comments
 (0)