Skip to content

surjsingh/jenkins-terraform-gke-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instructions:

  1. Build Flask docker API.

    This step can be skipped if you want as the image is already built and available at surjeet112/docker-flask:latest

  2. Provision the GKE and GCP infrastrucutre via terraform and deploy the flask API to GKE kubernetes cluster accessible via cloud load balancer.

Automated Jenkins CI/CD Pipeline

Make sure to follow some of the intiial guidelines pre-reqs section 1,2,3 along with enabling API endpoints and service account creation for infrastructure provisioning to setup your GCP account and configure the helm tiller on your GKE cluster before deploying any apps via helm.

For CI/CD and infra provisionig jenkins pipelines, please follow this guide. Jenkins project will look for Jenkinsfile, which is used to automate the process.

  • Initially, the pipeline will get the GCP service account credentials from Jenkins credential store and build the app and push to GCR registry, it then validates the terraform scripts and create a plan to provision the infrastructure.

  • Once approved, pipeline will provision the GCP and GKE infrastrcuture and deploy the application HELM chart

  • Once the app is acessible over the ExternalIP/Loadbalancer, you can approve to generate the infra destruction plan.

  • If you are fine with the destrucution plan, approve to terminate all the provisioned infrastructure

About

Ci/CD and Infra provisioning to GKE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published