Book Image

Infrastructure as Code for Beginners

By : Russ McKendrick
4 (1)
Book Image

Infrastructure as Code for Beginners

4 (1)
By: Russ McKendrick

Overview of this book

The Infrastructure as Code (IaC) approach ensures consistent and repeatable deployment of cloud-based IaaS/PaaS services, saving you time while delivering impeccable results. Infrastructure as Code for Beginners is a practical implementation guide that helps you gain a clear understanding of the foundations of Infrastructure as Code and make informed decisions when implementing it. With this book, you’ll uncover essential IaC concepts, including planning, selecting, and implementing the right tools for your project. With step-by-step explanations and real-world examples, you'll gain a solid understanding of the benefits of IaC and the scope of application in your projects. You'll learn about the pros, cons, and best practices of different IaC tools such as Terraform and Ansible, and their use at different stages of the deployment process along with GitHub Actions. Using these tools, you'll be able to design, deploy, and secure your infrastructure on two major cloud platforms, Microsoft Azure and Amazon Web Services. In addition, you'll explore other IaC tools such as Pulumi, AWS CloudFormation, and Azure Bicep. By the end of this book, you’ll be well equipped to approach your IaC projects confidently.
Table of Contents (15 chapters)
1
Part 1: The Foundations – An Introduction to Infrastructure as Code
5
Part 2: Getting Hands-On with the Deployment
9
Part 3: CI/CD and Best Practices

Understanding cloud-agnostic tools

In Chapter 4, Deploying to Microsoft Azure, and Chapter 5, Deploying to Amazon Web Services, we use both Terraform and Ansible to target these clouds – so we know they work with both cloud providers, but how much of the code did we reuse?

The honest answer is very little.

We used different providers/collections for each of the cloud providers. As a result, there were many allowances we needed to make. While conceptually, the cloud providers offer like-for-like services at a high level; they have evolved in very different ways to achieve the same task.

For example, launching something as simple as a virtual machine requires two approaches: deploying services such as networking work requires different considerations and configurations as they simply just work differently.

So why do we call the two tools we have been looking at cloud agnostic? Surely that should mean they just work.

In an ideal world, yes, that should be the case...