GCP DevOps - HandsOn | Cloud Build , Cloud Build Trigger , Container Registry |

In this lab, you built a continuous integration pipeline using the Google Cloud tools Cloud Source Repositories, Cloud Build, build triggers, and Container Registry.

Cloud Source Repositories , Cloud Build, Cloud Build Trigger , Container Registry ,

DevOpsProjectWithGCP

In this project, you will build a continuous integration pipeline using Cloud Source Repositories, Cloud Build, build triggers, and Container Registry.

Prerequisites

  1. Google Cloud tools Cloud Source Repositories.

  2. Cloud Build.

  3. Build triggers.

  4. Container Registry.

And, a bit of familiarity with GCP.

Objectives - In this lab, you will learn how to perform the following tasks:

  1. Create a Git repository

  2. Create a simple Python application

  3. Test Your web application in Cloud Shell

  4. Define a Docker build

  5. Manage Docker images with Cloud Build and Container Registry

  6. Automate builds with triggers

  7. Test your build changes

  8. You have done a great job! Pat ya back!

Task 1 : Create a Repository

After creating this repo -> got Cloud Console -> Activate Cloud shell

Task 2: Create a Simple python application

open the editor on gcp -> click on new window -> select the folder or file of you repo

main.py

Save this file cntrl+S

Create a new folder in the gcp-course/DevOps-repo folder "templetes"

Afte that -

Create a new file "layout.html" inside the templetes folder

paste the htm code here -

Create a index.html file in the tempplete folder

Create a requriements.txt in the templete folder

goto on the Cloud shell

Task 3. Define a Docker build

Create a dockerfile in templete folder and push it on th repo

Dockerfile-

Task 4. Manage Docker images with Cloud Build and Container Registry

For checking the project id Commands-

So now , For building the docker file -> goto the templete folder , where your docker file is present

IMAGE CREATE

Container Ragistry - images

Create a Trigger -

Cloud Build -

for building the code crreate an virtusl machine - Compute Engine & allow the HTTP traffic

pushing all the files on the repo -

Task 5. Automate builds with triggers

Create a Trigger -

Cloud Build -> Trigger -> Create Trigger -> Follow Below images

Last updated