多主机Docker部署的编排器
maestro-ng的Python项目详细描述
#梅斯特朗
[![生成状态](https://travis-ci.org/signalfx/maestro-ng.png)](https://travis-ci.org/signalfx/maestro-ng)[![文档](https://readthedocs.org/projects/maestro-ng/badge/?version=latest)](http://maestro-ng.readthedocs.io)
maestrong是基于docker的多主机环境的协调器。
最初的[大师](http://github.com/toscanini/maestro)被开发出来 作为基于Docker的部署的单一主机编排器。鉴于 在写这篇文章的时候,这是一个伟大的第一步。 以docker容器为单元的部署编排 应用程序分发。
从那时起,Docker在部署和 跨多个主机的环境越来越多 很常见,需要一些编排。
从原大师那里汲取灵感 Docker的链接功能,Maestrong使部署和控制 可能使用Docker容器的复杂多主机环境 使用方便。maestro当然支持 服务并确保在环境保护期间尊重这些人。
##什么是大师?
目前,maestrong是一个命令行实用程序,它允许 自动管理编排的部署并调出集合 在一组 目标主机。
每台主机都需要运行一个docker守护进程。大师会的 联系环境中每台主机的Docker守护进程以了解 环境状况以及基于 请求的命令。
##依赖关系
Maestrong需要Docker0.6.7或更高版本在主机上使用 NAT端口转发中的容器命名功能和错误修复。
您还需要以下python模块,尽管 如果遵循说明,则由设置工具自动安装 下面。
- 最近的[docker py](http://github.com/dotcloud/docker-py)
- pyyaml(您可能需要手动安装,例如apt get install python yaml)
- Jinja2
- python请求
- 隧道
- 六个
如果你打算使用hipchat审计员,你还需要 python simple hipchat。
##安装
maestro发布在python包索引上。你可以安装 大师通过皮普:
` $ pip install --user--upgrademaestro-ng `
如果你想得到出血点,可以直接从git安装 存储库:
` $ pip install --user--upgradegit+git://github.com/signalfx/maestro-ng `
###MacOS用户注意事项
如果安装了python并通过 自制,通常带有以下错误消息:
` error: can't combine user with prefix, exec_prefix/home, or install_(plat)base `
这是因为pip的自制公式将distutils配置为 一个安装前缀,这不能与 –用户标志,如https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python#note-on-pip-install—user中所述。
如果遇到此问题,只需安装不带 –用户标志:
` $ pip install --upgradegit+git://github.com/signalfx/maestro-ng `
###用作Docker容器
首先,使用以下方法建立您的大师形象: ` docker build -tmaestro-ng . `
然后假设您有一个名为/fu/bar/myconf.yml的maestro-ng配置
如果要在不安装python及其pip模块的docker主机上启动: ` docker run --rm-t-i-v/fu/bar/myconf.yml:/maestro.yamlmaestro-ng <start/stop/status/clean> ` 或者,如果myconf.yml位于当前目录中: ` docker run --rm-t-i-v$(pwd)/myconf.yml:/maestro.yamlmaestro-ng <start/stop/status/clean> `
##文档
[maestrong文档](http://maestro-ng.readthedocs.io/)是 在ReadtheDocs上可用。有关最近更改的概述,请参见 [变更日志](docs/changes.md)。
##许可证
maestrong是根据apache许可2.0版授权的。参见许可证 完整的许可证文本。