亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Centos7上Mesos和Marathon的安裝和配置

 更新時(shí)間:2017年11月18日 10:49:34   作者:yubang  
這篇文章主要介紹了Centos7上Mesos和Marathon的安裝和配置,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧

對(duì)Mesos和Marathon的安裝官方文檔有較詳細(xì)的安裝說(shuō)明,但是英文的。我參照官方安裝文檔(https://open.mesosphere.com/getting-started/install/),在測(cè)試環(huán)境試裝了一下,這里整理下安裝配置的步驟。

測(cè)試環(huán)境

服務(wù)器IP 說(shuō)明
192.168.0.101 Master節(jié)點(diǎn)
192.168.0.102 Master節(jié)點(diǎn)
192.168.0.103 Master節(jié)點(diǎn)
192.168.0.104 Slave節(jié)點(diǎn)
192.168.0.105 Slave節(jié)點(diǎn)
192.168.0.106 Slave節(jié)點(diǎn)

我們通常采用多個(gè)master節(jié)點(diǎn)和多個(gè)slave節(jié)點(diǎn)來(lái)實(shí)現(xiàn)高可用。這里使用3個(gè)master節(jié)點(diǎn)來(lái)進(jìn)行高可用配置,每個(gè)master節(jié)點(diǎn)上都運(yùn)行mesos-master,marathon和提供選主機(jī)制的zookeeper服務(wù)。slave節(jié)點(diǎn)上只需要運(yùn)行mesos-slave服務(wù),后期如果需要添加slave節(jié)點(diǎn),可以很容易的添加。為了簡(jiǎn)單,下面直接采用yum方式安裝(除此之外,還可以采用編譯安裝)。

實(shí)驗(yàn)環(huán)境

  1. 服務(wù)器:京東云,1核2G
  2. 系統(tǒng):centos7.3 64bit

安裝docker

關(guān)閉防火墻

systemctl stop firewalld.service 
systemctl disable firewalld.service

關(guān)閉selinux

setenforce 0

修改/etc/selinux/config文件的SELINUX=XXX

vi /etc/selinux/config
SELINUX=disabled

安裝docker

yum install epel-release -y
yum install -y docker
systemctl enable docker

啟動(dòng)

systemctl start docker.service

安裝zookeeper

先執(zhí)行下面命令安裝

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

配置zookeeper

# 改成自己的內(nèi)網(wǎng)ip
HOST_IP=192.168.1.105
echo 1 > /var/lib/zookeeper/myid
echo "server.1=${HOST_IP}:2888:3888" >> /etc/zookeeper/conf/zoo.cfg

啟動(dòng)zookeeper

systemctl start zookeeper

配置mesos master

安裝

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

配置

# 改成自己的zookeeper的ip
HOST_IP=192.168.1.105
echo "zk://${HOST_IP}:2181/mesos" > /etc/mesos/zk
echo "${HOST_IP}" > /etc/mesos-master/hostname

啟動(dòng)

systemctl start mesos-master

配置mesos slave

安裝

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

配置

# 改成自己的zookeeper的ip
HOST_IP=192.168.1.105
echo "zk://${HOST_IP}:2181/mesos" > /etc/mesos/zk
echo 'docker,mesos' > /etc/mesos-slave/containerizers
echo '5mins' > /etc/mesos-slave/executor_registration_timeout
# 改成本機(jī)IP
HOST_IP=192.168.1.105
echo "${HOST_IP}" > /etc/mesos-slave/hostname

啟動(dòng)

systemctl start mesos-slave

配置marathon

安裝

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

配置

安裝在mesos的master節(jié)點(diǎn)即可

啟動(dòng)

systemctl start marathon

marthon應(yīng)用綁定域名

安裝marathon-lb

復(fù)制代碼 代碼如下:

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

創(chuàng)建應(yīng)用的時(shí)候加上兩個(gè)label

HAPROXY_GROUP=external
HAPROXY_0_VHOST=你的域名

注意

打開(kāi) http://你的IP:5050 即可看到mesos的web版控制臺(tái)

打開(kāi) http://你的IP:8080 即可看到marthon的web版控制臺(tái)

由于這樣子配置免密碼可以訪問(wèn),所以不能直接如此放到生產(chǎn)環(huán)境

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論