0
点赞
收藏
分享

微信扫一扫

「初级篇」跟我一起学docker(17)--多节点mesos集群


 

多节点mesos集群

「初级篇」跟我一起学docker(17)--多节点mesos集群_IP

「初级篇」跟我一起学docker(17)--多节点mesos集群_配置文件_02

1.配置master

配置文件:/etc/default/mesos

增加配置:IP=192.168.30.3(当前节点IP)

2.配置slave节点

配置文件:/etc/default/mesos

增加配置:IP=192.168.30.4(当前节点IP)

配置slave节点的master

配置文件:/etc/mesos/zk

配置:zk://192.168.30.3:2181/mesos

3.启动slave节点:

启动命令:service mesos-slavestart

注意:

1.日志输出是否报错(默认地址:/var/log/mesos/mesos-slave.INFO)

2.观察进程是否正常(命令:ps –ef|grepmesos-slave)

「初级篇」跟我一起学docker(17)--多节点mesos集群_配置文件_03

Marathon

1.什么是marathon?

marathon是mesos的一个容器编排的插件。

2.配置marathon

开启mesos容器化配置:

命令:

echo ‘docker,mesos’ >/etc/mesos-slave/containerizers

echo ‘10mins’ > /etc/mesos-slave/executor_registration_timeout

重启slave节点:service mesos-slave restart

3.安装marathon

sudo yum -y installmarathon

4.启动marathon

service marathon start

5.Marathon Web:

http::8080

通过marathon调度mesos运行容器:

curl -X POST http://192.168.30.3:8080/v2/apps-d @app1.json -H "Content-type: application/json"

「初级篇」跟我一起学docker(17)--多节点mesos集群_配置文件_04

在页面查看marathon启动测试容器的配置

访问测试应用的数据

完成弹性伸缩

扩展:

marathon官网:https://mesosphere.github.io/marathon/docs/

安装集群:https://open.mesosphere.com/getting-started/install/


「初级篇」跟我一起学docker(17)--多节点mesos集群_docker_05

举报

相关推荐

0 条评论