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

To get the most out of this book

Before starting, you should understand how you would approach and deploy the infrastructure to support one or more of your existing applications. Ideally, this infrastructure would be hosted in either Microsoft Azure or Amazon Web Services.

While this is optional, the book has been written with the assumption that you have a basic understanding of either Microsoft Azure or Amazon Web Services and some of the core services’ basic concepts, such as networking or virtual machines. While this is not essential, you may have to do some further reading about why we approached tasks in a certain way regarding some of the more hands-on chapters.

We also assume that you would like to follow along with some of the more practical chapters; therefore, having credits or access to a Microsoft Azure or Amazon Web Services account that isn’t used to host production resources is a bonus.

Software/hardware covered in the book

Operating system requirements

Terraform

Windows, macOS, or Linux

Ansible

Windows, macOS, or Linux

The Microsoft Azure CLI and portal

Windows, macOS, or Linux

The Amazon Web Services CLI and portal

Windows, macOS, or Linux

Pulumi

Windows, macOS, or Linux

Visual Studio Code

Windows, macOS, or Linux

There are links to the installation instructions for each tool in the further reading section of the respective chapters.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Finally, feel free to experiment; check out the code accompanying this book and make changes. However, keep an eye on spending and always ensure that you terminate any resources you deploy after you have finished to avoid any unexpected and unwanted costs.