Some notes on installation of mesos daemons on a single machine for testing purpose only.
Environnement
- OS : Debian 6.0.6 x64
Download
$ wget http://mirrors.linsrv.net/apache/incubator/mesos/mesos-0.11.0-incubating/mesos-0.11.0-incubating.tar.gzDependencies
Install the Debian dependencies, as root:
apt-get install build-essential python-dev libcunit1 libz-dev libssl-dev libcurl4-openssl-devInstallation
Prepare the mesos installation, as root:
tar xzvf mesos-0.11.0-incubating.tar.gz
mv mesos-0.11.0 /usr/local/mesos
cd /usr/local/mesos
mkdir build
cd build
../configure
make
make checkThen install mesos, as root :
make install###Configuration (standalone)
See the official configuration page here for further details.
- Set the hostname ‘localhost’ in the file
masters:
$ cat /usr/local/var/mesos/deploy/masters
localhost- Set the hostname ‘localhost’ in the file
slaves:
$ cat /usr/local/var/mesos/deploy/masters
localhost- Edit
mesos.confand set the following parameters:
$ vim /usr/local/var/mesos/conf/mesos.conf
log_dir=/var/log/mesos
master=localhost:5050- Create the log folder :
mkdir /var/log/mesos- Create and SSH key for
rooton the master without password:
ssh-keygen -P ""- Distribute the key on localhost (standalone mode):
ssh-copy-id localhostWARNING : this SSH configuration is for testing environnement ONLY, please ensure a proper key and user management on each node.
##Run mesos
Start the cluster as root:
cd /usr/local/sbin
./mesos-start-cluster.shNetwork status, as root :
netstat -lptn
Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1474/sshd
tcp 0 0 0.0.0.0:5050 0.0.0.0:* LISTEN 8104/mesos-master
tcp 0 0 0.0.0.0:45350 0.0.0.0:* LISTEN 8119/mesos-slaveCatch the log of the master and slave daemons with this command as root:
tail -f /var/log/*.INFO###Mesos UI
Mesos listening to port 5050 for job orchestration AND web ui, check the cluster status from web ui on http://localhost:5050. An overview of this standalone configuration in the UI :

###Test mesos framework
Several examples are available in the distribution:
cd /usr/local/mesos/buildRun one java example:
src/examples/java/test-framework localhost:5050
Registered! ID = 201306061832-16777343-5050-8104-0000
Launching task 0
Status update: task 0 is in state TASK_RUNNING
Status update: task 0 is in state TASK_FINISHED
Finished tasks: 1
[...]
Launching task 4
Status update: task 4 is in state TASK_RUNNING
Status update: task 4 is in state TASK_FINISHED
Finished tasks: 5Or one python example:
src/examples/python/test-framework localhost:5050##Stop mesos
Stop the cluster as root:
cd /usr/local/sbin
./mesos-stop-cluster.sh