mesos cluster搭建

安利一篇我翻译的国外大牛的神经网络入门文章

部署结构

192.168.1.100 (master)
192.168.1.101 (slave)
192.168.1.102 (slave)
在三台服务器上创建非root账号grid,同时配置三台服务器ssh免密码登录。
软件版本:mesos-0.24.0-1.0.27.centos65.x86_64.rpm
软件下载地址以及jdk安装方法可以参考我的另外一篇博客
http://blog.csdn.net/github_25679381/article/details/52034995

安装mesos

rpm -ivh mesos-0.24.0-1.0.27.centos65.x86_64.rpm

配置mesos

配置文件位于/usr/etc/mesos下面
各个文件内容配置如下:
masters

192.168.1.100

slaves

192.168.1.101
192.168.1.102

mesos-deploy-env.sh

#!/usr/bin/env bash
 
# This file contains environment variables that modify how the deploy
# scripts are run. For example, it can be used to configure SSH
# options (see below).
 
# Options for SSH.
export SSH_OPTS="-o StrictHostKeyChecking=no -o ConnectTimeout=2"
 
# Use sudo for launching masters and slaves.
#export DEPLOY_WITH_SUDO=1

mesos-master-env.sh

# This file contains environment variables that are passed to mesos-master.
# To get a description of all options run mesos-master --help; any option
# supported as a command-line option is also supported as an environment
# variable.
 
# Some options you're likely to want to set:
# export MESOS_log_dir=/var/log/mesos
export MESOS_ip=10.185.81.195
export MESOS_work_dir=/home/grid/working/meso

mesos-slave-env.sh

# This file contains environment variables that are passed to mesos-slave.
# To get a description of all options run mesos-slave --help; any option
# supported as a command-line option is also supported as an environment
# variable.
 
# You must at least set MESOS_master.
 
# The mesos master URL to contact. Should be host:port for
# non-ZooKeeper based masters, otherwise a zk:// or file:// URL.
export MESOS_master=10.185.81.195:5050
export MESOS_work_dir=/home/grid/working/mesos
 
# Other options you're likely to want to set:
# export MESOS_log_dir=/var/log/mesos
# export MESOS_work_dir=/var/run/mesos
# export MESOS_isolation=cgroups

配置hosts文件

/etc/hosts

192.168.1.100  hostname-master
192.168.1.101  hostname-slave0
192.168.1.101  hostname-slave1

启动mesos集群

mesos-start-cluster.sh

停止mesos集群

mesos-stop-cluster.sh
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值