Coder Social home page Coder Social logo

kirtimaanwani / circleci-pipeline-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ketangangal/circleci-pipeline-template

0.0 0.0 0.0 30 KB

This repository contains CICD actions CircleCi

License: MIT License

Shell 85.52% Python 7.57% Dockerfile 6.91%

circleci-pipeline-template's Introduction

CircleCi CICD CircleCI

CircleCI is a continuous integration and continuous delivery platform that can be used to implement DevOps practices. The company was founded in September 2011 and has raised $315 million in venture capital funding as of 2021, at a valuation of $1.7 billion. CircleCI is one of the world's most popular CI/CD platforms.

Pipeline Overview

image

Steps to Replicate

Infrastructure

1. Create an Remote machine on any Cloud. For Demo I am using google cloud's Virtual Machine.
2. Create a service account and provide Artifactry Admin Write access to service account.
3. Download the json credentials key somewhere safe in your system.

Circle Ci Setup

1. Create a github repository and add License, .gitignore, .circleci/config.yml.
2. Add a sample app and Dockerfile in root. 
3. Create a account on CircleCI and connect with circle ci.
4. select recently created project.

Self Hosted Runner Setup

Docker setup

1. Install docker in the virtual machine that you have launched on the gcp. for simple setup you can use ```scripts/virtual_machine_setup.sh file.```
2. After installing docker setup the self-hosted runner. 

Self Hosted Runner Configuration

1. Go to Main circle ci dashboard
2. Select self-hosted runners and create your resource class.
3. upon creation of resource class you can use the following API token provided by circleci
4. Keep it safe somewhere in your system.

Now follow the self-hosted runner setup self-hosted.sh

1. Configure the self-hosted as per self-hosted.sh 
2. Then start from virtual machine setup again and add circleci user to sudo.
3. Install gcp/cli. 

Done

Workflow Syntax

  • Pipeline will start from continuous-integration on docker engine.
  • upon successful exceution of the continuous-itegration continuous-delivery will start.
  • upon successful exceution of the continuous-delivery, circleci will wait for user to approve the deployment in the production env.
  • continuous-deployment will depend on successful of :-
    1. continuous-integration
    2. continuous-delivery
    3. sanity-check
workflows:
  CICD:
    jobs:
      - continuous-integration

      - continuous-delivery:
          requires:
            - continuous-integration

      - sanity-check:
          type: approval
          requires:
          - continuous-delivery

      - continuous-deployment:
          requires:
            - sanity-check
            - continuous-integration
            - continuous-delivery

Advance Options (machine Learning Usecase)

  1. Can configure remote GPU Machine for model Training. But workflows has to be changed from [ on push main ] to [Cron Jobs]/ [Manual Trigger]

circleci-pipeline-template's People

Contributors

ketangangal 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.