一、Mesos 简介
二、Mesos 集群安装
1. 安装环境
role
hostname
ip
release
|
|
|
|
master1 | sh-docker-master-01 | 1.1.1.100 | centos7.2 |
master2 | sh-docker-node-01 | 1.1.1.101 | centos7.2 |
master3 | sh-docker-node-02 | 1.1.1.102 | centos7.2 |
slave1 | bj-docker-node-01 | 1.1.1.103 | centos7.2 |
2 安装Mesos Master
下面操作若未注明均在三台主机操作
rpm -Uvh http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-2.noarch.rpm
echo "1.1.1.100 master1" >>/etc/hosts
echo "1.1.1.101 master2" >>/etc/hosts
echo "1.1.1.102 master3" >>/etc/hosts
yum -y install mesos marathon mesosphere-zookeeper
for server in zookeeper mesos-master marathon;dosystemctl start $serverdonesystemctl disable mesos-slave
3. 安装Mesos Slave
yum -y install mesos
echo "zk://1.1.1.100:2181,1.1.1.101:2181,1.1.1.102:2181/mesos">/etc/mesos/zkecho $hostname >/etc/mesos-slave/hostname
rm -rf /etc/mesos-slave/work_dir && mkdir /etc/mesos-slave/work_dir/provisioner -p
systemctl start mesos-slave systemctl enable mesos-slavesystemctl disable mesos-master
mesos-slave --master=zk://1.1.1.100:2181,1.1.1.101:2181,1.1.1.102:2181/mesos --work_dir=/etc/mesos-slave/work_dir
4. 访问Mesos
marathon地址:http://1.1.1.101:8080/
# 可利用其发布docker镜像并可调整应用数量
查看 slave
CIO之家 www.ciozj.com 公众号:imciow