top of page

DevOps - CI/CD Set up on GCP

  • Writer: Anand Nerurkar
    Anand Nerurkar
  • Jul 2, 2022
  • 1 min read

How To Set Up CI/CD Pipeline on GCP.


Assumption:

GCP Free tier account

ssh key is registered with google cloud.

1.Please login to your GCP account, goto IAM & permission, locate cloudbuild.service account from the list, click edit option, assign Kubernetes Engine Developer role to service account cloudbuild.gserviceaccount.com.



2. Goto Kubernete Engine, click on cluster->create standard cluster with default node pool as 2.

3. Goto cloud source repository ->add new repository->create new repository application-demo.




Open cloud shell, copy git clone command from above screenshot and create empty repository.


Goto your empty repository – cd application-demo

Git checkout -b develop


4. Upload source code with required files ( this source code is available at )


mv cloudbuild.yaml Dockerfile kubernetes.yaml.tpl kubernetes_first_app.py requirements.txt application-demo

git add Dockerfile cloudbuild.yaml kubernetes.yaml.tpl kubernetes_first_app.py requirements.txt

5. Add your email ids

git config --global user.email "you@example.com"

git config --global user.name "Your Name"


6. git commit -m "adding source code files"

git push origin develop



7. create source code repository for env (application-demo-env) as above and follow the same step as above.


Please see below screenshot.



8. Create build trigger on both the repository for your develop branch

goto cloud build-triggers->manage repository->select your repo each like application-demo & application-demo-env and add trigger.









9. Please make changes to code as below,

commit changes ,push it to branch -develop.

This should trigger build and deploy the application to gke cluster.



 
 
 

Recent Posts

See All
RFP PRE/POST-PROPOSAL SUBMISSION FLOW

🏆 1. The 5 Pillars to Win a Large Strategic Deal 1. Understand the Client Better Than They Do 👉 Don’t just read RFP — decode it What is their real problem ? What is driving this deal? (compliance, c

 
 
 
DIGITAL LENDING RFP Solution

🎯 RFP Proposal SOLUTION PRESENTATION – DIGITAL LENDING (WITH COLOR-CODED ARCHITECTURE) 1️⃣ Opening “Thank you for the opportunity. I’ll walk you through our approach to building a next-generation dig

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
  • Facebook
  • Twitter
  • LinkedIn

©2024 by AeeroTech. Proudly created with Wix.com

bottom of page