Feedback Loop implementation in CI/CD pipeline using Jenkins and kubernetes

8/27/2019

Currently I am trying to implement CI/CD pipeline using the DevOps automation tools like Jenkins and kubernetes. And I am using these for deploying my micro services creates using spring boot and maven projects.

Now I am successfully deployed my spring boot micro services using Jenkins and Kubernetes. I am deployed to different namespaces using kubernetes. When I am committing , one post commit hook will work from my SVN repository. And that post commit hook will trigger the Jenkins Job.

My Confusion

When I am implementing the CI/CD pipeline , I read about the implementation of feed back loops in pipeline. Here I had felt the confusion that , If I need to use the implementation of Feedback Loops then which are the different ways that I can follow here ?

Can anyone suggest me to find out any useful documentations/tutorials for implementing the feed back loops in CI/CD pipeline please?

-- Jacob
feedback-loop
jenkins
kubernetes
maven
spring-boot

1 Answer

8/31/2019

The method of getting deployment feedback depends on your service and your choice. For example, you can check if the container is up or check one of the rest URL.

I use this stage as a final stage to check the service:

 stage('feedback'){
        sleep(time:10,unit:"SECONDS")
        def get = new URL("192.168.1.1:8080/version").openConnection();
        def getRC = get.getResponseCode();
        println(getRC);
        if(getRC.equals(200)) {
            println(get.getInputStream().getText());
        }
        else{
            error("Service is not started yet.")  
        }
    }

Jenkins can notify users about failed tests(jobs) with sending email or json notify. read more: https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin
https://wiki.jenkins.io/display/JENKINS/Notification+Plugin
https://wiki.jenkins.io/display/JENKINS/Slack+Plugin

If you want continuous monitoring for the deployed product, you need monitoring tools which are different from Jenkins.

This is a sample picture for some popular tools of each part of DevOps: enter image description here

-- M-Razavi
Source: StackOverflow