11# Building the Modules
22
3+ Mesos modules provide a way to easily extend inner workings of Mesos by creating
4+ and using shared libraries that are loaded on demand. Modules can be used to
5+ customize Mesos without having to recompiling/relinking for each specific use
6+ case. Modules can isolate external dependencies into separate libraries, thus
7+ resulting into a smaller Mesos core. Modules also make it easy to experiment
8+ with new features. For example, imagine loadable allocators that contain a VM
9+ (Lua, Python, …) which makes it possible to try out new allocator algorithms
10+ written in scripting languages without forcing those dependencies into the
11+ project. Finally, modules provide an easy way for third parties to easily extend
12+ Mesos without having to know all the internal details.
13+
14+ For more details, please see
15+ [ Mesos Modules] ( http://mesos.apache.org/documentation/latest/modules/ ) .
16+
17+
18+ ## Prerequisites
19+
20+ Building Mesos modules requires system-wide installation of the following:
21+
22+ 1 . google-protobuf
23+ 2 . glog
24+ 3 . boost
25+ 4 . picojson
26+
327## Build Mesos with some unbundled dependencies
428
529### Preparing Mesos source code
@@ -8,33 +32,39 @@ standard release in the form of a tarball and extract it, or clone the git
832repository.
933
1034Let us assume you did extract/clone
11- the repo into ` ~/mesos ` . Let us also assume that you build mesos in a subfolder
35+ the repository into ` ~/mesos ` . Let us also assume that you build Mesos in a
36+ subdirectory
1237called ` build ` (` ~/mesos/build ` ).
1338
14- ### Building and Install Mesos
39+ ### Building and Installing Mesos
1540Next, we need to configure and build Mesos.
1641Due to the fact that modules will need to have access to a couple of libprocess
17- dependencies, mesos itself should get built with unbundled dependencies to
42+ dependencies, Mesos itself should get built with unbundled dependencies to
1843reduce chances of problems introduced by varying versions (libmesos vs. module
1944library).
2045
2146We recommend using the following configure options:
2247
2348```
24- ./configure --with-glog=/usr/local --with-protobuf=/usr/local --with-boost=/usr/local
49+ cd <mesos-source-tree>
50+ mkdir build
51+ cd build
52+ ../configure --with-glog=/usr/local --with-protobuf=/usr/local --with-boost=/usr/local --prefix=$HOME/usr
2553make
2654make install
2755```
2856
29- ## Build Mesos-Modules
57+ Note that the ` --prefix=$HOME/usr ` is required only if you don't want to do a system-wide Mesos installation.
58+
59+ ## Build Mesos Modules
3060
3161Once that is done, extract/clone the mesos-modules package. For the sake of this
3262example, that could be in ` ~/mesos-modules ` . Note that you should not put
3363` mesos-modules ` into the ` mesos ` folder.
3464
3565You may now run start building the modules.
3666
37- The configuration phase needs to know some details about your mesos installation
67+ The configuration phase needs to know some details about your Mesos installation
3868location, hence the following are used:
3969` --with-mesos=/path/to/mesos/installation `
4070
4777```
4878
4979At this point, the Module libraries are ready in ` /build/.libs ` .
80+
81+ ## Using Mesos Modules
82+ See [ Mesos Modules] ( http://mesos.apache.org/documentation/latest/modules/ ) .
0 commit comments