Summary
This tutorial demonstrates how to set up CI/CD using GitHub Actions, deploying a sample application on Google Cloud Platform Kubernetes using Helm3.
Abstract
The text provides a step-by-step guide on how to set up Continuous Integration and Continuous Deployment (CI/CD) using GitHub Actions. The author explains the concept of GitHub Actions as tasks to be achieved at specific events, such as Push to a master event. The tutorial focuses on deploying a sample application on Google Cloud Platform Kubernetes using Helm3. The prerequisites for this tutorial are familiarity with Kubernetes and Helm.
The tutorial outlines the use case, where a sample application is built using Spring Boot, and two workflows are defined: one for a feature branch and another for the master branch. On push to a feature branch, the workflow will run tests, while on push to the master branch, the workflow will run tests, push the Docker image to Docker Hub, and deploy to Kubernetes. The tutorial provides links to sample applications and workflow files.
The author explains how GitHub searches for YAML files under ".github/workflows" and how these files define workflow jobs. The tutorial provides examples of feature-workflow.yml and master-workflow.yml files. The feature-workflow.yml file contains a single job (test) with four steps: checkout, setup-java, maven package, and maven verify. The master-workflow.yml file contains three jobs: test, docker, and deploy. The docker job prepares the environment to run regular docker commands to build and push the image to docker hub. The deploy job uses setup-gcloud action from Google cloud platform to install gcloud and generate the kubeconfig file.
The tutorial concludes with instructions on how to verify the deployment using kubectl commands. The author emphasizes the benefits of using GitHub's actions to define the workflow and the ability to find an action for every task that needs to be achieved.
Bullet points
- GitHub Action is a task to achieve at a certain event
- The tutorial demonstrates how to set up CI/CD using GitHub Actions
- The sample application is deployed on Google Cloud Platform Kubernetes using Helm3
- The tutorial assumes familiarity with Kubernetes and Helm
- The tutorial defines two workflows: one for a feature branch and another for the master branch
- The feature-workflow.yml file contains a single job (test) with four steps
- The master-workflow.yml file contains three jobs: test, docker, and deploy
- The tutorial provides examples of YAML files for GitHub workflows
- The tutorial concludes with instructions on how to verify the deployment using kubectl commands