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
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With