nomad 集群搭建
比较简单的集群搭建
一个server 三个client (单机) 参考代码 https://github.com/rongfengliang/nomad-cluster-demo
server 配置
# Increase log verbosity
log_level = "DEBUG"
# Setup data dir 实际配置参考自己的配置路径,必须是绝对路径
data_dir = "/Users/dalong/mylearning/nomad-cluster/server/node1/data"
# Enable the server
server {
enabled = true
# Self-elect, should be 3 or 5 for production
bootstrap_expect = 1
}
客户端配置
三个
- client1
# Increase log verbosity
log_level = "DEBUG"
# Setup data dir
data_dir = "/Users/dalong/mylearning/nomad-cluster/client/client1"
# Give the agent a unique name. Defaults to hostname
name = "client1"
# Enable the client
client {
enabled = true
# For demo assume we are talking to server1. For production,
# this should be like "nomad.service.consul:4647" and a system
# like Consul used for service discovery.
servers = ["127.0.0.1:4647"]
}
# Modify our port to avoid a collision with server1
ports {
http = 5656
}
- client2
# Increase log verbosity
log_level = "DEBUG"
# Setup data dir
data_dir = "/Users/dalong/mylearning/nomad-cluster/client/client2"
# Give the agent a unique name. Defaults to hostname
name = "client2"
# Enable the client
client {
enabled = true
# For demo assume we are talking to server1. For production,
# this should be like "nomad.service.consul:4647" and a system
# like Consul used for service discovery.
servers = ["127.0.0.1:4647"]
}
# Modify our port to avoid a collision with server1
ports {
http = 5657
}
- client3
# Increase log verbosity
log_level = "DEBUG"
# Setup data dir
data_dir = "/Users/dalong/mylearning/nomad-cluster/client/client3"
# Give the agent a unique name. Defaults to hostname
name = "client3"
# Enable the client
client {
enabled = true
# For demo assume we are talking to server1. For production,
# this should be like "nomad.service.consul:4647" and a system
# like Consul used for service discovery.
servers = ["127.0.0.1:4647"]
}
# Modify our port to avoid a collision with server1
ports {
http = 5658
}
启动server && client
- 启动consul
测试,使用单
consul agent --dev
- server
nomad agent -config server.hcl
- client(1、2、3)
按照实际,进入目录进行启动
nomad agent -config client(1、2、3).hcl
参考界面
- consul

nomad server

client

