CentOS 7 Installation Mesos+marathon+zookeeper cluster

Source: Internet
Author: User
Tags mesosphere mesos marathon

Reference article:

Http://www.xuliangwei.com/xubusi/422.html

https://open.mesosphere.com/getting-started/install/#master-setup

https://www.digitalocean.com/community/tutorials/how-to-configure-a-production-ready-mesosphere-cluster-on-ubuntu-14-04


Installation Environment:

3 server

192.168.100.10 mesos-master mesos-master Slave, Zookeeper, Marathon, (MARATHON-LB)

192.168.100.20 mesos-node1 mesos-master Slave, Zookeeper, Marathon

192.168.100.30 mesos-node2 mesos-master Slave, Zookeeper, Marathon


Hosts

192.168.100.10 Mesos-master

192.168.100.20 Mesos-node1

192.168.100.30 Mesos-node2



1. Yum installation package

operate separately on 3 services:


RPM-UVH http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm

Yum-y Install Mesos Marathon

Yum-y Install Mesosphere-zookeeper


2. Add myID file

Operates on 3 machines, respectively

Vim/var/lib/zookeeper/myid

Edit the content separately, add the 1 separately, 2,3 go in

[Email protected] ~]# Cat/var/lib/zookeeper/myid

1

[Email protected] ~]# Cat/var/lib/zookeeper/myid

2

[Email protected] ~]# Cat/var/lib/zookeeper/myid

3


3. Edit the/etc/zookeeper/conf/zoo.cfg files of 3 servers separately

Add to:

server.1=192.168.100.10:2888:3888

server.2=192.168.100.20:2888:3888

server.3=192.168.100.30:2888:3888


4. Restart the Zookeeper service on 3 machines respectively

Systemctl Restart Zookeeper


5, Detection zookeeper start state

Ps-ef|grep Zookeeper


[Email protected] ~]# Ps-ef|grep Zookeeper

Root 2674 1 7 18:39? 00:00:00 java-dzookeeper.log.dir=. -dzookeeper.root.logger=info,console-cp/opt/mesosphere/zookeeper/bin/. /build/classes:/opt/mesosphere/zookeeper/bin/. /build/lib/*.jar:/opt/mesosphere/zookeeper/bin/. /lib/slf4j-log4j12-1.6.1.jar:/opt/mesosphere/zookeeper/bin/. /lib/slf4j-api-1.6.1.jar:/opt/mesosphere/zookeeper/bin/. /lib/netty-3.7.0.final.jar:/opt/mesosphere/zookeeper/bin/. /lib/log4j-1.2.16.jar:/opt/mesosphere/zookeeper/bin/. /lib/jline-0.9.94.jar:/opt/mesosphere/zookeeper/bin/. /zookeeper-3.4.6.jar:/opt/mesosphere/zookeeper/bin/. /src/java/lib/*.jar:/etc/zookeeper/conf:-dcom.sun.management.jmxremote- Dcom.sun.management.jmxremote.local.only=false org.apache.zookeeper.server.quorum.quorumpeermain/etc/zookeeper/ Conf/zoo.cfg

Root 2721 2255 0 18:39 pts/0 00:00:00 grep--color=auto Zookeeper


6. Edit the/etc/mesos/zk configuration file of 3 servers separately, add

Zk://192.168.100.10:2181,192.168.100.20:2181,192.168.100.30:2181/mesos


7, edit 3 servers separately, modify the judgment value/etc/mesos-master/quorum

Added content to: 2

Description

If 3 main Mesos, the value here is to take the number of nodes divided by 2 plus 1, take the integer part. If it is 3 nodes, the value here is 2, and if it is 4 main mesos, the value here is 3.


Edit Mesos-master:

[Email protected] mesos-master]# pwd

/etc/mesos-master

[email protected] mesos-master]# cat hostname

192.168.100.10 (the other 2 units are 20,30)

[[email protected] mesos-master]# Cat IP

192.168.100.10 (the other 2 units are 20,30)

[email protected] mesos-master]# cat Quorum

2

Edit Mesos-slave:

[Email protected] mesos-slave]# pwd

/etc/mesos-slave

[email protected] mesos-slave]# cat hostname

192.168.100.30

[[email protected] mesos-slave]# Cat IP

192.168.100.30




8, edit the marathon of 3 servers separately, modify the configuration as follows:

Mkdir-p/etc/marathon/conf

Cd/etc/marathon/conf

Vim hostname

Add to:

192.168.100.10 (the other 2 units are 20,30)



Finally, restart each service:

Systemctl Restart Mesos-master

Systemctl Restart Zookeeper

Systemctl Restart Marathon.service

Systemctl Restart Mesos-slave


To set up boot from:

Systemctl Enable Mesos-master

Systemctl Enable Zookeeper

Systemctl Enable Marathon.service

Systemctl Enable Mesos-slave


Access to see the effect:

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/8C/F7/wKiom1iAC9nxDOKbAAPqGQunH7U316.png-wh_500x0-wm_3 -wmp_4-s_289605052.png "title=" 11.png "alt=" Wkiom1iac9nxdokbaapqgqunh7u316.png-wh_50 "/>


650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8C/F4/wKioL1iADAHgF2arAAS8SGC4wX4663.png-wh_500x0-wm_3 -wmp_4-s_1447006714.png "style=" Float:none; "title=" 22.png "alt=" Wkiol1iadahgf2araas8sgc4wx4663.png-wh_50 "/>

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/8C/F4/wKioL1iADALieppoAAPXmePwB18600.png-wh_500x0-wm_3 -wmp_4-s_2250751607.png "style=" Float:none; "title=" 33.png "alt=" Wkiol1iadalieppoaapxmepwb18600.png-wh_50 "/>

Here, if the client does not display, you can try to clean up the Mesos log:

Clean mesos:rm-rf/var/lib/mesos/*

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8C/F4/wKioL1iADDGS2kU9AANqATLTyNs858.png-wh_500x0-wm_3 -wmp_4-s_3538514005.png "title=" 44.png "alt=" Wkiol1iaddgs2ku9aanqatltyns858.png-wh_50 "/>


9. Configure marathon so that it can create Docker containers:

Install Docker services on these 3 services

Yum Install-y Docker

Systemctl Start Docker

Systemctl Enable Docker

Installation Image: For example Nginx

Add configuration parameters on all Mesos-slave and restart

# echo ' Docker,mesos ' | Tee/etc/mesos-slave/containerizers

# systemctl Restart Mesos-slave #重启Mesos-slave


You can then create the Docker container on the marathon page:

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/8C/F7/wKiom1iADEPhxXAjAANki_v0RyM199.png-wh_500x0-wm_3 -wmp_4-s_1878913771.png "title=" 55.png "alt=" Wkiom1iadephxxajaanki_v0rym199.png-wh_50 "/>





This article is from the "bitter coffee ' s Yun ' an Road" blog, please be sure to keep this source http://alsww.blog.51cto.com/2001924/1893070

CentOS 7 Installation Mesos+marathon+zookeeper cluster

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.