Background Image
Table of Contents Table of Contents
Previous Page  195 / 478 Next Page
Information
Show Menu
Previous Page 195 / 478 Next Page
Page Background

Automated Deployments

Fabric

Fabric lets you run commands on servers from inside Python scripts. This is a great

tool for automating server admin tasks.

Idempotency

If your deployment script is deploying to existing servers, you need to design them

so that they work against a fresh installation

and

against a server that’s already

configured.

Keep config files under source control

Make sure your only copy of a config file isn’t on the server! They are critical to

your application, and should be under version control like anything else.

Automating provisioning

Ultimately,

everything

should be automated, and that includes spinning up brand

new servers and ensuring they have all the right software installed. This will involve

interacting with the API of your hosting provider.

Configuration management tools

Fabric is very flexible, but its logic is still based on scripting. More advanced tools

take a more “declarative” approach, and can make your life even easier. Ansible and

Vagrant are two worth checking out (see

Appendix C

), but there are many more

(Chef, Puppet, Salt, Juju…).

Further Reading

|

167