Giter VIP home page Giter VIP logo

devopsusecase's Introduction

This Repo provides a basic DevOps setup using Gitlab CI/CD

Following tools are used:

  1. Gitlab
  2. Python
  3. Bash
  4. Docker
  5. Docker Hub
  6. Helm
  7. Java

Pre-Requisites: To test this code following tools are required:

  1. Gitlab
  2. Docker Hub
  3. K8s cluster

Gitlab Variables: Following Github CICD variable need to be setup before running the pipeline:

  1. DOCKER_USERNAME
  2. DOCKER_PASSWORD
  3. KUBECONFIG_CONTENT

Note: Also update the Docker Hub repository to your repository

APPS: There are two python apps (app1 and app2), app1 prints Hello every 2 seconds and app2 prints world every 2 seconds on the console. A sample Hello World java app with its Dockerfile is also present but not used in the CICD.

CI/CD Workflow:

  1. (Build) Initially a python whl artifacte gets created for both the apps to be used in the later stages.
  2. (Test) The whl artifact gets installed and the output gets tested by a unit test written in bash.
  3. (Dockerize) The whl artifact is used to install the python package on the Docker image and the start command is sent. Both app1 and app2 are using the same Docker repository but the tags are appended by the current commit and the app name.
  4. (Deploy) Helm settings are provided inside the repo (basic deployment setup). Helm repo is not used. The Dploy portion updates the current k8s settings (Docker image) to the current one. All the stages are dependent on one another so for the next stage to proceed, previous would have to pass. Also, Dockerize and Deploy only run on the default branch.

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.