Hey,
I don't know about you, but I'm still just buzzing from that last demonstration,
when we get to see the power of what we can do through automation by
using a fantastic capstone exercise like that.
We've been looking at Terraform from HashiCorp. We've seen that we can
use it to deploy virtual machines and containers, and to start off by
installing it, we can go through and add a repository for our operating
system. Once it's installed,
then we can go ahead and add in bash completion so that we
can use the subcommands without having necessarily to be able
to type the whole subcommand in.
We can create our project directory,
we created the Terraform subdirectory, and inside of that we
defined our main.tf, or Terraform file.
We set up our provider plugins, so we were using Docker, so we got the
definition from that from our Terraform provider repositories.
We can then use terraform init to download our plugins. We then define
our resources, and we can use terraform apply. Terraform apply then
creates those resources, and those resources were then the images and
containers that we were using with Docker.
We also saw, in that last exercise, how all of the steps can be put together
into a playbook or some other automation setting so that we're able to get
ourselves up and running from a completely clean machine to a fully
operational Terraform machine with a project already defined on it. And that
kind of brought everything together.
It brought our Git repository,
our Ansible Playbooks, and Terraform all together, and we
were making use of those three components,
really giving you the idea of where automation is going to fit.
Now we do need to understand a little bit more
about Docker and Docker containers, so we're going to take a look now at implementing containers using Docker.