运行job
- 生成参考代码
nomad init
- 修改运行个数为5
实际代码可以参考github
group "cache" {
count = 5
- 运行
nomad run example.nomad
- 参考界面

consul dns 测试

说明
实际环境中我们使用集群环境,同时结合coredns 可以实现一些比较强大的功能。
参考资料
https://www.nomadproject.io/intro/getting-started/cluster.html
https://github.com/rongfengliang/nomad-cluster-demo
nomad 集群搭建的更多相关文章
- 【Oracle 集群】Linux下Oracle RAC集群搭建之Oracle DataBase安装(八)
Oracle 11G RAC数据库安装(八) 概述:写下本文档的初衷和动力,来源于上篇的<oracle基本操作手册>.oracle基本操作手册是作者研一假期对oracle基础知识学习的汇总 ...
- 【Oracle 集群】Linux下Oracle RAC集群搭建之基本测试与使用(九)
Oracle 11G RAC数据库安装(九) 概述:写下本文档的初衷和动力,来源于上篇的<oracle基本操作手册>.oracle基本操作手册是作者研一假期对oracle基础知识学习的汇总 ...
- 【Data Cluster】真机环境下MySQL数据库集群搭建
真机环境下MySQL-Cluster搭建文档 摘要:本年伊始阶段,由于实验室对不同数据库性能测试需求,才出现MySQL集群搭建.购置主机,交换机,双绞线等一系列准备工作就绪,也就开始集群搭建.起初笔 ...
- (四)Spark集群搭建-Java&Python版Spark
Spark集群搭建 视频教程 1.优酷 2.YouTube 安装scala环境 下载地址http://www.scala-lang.org/download/ 上传scala-2.10.5.tgz到m ...
- (三)Spark-Hadoop集群搭建-Java&Python版Spark
Spark-Hadoop集群搭建 视频教程: 1.优酷 2.YouTube 配置java 启动ftp [root@master ~]# /etc/init.d/vsftpd restart 关闭 vs ...
- Mosquitto搭建Android推送服务(三)Mosquitto集群搭建
文章钢要: 1.进行双服务器搭建 2.进行多服务器搭建 一.Mosquitto的分布式集群部署 如果需要做并发量很大的时候就需要考虑做集群处理,但是我在查找资料的时候发现并不多,所以整理了一下,搭建简 ...
- Mongodb集群搭建的三种方式
转自:http://blog.csdn.net/luonanqin/article/details/8497860 MongoDB是时下流行的NoSql数据库,它的存储方式是文档式存储,并不是Key- ...
- 分布式架构中一致性解决方案——Zookeeper集群搭建
当我们的项目在不知不觉中做大了之后,各种问题就出来了,真jb头疼,比如性能,业务系统的并行计算的一致性协调问题,比如分布式架构的事务问题, 我们需要多台机器共同commit事务,经典的案例当然是银行转 ...
- 从零自学Hadoop(06):集群搭建
阅读目录 序 集群搭建 监控 系列索引 本文版权归mephisto和博客园共有,欢迎转载,但须保留此段声明,并给出原文链接,谢谢合作. 文章是哥(mephisto)写的,SourceLink 序 上一 ...
随机推荐
- EditPlus 4.3.2463 中文版已经发布(10月16日更新)
距离上个版本在本年5月发布后,EditPlus 网站沉寂多月.日前终于发布了一个新的小版本. 该版本却具有多项改进,值得一提: * Ctrl+Alt+Up/Down 键在列选模式下可插入多个插入点. ...
- RedHot 不能联网 ifconfig命令只显示lo 不显示eth0的解决方法!
1.修改eth0 具体步骤如下 vi /etc/sysconfig/network-scripts/ifcfg-eth0, i,进入insert编辑模式,具体参数设置如下: DEVICE=eth0 B ...
- Ubuntu下常用强化学习实验环境搭建(MuJoCo, OpenAI Gym, rllab, DeepMind Lab, TORCS, PySC2)
http://lib.csdn.net/article/aimachinelearning/68113 原文地址:http://blog.csdn.net/jinzhuojun/article/det ...
- Python笔记 #10# Histograms
1.Build a histogram In [1]: help(plt.hist) Help on function hist in module matplotlib.pyplot: hist(x ...
- 简单方法实现无刷新提交Form表单
前几天遇到一个前端的问题.我希望提交表单后页面不跳转且不刷新当前页面,然而查了很多方法都没有解决. 由于Form 是提交后一定刷新页面的,所以我们可以用一个折中的办法.我们给Form 指定一个ifra ...
- CycleGAN 配置及其实现
目录 pytorch-CycleGAN-and-pix2pix 环境要求 安装 Train 用已有数据集训练 Test 预训练模型 训练与测试自己的数据集 遇到的问题 Reference pytorc ...
- TCGA系列--TCGA可视化数据库GEPIA
中国大牛力作 张泽民: http://gepia.cancer-pku.cn/index.html http://cancer-pku.cn/
- Pandas 练习题
1. 使用 pandas 中的函数,下载上证综指过去一段时间的数据,进行数据探索. 上证综指,全称是上海证券综合指数,是以上证所挂牌上市的全部股票为计算范围,以发行量为权数的加权综合股价指数.这一指数 ...
- MySQL事务处理实现方法步骤
需求说明: 案例背景:银行的转账过程中,发生意外是在所难免.为了避免意外而造成不必要的损失,使用事务处理的方式进行处理: A账户现有余额1000元,向余额为200的B账户进行转账500元.可能由于某原 ...
- Qt532_QWebView做成DLL供VC/Delphi使用_Bug
Qt5.3.2 vs2010 OpenGL ,VC6.0,Delphi7 1.自己继承 类QWebView,制作成DLL 供 VC6/Delphi7 使用 2.测试下来,DLL供VC6使用: 加载&q ...