您的基于debian的数据中心
debops的Python项目详细描述
您的基于debian的数据中心在一个框中
Travis CIGitLab CICII Best PracticesRSS commits
debops项目提供了一组通用的 Ansible可以使用的角色 管理Debian或 Ubuntu主机。此外,默认设置 可将提供的角色应用于 控制方式,使用可转移的库存组。
这些角色的编写考虑到了高度的定制,可以是 使用Ansible库存完成。这样角色和剧本代码就可以 在多个环境之间共享,具有不同的配置 每一个。
服务可以在单个主机上管理,也可以在多个主机之间分散 东道主。debops支持不同的sql和nosql数据库, 有用的Web服务器、编程语言和专用应用程序 在数据中心环境或集群中。该项目还可以 用于使用kvm/libvirt、docker或 管理虚拟机和/或容器的lxc技术。
您可以在project’s documentation page上找到有关debops特性的更多信息。
快速启动
启动Docker容器,该容器充当 Debops支持,基于Debian Buster:
docker run -it --rm debops/debops cd src/controller ; debops common --diff
或者,创建一个vagrant vm,它充当ansible controller主机:
git clone https://github.com/debops/debops cd debops && vagrant up && vagrant ssh cd src/controller ; debops common --diff
您可以使用src/controller子目录中的配置来尝试 针对container/vm输出debops,或者创建自己的debops项目 使用debops-init命令的目录。
可以找到更多快速入门技巧in the DebOps quick start guide。
安装
您可以安装DebOps Python package,其中包括debops 角色和剧本,以及可以用来 设置单独的项目目录并以方便的方式运行ansible。 安装带有ansible和其他必需组件的python包 依赖项,运行命令:
pip install --user debops[ansible]
或者,debops角色在Ansible Galaxy上可用,可以是 使用安装 Mazer内容 经理,使用命令:
mazer install debops.debops
阅读installation instructions 有关所需软件和 依赖关系。
开始
ansible使用ssh连接和管理主机。Debops执行 通过禁用密码身份验证实现ssh安全,因此使用ssh 强烈建议使用连接到主机的密钥。这可能是 使用库存变量更改。
在初始部署期间,您可能会发现 Debops阻止你访问主机。正因为如此 建议对主机进行带外控制台访问,可以 用于登录并排除连接故障。
在debops“项目目录”中创建一个新环境,添加一些 托管在ansible inventory中并运行默认的debops playbook 对它们进行配置:
# Create a new environment debops-init ~/src/projects/my-environment cd ~/src/projects/my-environment # Modify the 'ansible/inventory/hosts' file to suit your needs, for example # uncomment the local host to configure it with DebOps # Run the full playbook against all hosts in the inventory debops # Run the common playbook against specific host in the inventory debops common -l <hostname>
你应该读Getting Started with DebOps 更深入地解释如何使用项目的指南 通过ansible管理多个主机。
开发
创建a fork of this repository并将其克隆到 你的工作站。创建开发debops环境和符号链接 其中的分叉存储库。现在你可以在 分叉存储库,并在开发中看到它们的结果 环境。
git clone git@github.com:<username>/debops ~/src/github.com/<username>/debops cd ~/src/github.com/<username>/debops git remote add upstream https://github.com/debops/debops.git debops-init ~/src/projects/debops-devel cd ~/src/projects/debops-devel ln -s ~/src/github.com/<username>/debops debops
您可以从上游存储库中提取对项目的最新更改:
cd ~/src/github.com/<username>/debops git checkout master git fetch upstream git rebase upstream/master
阅读development guide 文件以获取有关debops开发过程的更多详细信息。
贡献
debops开发是通过一个分布式开发模型完成的。新的 特性和更改在fork of the official repository中准备并发布 通过github pull请求发送到原始存储库。文件审查人 debops开发团队,如果被接受,将合并到 储存库。
建议使用gpg签名的git提交来确保真实性。
阅读contributing guide 文件以获取更多详细信息关于如何为Debops做贡献。
许可
debops项目是根据GNU General Public License 3.0授权的。你可以找到 中的许可证 LICENSE文件。