Have you ever found tedious to manage cloud services on a scattered ecosystem of GUI and CLI tools pushed by every vendor?
Did you find awful to think on how to do the right things in the right order to change infrastructure to your desired state?
Have you ever destroyed the wrong production VM or removed the wrong DNS record?
Let's take a look to Terraform, an open-source tool for building, changing, and combining infrastructure safely and efficiently, brought to us by Hashicorp (have you ever heard about Vagrant?).
Example code: https://gist.github.com/gionn/787a3fc379eeac0ce01f
Infrastructure as Code
Lead developer @ClouDesire
What is Terraform?
Like vagrant, but for production
● Build, change, destroy resources:
○ IaaS: AWS, DigitalOcean, GCE, OpenStack
○ PaaS: Heroku, CloudFoundry
○ SaaS: Atlas, DNSimple, CloudFlare
● Current state is versioned
● Generates an execution plan to transition
from current state to the desired state
● Multi-tier applications (easy scale up/down)
● Self-service clusters (production-like)
● Demos (vagrant on clouds)
● Disposable environments (staging/QA)
● Multi-cloud environments
How we use it in ClouDesire
● To manage infrastructure and DNS for on-
demand staging and productions:
○ Before: everything by hand, using GUI
○ Now: everything with terraform, state versioned on
● Custom script to generate ssh_config:
Used by fabric to knows on which nodes chef-
solo should be launched
● Modules can be created to encapsulate
resources in a reusable way
● State push/pull to remote: S3, HTTP, Atlas
● Atlas integration: SaaS control room for
teams, managed by HashiCorp