Chapter 4. Automating Complete Infrastructures with Terraform

In this chapter, we will cover the following recipes:

  • Provisioning a complete CoreOS infrastructure on Digital Ocean with Terraform
  • Provisioning a three-tier infrastructure on Google Compute Engine
  • Provisioning a GitLab CE + CI runners on OpenStack
  • Managing Heroku Apps and Add-ons using Terraform
  • Creating a scalable Docker Swarm cluster on bare metal with Packet

Introduction

In this chapter, we'll describe complete infrastructures using Terraform, how it looks when everything is tied together, with a real project in mind. Most examples from previous chapters on Terraform were on Amazon Web Services, so to try to be more diverse and complete, this chapter is dedicated to other infrastructure services, namely Digital Ocean, Google Cloud, Heroku, and Packet. On Digital Ocean, we'll build a fully working and monitored CoreOS cluster with DNS dynamically updated. On Google Cloud, we'll build a three-tier infrastructure with two HTTP nodes behind a load balancer and an isolated MySQL managed database. Using OpenStack, we'll deploy a GitLab CE and two GitLab CI runners, using different storage solutions. We'll see how we can integrate and automate a Heroku environment. We'll end this chapter with a powerful and scalable Docker Swarm cluster on bare metal using Packet, capable of scaling hundreds of containers.

Note

The Terraform version in use for this book is 0.7.4.

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

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