CI/CD Crash Course using Google Cloud Build

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.พ. 2020
  • This workshop covers a the full process of setting up a CI/CD pipeline on Google Cloud Build for a static website using Hugo.
    The code to get set up and follow along can all be found here: github.com/sidpalas/hugo-gcp-...
    ---
    Join the Community:
    💬 Discord: / discord
    💻 GitHub: github.com/sidpalas/devops-di...
    🐥 Twitter: / sidpalas
    👨‍💼 LinkedIn: / sid-palas
    🌐 Website: devopsdirective.com
    ---
    Timestamps:
    1:16 - Enabling Cloud Build API
    1:32 - Enabling service account IAM roles
    1:58 - Showing Cloud Source Repository
    2:51 - High-level Whiteboard Pipeline Overview
    3:58 - Explaining Cloud Build Workspace Persistence
    5:00 - Setting up Cloud Build Trigger
    6:10 - Explaining Trigger Substitution Variables
    7:12 - Configuring cloud-build-local Component
    8:51 - Examining Hugo Theme as Git Submodule
    9:40 - Looking at Git Cloud Builder Container
    11:05 - Adding Git Step to Pipeline
    13:25 - Examining Build Workspace
    14:23 - Updating Git Step to handle Submodule Init/Update
    17:00 - Adding Hugo Build Step to Pipeline
    20:53 - Adding Docker Build/Push Step to Pipeline
    26:36 - Adding Gcloud Deploy Step to Pipeline
    33:39 - Updating Site Content to Test Pipeline
    34:00 - Updating Cloud Build Trigger With Substitution Variables
    36:05 - Confirming Pipeline Functionality!
    ---
    Technologies used:
    - Google Cloud Build
    - Google Cloud Source Repositories
    - Docker (www.docker.com/)
    - Git submodule
    ---
    Complementary article: devopsdirective.com/articles/...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 22

  • @sofuno863
    @sofuno863 3 ปีที่แล้ว

    So much good content for free to watch and learn, I am grateful!

    • @DevOpsDirective
      @DevOpsDirective  3 ปีที่แล้ว

      Thanks @Sof DZ -- I'm glad you are finding it helpful! Thanks for stopping by!

  • @Rompelsteelskin
    @Rompelsteelskin ปีที่แล้ว

    This is good shit! Love it! Two thumbs up bro!

  • @ShashotoANur
    @ShashotoANur 3 ปีที่แล้ว +2

    Came from Traversy Media. Love your work.

    • @DevOpsDirective
      @DevOpsDirective  3 ปีที่แล้ว +1

      😀 Welcome to the team @Nurul! 👋

  • @RajeshRajesh-wq9pl
    @RajeshRajesh-wq9pl 2 ปีที่แล้ว

    Perfect …. Good job

  • @somesome23231
    @somesome23231 2 ปีที่แล้ว

    Thank you

  • @datamike7457
    @datamike7457 4 ปีที่แล้ว

    At what point do you mount the local drive where the files that get passed from step to step land?

    • @DevOpsDirective
      @DevOpsDirective  4 ปีที่แล้ว +1

      When running the cloud-build-local utility I used the command line flag "--write-workspace" to specify what directory to use on my system to mount in @ 12:41
      The documentation for this can be seen here: cloud.google.com/cloud-build/docs/build-debug-locally#preserve_intermediary_artifacts

  • @datamike7457
    @datamike7457 4 ปีที่แล้ว

    Also one other thing that isn't quite clear. At what point do you switch from local development to hosting the site in the cloud?

    • @DevOpsDirective
      @DevOpsDirective  4 ปีที่แล้ว +1

      In this video, the site is actually hosted in the cloud the whole time, and what I am testing locally is the Cloud Build configuration. At 36:03 I trigger a build in GCP by pushing my configuration to GitHub.
      The previous video on my channel shows a progression of developing the site itself, first starting locally and eventually migrating to a container running on a compute engine VM th-cam.com/video/xo_4n2Reh58/w-d-xo.html

  • @anoopsidhu3437
    @anoopsidhu3437 ปีที่แล้ว

    Hi sid great demo. One question you mentioned in the video initially cloud build is run within the context of a vm and the last step is connecting to a vm. I was wondering is it the same vm where cloud build is running or different vm

    • @DevOpsDirective
      @DevOpsDirective  ปีที่แล้ว

      Hi, sorry it's been a couple of years since this video would you mind providing the timestamp so I can reference what you are asking about?
      If I understand the question, they are separate VMs.
      Cloud build runs containers on a VM managed by Google that you as a user do not have direct access to.
      I was ssh-ing to a separate VM that I set up in my GCP account that I was deploying to
      Does that answer the question?

    • @DevOpsDirective
      @DevOpsDirective  ปีที่แล้ว +1

      If you want to discuss further, come join the community discord at discord.devopsdirective.com !

    • @anoopsidhu3437
      @anoopsidhu3437 ปีที่แล้ว

      It does and thanks for clarifying that. I think confusion came due to cloud build local tool that kinda mimic the functionality as it was running locally. All good and thanks for clarifying

    • @anoopsidhu3437
      @anoopsidhu3437 ปีที่แล้ว

      @@DevOpsDirective Do I Need some sort of invite to join there?I tried to register it wouldnt let me :(

    • @DevOpsDirective
      @DevOpsDirective  ปีที่แล้ว +1

      @@anoopsidhu3437 is your Discord username sid56? It looks like you joined successfully

  • @anilKumar-wm1bg
    @anilKumar-wm1bg 3 ปีที่แล้ว

    Hi, i would like to learn GCP cloud build full course, can you please help me out???

    • @DevOpsDirective
      @DevOpsDirective  3 ปีที่แล้ว

      This video provides an end-to-end example using Cloud Build. Are there specific questions you have about it?

    • @anilKumar-wm1bg
      @anilKumar-wm1bg 3 ปีที่แล้ว

      @@DevOpsDirective I wanted to learn full course, do you have any site to buy this full course??