###############################################################
Mesos 集群master配置
###############################################################
1:部署环境介绍:
服务器IP地址主机名安装服务
172.16.7.11ctn-7-11.ptmind.com mesos-master
172.16.7.12ctn-7-12.ptmind.com mesos-master
172.16.7.13ctn-7-13.ptmind.com mesos-master
2:部署方法实例(172.16.7.12):
echo ctn-7-12.ptmind.com | sudo tee /etc/mesos-master/hostname
3:启动服务,添加开机启动
systemctl restart mesos-master
systemctl status mesos-master
systemctl enable mesos-master
4:验证服务端口
netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
...........
tcp 0 0 0.0.0.0:5050 0.0.0.0:* LISTEN 3309/mesos-master
5:服务启动后,可以通过浏览器访问查看系统信息:
http://172.16.7.12:5050/
打开页面,点击LOG,可以看到集群的日志,在后续其它master加入成功集群后,可以看到如下字样:
log-replica(1)@172.16.7.12:5050, log-replica(1)@172.16.7.13:5050 }
6:查看新加入集群的服务状态
[root@ctn-7-12 mesos-master]# service mesos-master status
Redirecting to /bin/systemctl status mesos-master.service
● mesos-master.service - Mesos Master
Active: active (running) since Tue 2016-03-22 17:42:08 CST; 3s ago
Main PID: 27783 (mesos-master)
CGroup: /system.slice/mesos-master.service
├─27783 /usr/sbin/mesos-master --zk=zk://ctn-7-11.ptmind.com:2181,ctn-7-12.ptmind.com:2181,ctn-7-13.ptmind.com:2181/mesos --port=5050 --log_dir=/var/log/mesos --hostn...
ctn-7-12.ptmind.com mesos-master[27808]: 27820 detector.cpp:479] A new leading master (UPID=master@172.16.7.12:5050) is detected## leader
ctn-7-12.ptmind.com mesos-master[27808]: 27816 master.cpp:1711] The newly elected leader is master@172.16.7.12:5050 with id 23760...8f7bbc5ab4## leader
7:访问验证:
浏览器访问 http:mesos-maser:5050 即可访问系统,如果输入IP地址不是leader 节点,系统会自动跳转至leader .