Why Immutable, Declerative Infrastructure is so cool (Terraform, Docker, Packer, Ansible)

Reading through  Why we use Terraform and not Chef, Puppet, Ansible, SaltStack, or CloudFormation, you should see why immutable code is so powerful.

But I would not drop Ansible altogether…

Here are some rules to look into:

  1. Build it immutable – cause you can the scale easily, recover easily and have a consistent source for testing and deploying what you actually tested
  2. Use Terraform to create immutable infrastructure setup
  3. Use Packer to create images that can be deployed anywhere – AWS, GCE, Vagrant, Openstack
  4. Use Ansible to script changes on top of your images if needed. Ansible is not immutable by itself, but allows a cleaner reusable baseline to replace your scattered scripts
  5. In Ansible use modules before you script, and Roles before you duplicate earlier effort. Playbooks are your scripts replacement.

More info:

https://Using Packer and Ansible to Build Immutable Infrastructure

Lessons from using Ansible exclusively for 2 years

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s