整个过程可以直接看官网
http://mesos.apache.org/gettingstarted/
1.下载源码
http://mesos.apache.org/downloads/
2.安装依赖
Ubuntu 14.04
这里用的openjdk7.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| # Update the packages. $ sudo apt-get update # Install a few utility tools. $ sudo apt-get install -y tar wget git # Install the latest OpenJDK. $ sudo apt-get install -y openjdk-7-jdk # Install autotools (Only necessary if building from git repository). $ sudo apt-get install -y autoconf libtool # Install other Mesos dependencies. $ sudo apt-get -y install build-essential python-dev libcurl4-nss-dev libsasl2-dev libsasl2-modules maven libapr1-dev libsvn-dev
|
3.Building Mesos
1 2 3 4 5 6 7 8 9 10
| # Change working directory. $ cd mesos # Bootstrap (Only required if building from git repository). $ ./bootstrap # Configure and build. $ ./configure $ make
|
完了以后最好运行下check
1 2 3 4 5
| # Run test suite. $ make check # Install (Optional). $ make install
|
4. 起服务
1 2 3 4 5 6 7 8
| # Start mesos master (Ensure work directory exists and has proper permissions). $ ./bin/mesos-master.sh --ip=0.0.0.0 --work_dir=/var/lib/mesos # Start mesos agent (Ensure work directory exists and has proper permissions). $ ./bin/mesos-agent.sh --master=0.0.0.0:5050 --work_dir=/var/lib/mesos # Visit the mesos web page. $ http://<ip>:5050
|
5.mesos架构
master下面挂了几个agent,会给master上报资源信息.
framework包含了两个概念:
- scheduler 调度器
- agent上面的executor.
关于framework具体怎样运行还有下面的图来表达这个过程: