Deploying infrastructure by CI-CD

Mike's Notes

I need a way to automate cloud deployments to handle scaling. I had toyed with the idea of training Pipi to do it. But I read a great article on Medium about using Jenkins with Terraform on GCP.

Pipi could get the CMS engine to generate the configuration files in that case. Jenkins could execute them, with Terraform deploying open-source PIPI applications from GitHub to GCP and handling user-specific requirements. Well, that's a plan (plans do change !).

Hopefully, Pipi will be able to communicate with Jenkins via an API.

The rest of the article gives detailed instructions on how to do this. Jenkins and Terraform will work with and can be hosted on all the major cloud providers.

  • AWS
  • Azure
  • GCP
  • IBM
  • Digital Ocean

They can also be installed locally on 

Resources

References

  • Reference

Repository

  • Home > Ajabbi Research > Library >
  • Home > Handbook > 

Last Updated

17/05/2025

GCP-How to deploy your infrastructure with CI/CD pipeline using Terraform?

By: Sumit L
Medium: 10/02/2023

Jenkins is an open-source automation tool for Continuous Integration (CI) and Continuous Deployment (CD). It is a server-based system that runs in servlet containers like Apache Tomcat. Jenkins is one of the most used DevOps and other cloud-native tools, allowing developers to build, test and deploy software seamlessly.

Terraform is an open-source infrastructure as a code software tool that enables you to create, change, and improve infrastructure safely and predictably.

Git is a free and open-source version control system used to handle that handles small to massive projects efficiently. Git tracks changes in the source code, enabling multiple developers to work together on non-linear development.

In this tutorial, We will deploy our infrastructure (VPC and Subnet) with Terraform but with a CI/CD approach. We will basically integrate Terraform into a generic deployment pipeline. Simply put, We are asking Jenkins to perform terraform-related operations on behalf of humans and bring automation to make your life easier. So, you will write a code in your local machine and push these codes to the source repository GitHub. The Jenkins server (which is running in Google Cloud) will fetch this repo, perform automation and deploy your infrastructure in GCP. Refer to the below diagram, and let’s get straight on to the demo.


... continued

No comments:

Post a Comment