Immutable infrastructure

Terraform works best if you adapt Immutable Infrastructure principles. It can also work pretty well if you use containers. Read Rebuilding our infrastructure (https://segment.com/blog/rebuilding-our-infrastructure/) from Segment about how they used Terraform with AWS Elastic Container Service and Docker for the new version of their infrastructure. It has good examples in the Continuous Integration part as well.

The ECS plus Terraform approach seems to gain higher adoption in general; for example, check out a presentation about more or less the same idea by Yevgeniy Brikman, named Infrastructure as Code: Running microservices on AWS with Docker, Terraform, and ECS (http://www.ybrikman.com/writing/2016/03/31/infrastructure-as-code-microservices-aws-docker-terraform-ecs/).

Finally, there is a really good blog post by Simone Gotti about rolling upgrades with Terraform. Simone also published all the code to perform such upgrades, so you can easily use it. He published on Immutable Infrastructure with Terraform and rolling upgrades of stateful services on the following links:

Be careful with this approach though -- all the containers, stories are still pretty fresh and have some not-yet-solved problems, especially in the operations area. Experiment wisely.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.196.211