Code Monkey home page Code Monkey logo

concourse's Introduction

concourse-ci-cd

Complete Concourse CI/CD pipeline of Maven Spring project to kubernetes

This is the simple spring boot maven hello project that contains a REST API to test the project is running successfully. It contains the concourse_ci directory that contains all about the concourse CI/CD pipeline.

prerequisite

  • Docker
  • Docker Compose
  • Maven
  • Kubernetes Cluster
  • Docker Hub Account

local testing

Run mvn clean package Then run java -jar target/hello-springboot-0.0.1-SNAPSHOT.jar

Now Spring boot application is running locally, Verify it by hitting the below URL

http://localhost:8080/api/hello

First, you need to give the following variable value in the config.yml file

Docker

docker-hub-email: <>

docker-hub-username: <>

docker-hub-password: <>

docker-hub-repo-name: <>

Kubernetes

server: <>

namespace: <>

cad: <>

token: <>

then save the file on local, Don't push it to the repository and you can also use vault as a secret manager.

Setup Concourse and CI/CD pipeline steps

  • Download the Docker compose file

      `wget https://concourse-ci.org/docker-compose.yml`
    
  • Run the Docker Compose File

      `docker-compose up -d`
    
  • Download the fly CLI tool from the localhost:8080

  • Give execute permission to the fly CLI

      `chmod +x fly`
    
  • Copy the fly CLI to the /usr/bin

      `sudo cp fly /usr/bin/`
    
  • Login to the concourse

      `fly -t ci login -c http://localhost:8080 -u test -p test`
    
  • Clone the following spring boot project

      `git clone https://github.com/prasad459/concourse-ci-cd.git`
    
  • Change to the root dir of the project

      `cd concourse-ci-cd`
    
  • Create Concourse Pipeline

      `fly -t tutorial set-pipeline -p spring-boot-service -c concourse_ci/pipeline.yml -l concourse_ci/config.yml`
    
  • Unpause Concourse Pipeline

      `fly -t tutorial unpause-pipeline -p spring-boot-service`
    

Now you have successfully setup the CI/CD pipeline that test, package and deploy your project to the Kubernetes.

For more info follow the mentioned blog:

https://blog.knoldus.com/concourse-ci-cd-pipeline/

concourse's People

Contributors

prasad459 avatar azmathasan92 avatar mani762 avatar

Watchers

James Cloos avatar  avatar

Forkers

mani762

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.