跟我一起学docker(17)--多节点mesos集群

作者: IT人故事会 | 来源:发表于2018-05-17 10:55 被阅读41次

    多节点mesos集群

    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)

    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"

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

    访问测试应用的数据

    完成弹性伸缩

    扩展:

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

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

    往期docker学习:

    认识docker

    核心概念和安装 

    镜像的常用操作

    容器的基本操作

    仓库

    数据卷

    网络

    Dockerfile

    git入门

    Jenkins使用

    Jenkins+git+docker

    docker compose的使用

    docker Machine的使用

    docker swarm的使用

    监控日志和日志管理

    单节点mesos集群

    相关文章

      网友评论

        本文标题:跟我一起学docker(17)--多节点mesos集群

        本文链接:https://www.haomeiwen.com/subject/qcfbdftx.html