How to properly setup Mesos, Zookeeper and Chronos

4,520 views
Skip to first unread message

Mael Primet

unread,
Dec 9, 2013, 9:06:58 AM12/9/13
to chronos-...@googlegroups.com
Hello,

I tried to install Mesos, Zookeeper and Chronos on a Ubuntu (non Amazon) box, I downloaded Zookeeper from the Apache site rather than using the one in Mesos because it looked like it did not work otherwise,

then I run zookeeper, mesos-master, and chronos as a non-root user

 - this seems to open ports on the box, so I guess I have to block them in IPTABLE otherwise anyone can access the server from outside without authorization, or am I missing something?
 - if I run mesos as a standard user (rather than root) I get the "cannot chown" error message, although the /tmp/mesos/... folders are owned by my account:
     - what is mesos doing, is it trying to change the user to root, and why? 
     - if I run mesos as root it works fine, but then it seems dangerous to allow anyone to run scripts as root

what is the proper way to configure mesos / chronos?

Thank you for this awesome lib!

Mael Primet

unread,
Dec 9, 2013, 9:50:28 AM12/9/13
to chronos-...@googlegroups.com
For the user I just saw the `--user` option so that's fine :)

Florian Leibert

unread,
Dec 9, 2013, 11:16:33 AM12/9/13
to Mael Primet, chronos-...@googlegroups.com
You should run the mesos-slave as root such that it can chown to the user that a given framework should run on, etc. The master does not need to be root. 

If you're using chronos, you can also set the user for the framework. If any of these scripts require root access, you should set the user for the framework to root as well.

Both Chronos and Mesos will open ports - with chronos the web-port is set via "--http_port 8080", with Mesos the default port is 5050 for the master and 5051 for the slave. You can also modify these. 

I hope this helps.


--
You received this message because you are subscribed to the Google Groups "chronos-scheduler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chronos-schedu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

---------------------------------------
---------------------------------------

Mael Primet

unread,
Dec 9, 2013, 11:18:58 AM12/9/13
to chronos-...@googlegroups.com, Mael Primet
Great thanks,

I did not want to set the user as root for security reasons, but I found how to do it by using `--user`

I guess there is no way to disable mesos webserver UI?

Florian Leibert

unread,
Dec 9, 2013, 11:22:20 AM12/9/13
to Mael Primet, chronos-...@googlegroups.com
No - but I also think you would want to the Web UI to debug chronos tasks - it allows you to see stdout & stderr of the sandbox a task runs in.


--
You received this message because you are subscribed to the Google Groups "chronos-scheduler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chronos-schedu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Mael Primet

unread,
Dec 9, 2013, 12:33:26 PM12/9/13
to chronos-...@googlegroups.com, Mael Primet
When running mesos as a normal user it does not show any of the slaves, or any CPU etc, is that normal? do we need to run mesos as root?

Although scripts work fine

Florian Leibert

unread,
Dec 9, 2013, 1:08:53 PM12/9/13
to Mael Primet, chronos-...@googlegroups.com
I think you're likely not starting the mesos slave with the right master-location. If you're using zookeeper for discovery

a) the mesos-master should be started with this option (please replace localhost with your zk-cluster if you're not running everything on the same node):
--zk=zk://localhost:2181/mesos

b) the mesos-slave should be started with this option (please replace localhost with your zk-cluster if you're not running everything on the same node):
--master=zk://localhost:2181/mesos

c) chronos should be started with this option:
--master zk://localhost:2181/mesos

Cheers,
--Flo




--
You received this message because you are subscribed to the Google Groups "chronos-scheduler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chronos-schedu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Message has been deleted

Dang, Anderson

unread,
Apr 8, 2014, 10:12:48 PM4/8/14
to baskaran gopalan, chronos-...@googlegroups.com, Mael Primet
Baskaran,
Put “/mesos” at the very end of the —zk argument. 
I.e. --zk=zk://localhost:2181,10.129.80.225:2181/mesos

Just list the host:port entries for the —zk_host argument.
I.e. --zk_hosts zk://localhost:2181,10.129.80.225:2181

Sincerely,
Anderson

From: baskaran gopalan <baskaran...@gmail.com>
Date: Tuesday, April 8, 2014 at 6:15 PM
To: <chronos-...@googlegroups.com>
Cc: Mael Primet <mael....@snips.net>
Subject: Re: How to properly setup Mesos, Zookeeper and Chronos

Hi,

I am trying to set up 3 node cluster with machine 1 running zookeeper, master, chronos. Machine 2 I am running mesos master and zookeeper. Machine 3 I am running Mesos Slave.

If I run one zookeeper and when I shut down a master in one machine, the other master automatically picks up.
If I run two zookeepers in machine 1 and machine 2, and when I shut down one zookeeper, the scheduling just stops.
I am not sure what mistake I do when I start these applications.  Following is the commands I use.

In machine 1:
cd /home/bgopalan-admin/zookeeper-3.4.6
./bin/zkServer.sh start

In Machine 2:

cd /home/bgopalan-admin/zookeeper-3.4.6
./bin/zkServer.sh start

In Machine 1:

./bin/mesos-master.sh --zk=zk://localhost:2181/mesos,10.129.80.225:2181/mesos --ip==,10.129.80.223 &

In Machine 2:

./bin/mesos-master.sh --zk=zk://localhost:2181/mesos,10.129.80.223:2181/mesos --ip==,10.129.80.225 &

In Machine 3:

nohup ./bin/mesos-slave.sh --master=zk://localhost:2181/mesos,10.129.80.223:2181/mesos --ip==,10.129.80.224 &

In Machine 1:

nohup ./bin/start-chronos.bash --master zk://localhost:2181/mesos,10.129.80.225:2181/mesos --zk_hosts zk://localhost:2181/mesos,10.129.80.225:2181/mesos --http_port 8081 --mail_server localhost:25 --mail_user bgopalan --mail_password Palanivel@901 --mail_from baskaran...@intuit.com &

Can somebody help to verify if the above sequence and parameters are fine to test when  one zookeeper goes down the other will still help to chronos scheduling.

Thanks
Baskaran
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages