Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when to use fabric or ansible?

OVERVIEW

I'd like to have reliable django deployments and I think I'm not following the best practices here. Till now I've been using fabric as a configuration management tool in order to deploy my django sites but I'm not sure that's the best way to go.

In the high performance django book there is a warning which says:

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

So, I've decided I want to learn ansible.

QUESTIONS

  • Does it make sense using both fabric and ansible tools somehow?
  • Is it possible to use ansible from my windows development environment to deploy to production centos(6/7) servers?
  • There is this nice site https://galaxy.ansible.com/ which contains a lot of playbooks, any good recommendation to deploy django on centos servers?
like image 541
BPL Avatar asked Sep 07 '16 12:09

BPL


People also ask

Does Ansible use fabric?

Fabric and Ansible both enable orchestration in a similar fashion, so using both does not make sense as Fabric would be a subset of Ansible. The answer to the second question is yes.

What is Ansible used for?

Ansible can be used to provision the underlying infrastructure of your environment, virtualized hosts and hypervisors, network devices, and bare metal servers. It can also install services, add compute hosts, and provision resources, services, and applications inside of your cloud.

Is Ansible used in DevOps?

Ansible is mainly used as a DevOps tool and can perform a lot of tasks that otherwise are time-consuming, complex, repetitive, and can make a lot of errors or issues.


1 Answers

Does it make sense using both fabric and ansible tools somehow?

Yes. All your logic should live in Ansible and you can use Fabric as a lightweight wrapper around it.

fab deploy

is easier to remember than, e.g.

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?

Sounds like you can't. Alternatively, If you use Fabric, it could copy your ansible playbooks up to a server (or pull directly from git) and run ansible from there.

like image 148
Pete Avatar answered Oct 09 '22 01:10

Pete