Full Stack Python

# Configuration Management

Configuration management involves modifying servers from an existing state to a desired state and automating how an application is deployed.

## Configuration management tools

Numerous tools exist to modify server state in a controlled way, including Puppet, Chef, SaltStack, and Ansible. Puppet and Chef are written in Ruby, while SaltStack and Ansible are written in Python.

## Ad hoc tasks

Configuration management tools such as Chef, Puppet, Ansible, and SaltStack are not useful for performing ad hoc tasks that require interactive responses. Fabric and Invoke are used for interactive operations, such as querying the database from the Django manage.py shell.

## Configuration management tool comparisons

- Moving away from Puppet: SaltStack or Ansible? is an openly biased but detailed post on why to choose SaltStack over Ansible in certain situations.

- Ansible vs. Shell Scripts provides some perspective on why a configuration management tool is better than old venerable shell scripts.

- Ansible and Salt: A Detailed Comparison

## Ansible

Ansible is an open source configuration management and application deployment tool built in Python.

### Ansible Resources

- Official Ansible documentation

- An Ansible tutorial is a fantastically detailed introduction to using Ansible to set up servers.

- Ansible Weekly Newsletter

- Python for Configuration Management with Ansible slides from PyCon UK 2013

- First Steps with Ansible

- Red Badger on Ansible

- Getting Started with Ansible

- Ansible Text Message Notifications with Twilio SMS is my blog post with a detailed example for using the Twilio module in core Ansible 1.6+.

- Ansible and Linode

- Multi-factor SSH authentication with Ansible and Duo Security

- Introducing Ansible into Legacy Projects

- Automating your development environment with Ansible

- Post-install steps with Ansible

- First Five (and a half) Minutes on a Server with Ansible

- (Detailed) Introduction to Ansible

- 6 practices for super smooth Ansible experience

- Shippable + Ansible + Docker + Loggly for awesome deployments is a well written detailed post about using Docker and Ansible together with a few other pieces.

- Create a Couchbase Cluster with Ansible

- Idempotence, convergence, and other silly fancy words we often use

- How to Write an Ansible Role for Ansible Galaxy

- Testing with Jenkins, Docker and Ansible

## Application dependencies learning checklist

Learn about configuration management in the context of deployment automation and infrastructure-as-code.

Pick a configuration management tool and stick with it. My recommendation is Ansible because it is by far the easiest tool to learn and be productive with.

Read your configuration management tool's documentation and, when necessary, the source code.

Automate the configuration management and deployment for your project. Note that this is by far the most time consuming step in this checklist but will pay dividends every time you deploy your project.

Hook the automated deployment tool into your existing deployment process.

### What's next after automating your app configuration?

How do I regularly integrate my project's codebase?

I want to learn more about the users of my app with web analytics.

How do I integrate external APIs into my application?

What should I do to secure my web application?

#### Interested in major updates to this site or an alert when a complete Full Stack Python book with detailed example code is released? Sign up here and you'll an occasional email only when there's big news to report.