Gene Gotimer

Camp Counselor

Create a Cloud Environment with Terraform and Ansible

Event Logo

Monday, May 23, 2022 - 1:00 PM UTC, for 4 hours.

Workshop (pre-conference)

Room: Campsite 3

terraform
ansible

Hashicorp Terraform allows you to define your infrastructure as code. You write code to define systems, networks, security groups, firewalls, and more, making standing up an environment repeatable and reusable. Red Hat Ansible lets you remotely interact with those systems you stood up, configuring them, installing and upgrading software, and doing all sorts of system administration and maintenance tasks all using code. No more logging in to dozens of servers to update a package on each- Ansible can handle it from a central location without the risk of typos or missed steps. Join Gene Gotimer as we start building infrastructure using code. We’ll instantiate a cloud environment, set up the network and security, and then build and configure an application on top of it. Along the way, we’ll use tools to ensure we are following recommended practices and creating a maintainable ecosystem with easy-to-follow code. You won’t be a master by the end of the half-day, but you will understand the basics and start to be comfortable with infrastructure-as-code. This is a hands-on workshop. You’ll need a laptop with an IDE (e.g., Visual Studio Code or IntelliJ IDEA) and an SSH client (e.g., PuTTY or OpenSSH, which is included in Git for Windows).

Agenda

Rough outline * Introduction * Introduction to Terraform * Getting connected to AWS * Creating an instance * Destroying an instance * Creating a cloud environment * Checking for recommended practices * Deploying an application * Upgrading our environment * Continuous improvement * Wrap-up and Q&A

Prerequisites

See the complete prerequisites and instructions at https://github.com/OtherDevOpsGene/intro-to-terraform-and-ansible#prerequisites. You’ll need to have Terraform installed, an SSH client, an AWS account, the AWS CLI installed and configured, and an AWS EC2 key pair. You should be familiar with using SSH and comfortable running commands from the command line. No prior experience with infrastructure-as-code is required or expected.

Take Aways

  • Infrastructure-as-code makes it easy to stand up an environment in a repeatable, reliable way.
  • Systems are cattle, not pets. Don’t get so attached that you worry about blowing it away and replacing it.
  • Change is a constant. Plan for change.
  • Security needs to be built in from the beginning- not shoe-horned in at the end.
favorited by:
Rafferty McDonald Michael Perry Ross Larson Josh Gretz Gene Gotimer