Code Monkey home page Code Monkey logo

gcp-devops-project's Introduction

GCP DevOps Project

This project establishes a CI/CD pipeline for deploying and updating Google Kubernetes Engine (GKE) clusters on Google Cloud Platform (GCP). The pipeline is orchestrated through GitHub actions and Google Cloud Build.

Overview

  • Continuous Integration (CI): GitHub branches are organized to manage different aspects of the project.

    • main: Represents the production-ready state. Merging into this branch triggers a CI/CD pipeline for deploying to the production GKE cluster.

    • dev: Represents the development environment. Any push to this branch triggers the CI/CD pipeline for deploying to the development GKE cluster.

CI/CD Workflow

  1. GitHub Branching:

    • Branches are created for different components of the project (e.g., Deployment, services, cloud build, etc.).
  2. Cloud Build:

    • The CI/CD pipeline is defined in the cloud-build.yaml file.
    • Cloud Build automatically builds a Docker image, pushes it to Google Container Registry, and deploys the application to the specified GKE cluster and namespace.

Folder Structure

  • Dockerfile: Builds a Docker image for the Flask application.

  • app.py: Contains the main Flask application with a basic route.

  • cloud-build.yaml: Google Cloud Build configuration file for CI/CD pipeline.

  • gke.yaml: Kubernetes Deployment and Service configuration for GKE deployment.

  • requirements.txt: Specifies project dependencies, including Flask.

Environments

  • Production (prod): Represents the live environment. Changes in the main branch trigger deployment to the production GKE cluster.

  • Development (dev): Represents the development environment. Any push to the dev branch triggers deployment to the development GKE cluster.

Usage

  • Accessing the Application: Once deployed, access the application at the LoadBalancer IP on port 80.

Requirements

  • Python 3.8
  • Flask

Notes

This CI/CD pipeline is designed to streamline the deployment process for GKE clusters on GCP. Adjust configurations as needed for specific project requirements.

gcp-devops-project's People

Contributors

tessie475 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.