Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and configuration of Mesos and Marathon on Centos7

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The official documentation for the installation of Mesos and Marathon has more detailed installation instructions, but in English. Referring to the official installation documentation (https://open.mesosphere.com/getting-started/install/), I tried to install it in the test environment, and here I sort out the steps of the installation configuration.

Test environment

Server IP description 192.168.0.101Master node 192.168.0.102Master node 192.168.0.103Master node 192.168.0.104Slave node 192.168.0.105Slave node 192.168.0.106Slave node

We usually use multiple master nodes and multiple slave nodes to achieve high availability. Here, three master nodes are used for high availability configuration, with mesos-master,marathon running on each master node and a zookeeper service that provides a host selection mechanism. Only the mesos-slave service needs to be run on the slave node, and if you need to add the slave node later, it can be easily added. For simplicity, let's install it directly in yum (in addition, you can also use compiler installation).

Experimental environment

Server: JD.com Cloud, 1-core 2G system: centos7.3 64bit

Install docker

Turn off the firewall

Systemctl stop firewalld.service systemctl disable firewalld.service

Close selinux

Setenforce 0

Modify the SELINUX=XXX of / etc/selinux/config file

Vi / etc/selinux/configSELINUX=disabled

Install docker

Yum install epel-release-yyum install-y dockersystemctl enable docker

Start

Systemctl start docker.service

Install zookeeper

First execute the following command to install

Rpm- Uvh http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpmrpm-- import / etc/pki/rpm-gpg/RPM-GPG-KEY-mesosphereyum install mesosphere-zookeeper-y

Configure zookeeper

# change it to your own private network ipHOST_IP=192.168.1.105echo 1 > / var/lib/zookeeper/myidecho "server.1=$ {HOST_IP}: 2888 HOST_IP" > / etc/zookeeper/conf/zoo.cfg

Start zookeeper

Systemctl start zookeeper

Configure mesos master

Installation

Rpm- Uvh http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpmrpm-- import / etc/pki/rpm-gpg/RPM-GPG-KEY-mesosphereyum install mesos-y

Configuration

# change to your own zookeeper ipHOST_IP=192.168.1.105echo "zk://$ {HOST_IP}: 2181/mesos" > / etc/mesos/zkecho "${HOST_IP}" > / etc/mesos-master/hostname

Start

Systemctl start mesos-master

Configure mesos slave

Installation

Rpm- Uvh http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpmrpm-- import / etc/pki/rpm-gpg/RPM-GPG-KEY-mesosphereyum install mesos-y

Configuration

# change it to your own zookeeper ipHOST_IP=192.168.1.105echo "zk://$ {HOST_IP}: 2181/mesos" > / etc/mesos/zkecho 'docker,mesos' > / etc/mesos-slave/containerizersecho' 5mins'> / etc/mesos-slave/executor_registration_timeout# to native IPHOST_IP=192.168.1.105echo "${HOST_IP}" > / etc/mesos-slave/hostname

Start

Systemctl start mesos-slave

Configure marathon

Installation

Rpm- Uvh http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpmrpm-- import / etc/pki/rpm-gpg/RPM-GPG-KEY-mesosphereyum install marathon-y

Configuration

Just install it on the master node of mesos

Start

Systemctl start marathon

Domain name bound to marthon application

Install marathon-lb

The copy code is as follows:

Docker run-d-restart=always-- name marathon-lb-- privileged-e PORTS=9090-- net=host ccr.ccs.tencentyun.com/mesos/marathon-lb:v1.11.1 sse-m http://192.168.0.105:8080-- group external

Add two label when creating the application

HAPROXY_GROUP=externalHAPROXY_0_VHOST= your domain name

Be careful

Open http:// your IP:5050 and you can see the web console of mesos

Open http:// your IP:8080 and you can see the web console of marthon

Since password-free access is configured in this way, it cannot be put directly into the production environment.

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report