什么时候使用 fabric 或 ansible?
when to use fabric or ansible?
概览
我想要可靠的 Django 部署,但我认为我没有遵循此处的最佳实践。到目前为止,我一直在使用结构作为配置管理工具来部署我的 django 站点,但我不确定这是最好的方法。
在 high performance django 书中有一条警告说:
Fabric is not a configuration management tool. Trying to use it as one
will ultimately cause you heartache and pain. Fabric is an excellent
choice for executing scripts in one or more remote systems, but that's
only a small piece of the puzzle. Don't reinvent the wheel by building
your own configuration management system on top of fabric
所以,我决定要学习ansible。
问题
- 以某种方式同时使用 fabric 和 ansible 工具有意义吗?
- 是否可以使用我的 windows 开发环境中的 ansible 部署到生产 centos(6/7) 服务器?
- 有一个不错的网站https://galaxy.ansible.com/,其中包含很多剧本,有什么好的建议可以在 centos 服务器上部署 django 吗?
Does it make sense using both fabric and ansible tools somehow?
是的。你所有的逻辑都应该存在于 Ansible 中,你可以使用 Fabric 作为它的轻量级包装器。
fab deploy
比
更容易记住
ansible-playbook -v --inventory=production --tags=app site.yml
Is it possible to use ansible from my windows development environment to deploy to production centos(6/7) servers?
听起来你做不到。或者,如果您使用 Fabric,它可以将您的 ansible playbook 复制到服务器(或直接从 git 拉取)并从那里 运行 ansible。
概览
我想要可靠的 Django 部署,但我认为我没有遵循此处的最佳实践。到目前为止,我一直在使用结构作为配置管理工具来部署我的 django 站点,但我不确定这是最好的方法。
在 high performance django 书中有一条警告说:
Fabric is not a configuration management tool. Trying to use it as one will ultimately cause you heartache and pain. Fabric is an excellent choice for executing scripts in one or more remote systems, but that's only a small piece of the puzzle. Don't reinvent the wheel by building your own configuration management system on top of fabric
所以,我决定要学习ansible。
问题
- 以某种方式同时使用 fabric 和 ansible 工具有意义吗?
- 是否可以使用我的 windows 开发环境中的 ansible 部署到生产 centos(6/7) 服务器?
- 有一个不错的网站https://galaxy.ansible.com/,其中包含很多剧本,有什么好的建议可以在 centos 服务器上部署 django 吗?
Does it make sense using both fabric and ansible tools somehow?
是的。你所有的逻辑都应该存在于 Ansible 中,你可以使用 Fabric 作为它的轻量级包装器。
fab deploy
比
更容易记住ansible-playbook -v --inventory=production --tags=app site.yml
Is it possible to use ansible from my windows development environment to deploy to production centos(6/7) servers?
听起来你做不到。或者,如果您使用 Fabric,它可以将您的 ansible playbook 复制到服务器(或直接从 git 拉取)并从那里 运行 ansible。