Introduction

This tutorial gives and describes the instructions on how to use the software Terraform to create various types of Cloud infrastructures, namely Infrastructure as a service (IaaS), Platform as Service (PaaS) and Software as a Service (SaaS) and using these as a method to help the reader learn more about the use of Terraform and cloud technology in general.

This tutorial-document will provide a step-to-step guidance for anyone with no knowledge about Terraform and some of cloud technology but does have an interest in learning more about it in a small-scale test environment.

Mainly focused on IT students, this tutorial will only provide the needed knowledge most relevant for installing, configuring and using Terraform with use cases focused on real practical solutions and benchmarking these. All this while keeping in mind that it should stay accessible for the reader, and intuitive steps to follow while learning about Terraform.

As described before, this guide will cover the three types of clouds. This will be achieved using hypervisors and service providers. The following three Application Programming Interfaces will be used in this guide:

1. Kernel Based Virtual Machine (KVM) Hypervisor for IaaS

2. Docker Container Platform for PaaS

3. Azure cloud services provider for SaaS

Table of Contents

1. Introduction

2. Context

Chapter 2 will provide context on all the used software. This will describe some information about Terraform and service providers that are going to be used to create a small scale cloud infrastructure. Also, an explanation about cloud technology and orchestration software will be found here.

3. Prerequisites

Will describe some hardware requirements some of which are prerequisite to replicate the instructions, and some are recommendations to make it easier to do certain tasks.

4. Downloading and Installing Terraform

Gives the necessary instructions to install Terraform on your system. In our example, we use Ubuntu 18.04.

5. Creating your first Terraform Project

This chapter is a simple example configuration to print “hello world” to verify the installation. Furthermore, more about the usage of Terraform syntax and the functionality of resource lifecycle management will be discussed here.

6. Installing KVM and Terraform provider for libvirt

7. Create a Virtual Machine using Terraform and KVM

8. Provisioning and Orchestration

Chapters 6 to 8 cover deployment of an example SaaS project “PiCalc” using the Linux KVM hypervisor via the Terraform libvirt provider. This example also demonstrates the use of load balancing using multiple VM’s.

9. Installing Docker and Terraform provider for docker

Chapter 9 will cover the installation of the docker provider plugin, built from source using Go.

10. Deploying Docker examples with Terraform

Chapter 10 demonstrates the deployment of the example project, PiCalc, in a container provided via the Docker provider.

11. Installing Azure CLI and Terraform for Windows

12. Provision a Function app On Microsoft Azure using Terraform

Chapter 11 to 12 will cover installation and usage of the official Terraform Azure provider. This chapter is meant to display the functionality of remote provisioning that Terraform provides where the same PiCalc project will be deployed as a Function Application.

13. Troubleshooting

14. Bibliography

#cloud #azure #microsoft #terraform

How to use Terraform to create a small-scale Cloud Infrastructure
1.50 GEEK