Giter Club home page Giter Club logo

go-build's Introduction

CI/CD Pipeline for Go application

Hello! Here is the CI/CD pipeline for Go application

The Plan

The plan is to create CI/CD using Jenkins(Declarative pipeline) and deploy the Go application in local kubernetes cluster with Helm as a package manager.

Tools Picked:

  • CI/CD - Jenkins

  • Containerization - Docker

  • Container Orchestration - Kubernetes

  • Package Manager - Helm

Summary

I have created a kubernetes cluster in my local environment using minikube and as a first step deployed jenkins and redis containers using Helm charts.

Here are the details for the same:

We primarily used Jenkins Kubernetes Plugin(https://github.com/jenkinsci/kubernetes-plugin) to run dynamic agents in a Kubernetes/Docker environment. Once the build is triggered it dynamically creates the agents(In our case jnlp, docker and helm containers in K8 Pod)and do the docker and helming stuffs and throw the agents away. Jenkins declarative pipeline is available here: ./app/Jenkinsfile and it has all the information about dynamic agents and build and deployment stages for this pipeline. We also used pollSCM instead of webhook because this scenario is experimented in the local notebook environment. But as always webhooks must be prefferd over pollSCM.

Redis credentials are copied as kubernetes secrets and it is consumed by the Go application.

Please check the ./app/README.md to know more about Dockerization and Helming for the Go application.

To sum up

This task is purely done for local environment. So we can do some enhancements like Kubernetes RBAC setup, push/pull the Helm Charts to/from private chart repository(chart museum) and etc.

go-build's People

Contributors

narayanan-github avatar nanab4u avatar

Watchers

James Cloos 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.