书籍详情
用Mesos框架构建分布式应用
作者:[美] David,Greenberg(大卫· 格林伯格) 著;崔婧雯 译
出版社:电子工业出版社
出版时间:2017-01-01
ISBN:9787121306778
定价:¥55.00
购买这本书可以去
内容简介
Apache Mesos是先进的集群管理器,既可以作为灵活的部署系统,也可以作为强大的执行平台。它不仅为分布式应用程序提供了良好的资源隔离,而且突破性地实现了资源的灵活共享,极大地提高了资源的整体利用率。本书深入浅出,首先介绍了Mesos的基础知识,随后重点学习Mesos的两种开源框架(Marathon和Chronos)。以实际程序样例为线索,一步步讲解如何配置,如何交互,以及如何构建深度集成。接着详细介绍如何为Mesos构建自定义的框架,如何构建核心Mesos API。最后深入研究Mesos的一些高级特性,比如和Docker的集成,其内部架构,以及一些最先进的API,包括数据库的持久化磁盘管理,以及框架预约系统。
作者简介
崔婧雯,现就职于IBM,高级软件工程师,负责IBM业务流程管理软件的系统测试工作。曾就职于VMware从事桌面虚拟化产品的质量保证工作。对分布式集群管理,虚拟化,业务流程管理都有浓厚的兴趣。 David Greenberg是Two Sigma的首席架构师,他负责公司交易策略所用的分布式计算环境。David有强烈的学习欲望,自学了俄语和中文,并且他很喜欢练习厨艺。他也是一个调度独占作业的开源Mesos框架――Cook的设计师。
目录
序 ................................................................................................ ix
第1 章 Mesos 介绍 ......................................................................1
如何使用Mesos .....................................................................................................2
Mesos 作为部署系统 ..............................................................................................3
Mesos 作为执行平台 ..............................................................................................4
本书是如何组织的 .................................................................................................5
本章小结 ................................................................................................................5
第2 章 开启Mesos 之旅 ...............................................................7
框架 .......................................................................................................................7
Master 和Slave ......................................................................................................8
Master .............................................................................................................8
Slave ..............................................................................................................10
资源 .....................................................................................................................13
配置自定义资源 ............................................................................................15
配置slave 属性 .............................................................................................16
角色 .....................................................................................................................16
静态和动态slave 预留 ..................................................................................17
任务和执行器 ......................................................................................................20
CommandExecutor ........................................................................................21
理解mesos.proto ..................................................................................................21
不通过Mesos 管理 ..............................................................................................24
本章小结 ..............................................................................................................25
第3 章 将已有应用程序迁移到Mesos 上 .....................................27
将Web 应用程序迁移到Mesos 上 .......................................................................27
搭建Marathon ......................................................................................................28
使用Marathon ......................................................................................................30
扩展应用程序 ................................................................................................35
使用位置约束 ................................................................................................35
运行容器化的应用程序 .................................................................................37
挂载主机卷 ...................................................................................................38
健康检查 .......................................................................................................40
应用版本化和滚动升级 .................................................................................42
事件总线 .......................................................................................................43
搭建Marathon 上的HAProxy .......................................................................43
在Marathon 上运行Mesos 框架 ..........................................................................47
Chronos 是什么 .............................................................................................47
在Marathon 上运行Chronos .........................................................................48
Chronos 运维注意事项 ..................................................................................49
Marathon 上的Chronos :小结 ......................................................................50
Marathon+Chronos 的备选方案 ...........................................................................50
Singularity .....................................................................................................50
Aurora ...........................................................................................................51
本章小结 ..............................................................................................................51
第4 章 为Mesos 创建新的框架 ...................................................53
调度器 ..................................................................................................................53
服务器池调度器 ............................................................................................54
工作队列调度器 ............................................................................................54
作业处理器调度器 ........................................................................................55
没什么用的远程BASH ........................................................................................56
实现基本的作业处理器 ........................................................................................62
将任务匹配到Offer 上 .........................................................................................65
搭建Offers 和Jobs 之间语义差别的桥梁 .....................................................68
增加高可用性 ......................................................................................................70
添加核对 ..............................................................................................................76
高级调度器技术 ...................................................................................................77
分布式通信 ...................................................................................................78
强制故障转移 ................................................................................................79
合并Offer......................................................................................................79
加固调度器 ...................................................................................................80
检查点 ...........................................................................................................82
CommandInfo ................................................................................................83
启动进程 .......................................................................................................83
配置进程环境 ................................................................................................83
本章小结 ..............................................................................................................84
第5 章 构建Mesos 执行器 .........................................................85
执行器 ..................................................................................................................85
构建工作队列worker ....................................................................................86
运行pickled 任务 ..........................................................................................86
共享资源 .......................................................................................................86
更好地看护 ...................................................................................................87
增强的日志 ...................................................................................................88
重写CommandExecutor .......................................................................................88
引导执行器的安装 ...............................................................................................97
添加心跳 ..............................................................................................................99
高级执行器特性 ................................................................................................. 102
进度报告 ..................................................................................................... 103
添加远程日志 .............................................................................................. 104
多个任务 ..................................................................................................... 104
本章小结 ............................................................................................................ 106
第6 章 Mesos 的进阶主题 ........................................................107
Libprocess 和Actor 模型 ................................................................................... 107
一致性模型 ........................................................................................................ 108
如何处理slave 的故障 ................................................................................ 109
如何处理master 的故障(或者,registry) ................................................. 110
故障转移期间的核对 ................................................................................... 111
容器机 ................................................................................................................ 113
使用Docker................................................................................................. 113
新的Offer API ................................................................................................... 114
框架动态预留API ....................................................................................... 115
数据库使用的持久化卷 ............................................................................... 118
本章小结 ............................................................................................................ 119
第7 章 Mesos 的未来 ...............................................................121
多租户工作负载 ................................................................................................. 121
超配 ................................................................................................................... 123
数据库和Turnkey 基础架构 .............................................................................. 125
基于容器的IP .................................................................................................... 125
本章小结 ............................................................................................................ 126
第1 章 Mesos 介绍 ......................................................................1
如何使用Mesos .....................................................................................................2
Mesos 作为部署系统 ..............................................................................................3
Mesos 作为执行平台 ..............................................................................................4
本书是如何组织的 .................................................................................................5
本章小结 ................................................................................................................5
第2 章 开启Mesos 之旅 ...............................................................7
框架 .......................................................................................................................7
Master 和Slave ......................................................................................................8
Master .............................................................................................................8
Slave ..............................................................................................................10
资源 .....................................................................................................................13
配置自定义资源 ............................................................................................15
配置slave 属性 .............................................................................................16
角色 .....................................................................................................................16
静态和动态slave 预留 ..................................................................................17
任务和执行器 ......................................................................................................20
CommandExecutor ........................................................................................21
理解mesos.proto ..................................................................................................21
不通过Mesos 管理 ..............................................................................................24
本章小结 ..............................................................................................................25
第3 章 将已有应用程序迁移到Mesos 上 .....................................27
将Web 应用程序迁移到Mesos 上 .......................................................................27
搭建Marathon ......................................................................................................28
使用Marathon ......................................................................................................30
扩展应用程序 ................................................................................................35
使用位置约束 ................................................................................................35
运行容器化的应用程序 .................................................................................37
挂载主机卷 ...................................................................................................38
健康检查 .......................................................................................................40
应用版本化和滚动升级 .................................................................................42
事件总线 .......................................................................................................43
搭建Marathon 上的HAProxy .......................................................................43
在Marathon 上运行Mesos 框架 ..........................................................................47
Chronos 是什么 .............................................................................................47
在Marathon 上运行Chronos .........................................................................48
Chronos 运维注意事项 ..................................................................................49
Marathon 上的Chronos :小结 ......................................................................50
Marathon+Chronos 的备选方案 ...........................................................................50
Singularity .....................................................................................................50
Aurora ...........................................................................................................51
本章小结 ..............................................................................................................51
第4 章 为Mesos 创建新的框架 ...................................................53
调度器 ..................................................................................................................53
服务器池调度器 ............................................................................................54
工作队列调度器 ............................................................................................54
作业处理器调度器 ........................................................................................55
没什么用的远程BASH ........................................................................................56
实现基本的作业处理器 ........................................................................................62
将任务匹配到Offer 上 .........................................................................................65
搭建Offers 和Jobs 之间语义差别的桥梁 .....................................................68
增加高可用性 ......................................................................................................70
添加核对 ..............................................................................................................76
高级调度器技术 ...................................................................................................77
分布式通信 ...................................................................................................78
强制故障转移 ................................................................................................79
合并Offer......................................................................................................79
加固调度器 ...................................................................................................80
检查点 ...........................................................................................................82
CommandInfo ................................................................................................83
启动进程 .......................................................................................................83
配置进程环境 ................................................................................................83
本章小结 ..............................................................................................................84
第5 章 构建Mesos 执行器 .........................................................85
执行器 ..................................................................................................................85
构建工作队列worker ....................................................................................86
运行pickled 任务 ..........................................................................................86
共享资源 .......................................................................................................86
更好地看护 ...................................................................................................87
增强的日志 ...................................................................................................88
重写CommandExecutor .......................................................................................88
引导执行器的安装 ...............................................................................................97
添加心跳 ..............................................................................................................99
高级执行器特性 ................................................................................................. 102
进度报告 ..................................................................................................... 103
添加远程日志 .............................................................................................. 104
多个任务 ..................................................................................................... 104
本章小结 ............................................................................................................ 106
第6 章 Mesos 的进阶主题 ........................................................107
Libprocess 和Actor 模型 ................................................................................... 107
一致性模型 ........................................................................................................ 108
如何处理slave 的故障 ................................................................................ 109
如何处理master 的故障(或者,registry) ................................................. 110
故障转移期间的核对 ................................................................................... 111
容器机 ................................................................................................................ 113
使用Docker................................................................................................. 113
新的Offer API ................................................................................................... 114
框架动态预留API ....................................................................................... 115
数据库使用的持久化卷 ............................................................................... 118
本章小结 ............................................................................................................ 119
第7 章 Mesos 的未来 ...............................................................121
多租户工作负载 ................................................................................................. 121
超配 ................................................................................................................... 123
数据库和Turnkey 基础架构 .............................................................................. 125
基于容器的IP .................................................................................................... 125
本章小结 ............................................................................................................ 126
猜您喜欢