9

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?

Mr.DevEng
  • 2,651
  • 14
  • 57
  • 115
  • So my question here would be , which problem are you trying to solve by implementing the feedback loop to your pipelines. Answering this question will help you understand the scope. – damitj07 Aug 28 '19 at 11:19
  • By feedback loop do you mean this? https://www.gocd.org/2016/03/15/are-you-ready-for-continuous-delivery-part-2-feedback-loops/ – Tummala Dhanvi Aug 30 '19 at 14:10
  • @TummalaDhanvi - Yes . Exactly. The same thing I am looking for. But I am only getting the information about how it is working , not the implementation. Now I am working with spring , spring boot , maven , Jenkins and kubernetes. I am looking for tutorials for these technical stack. I didn't got proper tutorial to follow. Thank you for your response. – Mr.DevEng Aug 30 '19 at 15:23
  • 1
    To me, feedback loops look like deploying to prod only after doing thorough testing and stopping the deployment if any of the tests fail and then fixing the code. https://www.gocd.org/assets/images/blog/are-you-ready-for-continuous-delivery/gocd_thoughtworks_continuous_delivery_feedback_loops-cb9bdbe3.png – Tummala Dhanvi Aug 30 '19 at 15:31
  • 1
    Honestly even after reading the accepted answer I didn't get what exactly you were looking for :) Also, don't use "Feedback Loop" term - people don't understand it and also it's not correct as there's no loop. Feedback Loops are found in electronics, biology, etc. CD pipeline is *not* a feedback loop. People like coming up with buzzwords.. – Stanislav Bashkyrtsev Sep 01 '19 at 07:55

1 Answers1

7

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
  • 3,327
  • 2
  • 34
  • 46
  • Ok.I understood. But my actual question is if there is a run time exception that found in stage environment due to issue inside code , then how we can give this issue to developer by using feed back loop ?. And When you are saying that monitoring tools , which are the other tools apart from jenkins ? let me know atleast some name of tool that I can use for implementing feedback loops. And thank you for your response sir. – Mr.DevEng Aug 31 '19 at 13:09
  • @Jacob you can notify developers via different methods such as Email, Slack,... There are lots of free/commercial monitoring tools like Nagios, Datadog, Pinpoint,... Update answer to cover your questions. – M-Razavi Sep 01 '19 at 07:17