• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Continuous Integration and Continuous Delivery in CICD

 
Ranch Hand
Posts: 2952
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CICD is  Continuous Integration Continuous Delivery. Is it correct to say that Continuus integration means automation of build pipelines where we push the code and when test cases passes it gets checked into a version control repository (like git, bitbucket etc) and for this we require tools like Jenkins and next required is way to deploy it a Continuous Delivery which means that after this the deployable files need to be deployed to some server or cloud like AWS and for this we require tools like CodeDeploy and Spinnaker? Thanks
 
Saloon Keeper
Posts: 15731
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Monica Shiralkar wrote:Is it correct to say that Continuus integration means automation of build pipelines where we push the code and when test cases passes it gets checked into a version control repository


You got it the wrong way around.

Code gets checked into version control by a developer, which in turn triggers build pipelines that build and test the software.

When tests pass, the next step is triggered, which usually is not related to version control, but rather to some form of deploying the build artefacts.

for this we require tools like Jenkins


Jenkins is a good example of a CI tool, but note that CI can also be done by something as simple as a Git hook that calls a compiler.

Continuous Delivery which means that after this the deployable files need to be deployed to some server or cloud like AWS and for this we require tools like CodeDeploy and Spinnaker?


Again, these are common scenarios, but far from the only ones.

Continuous Delivery can also just mean bundling the deployable artifacts together and putting them in a shared folder, or making them available for download on a website.
 
Saloon Keeper
Posts: 28321
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Stephan has said, Jenkins is one CI/CD management tool, but not the only one and for that matter you can always roll your own. Ansible, for example, can handle many CD tasks.
 
Monica Shiralkar
Ranch Hand
Posts: 2952
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks

Stephan van Hulst wrote:
You got it the wrong way around.

Code gets checked into version control by a developer, which in turn triggers build pipelines that build and test the software.


Yes. I realize that mistakenly I said in the wrong order and code check-in is the first step.

Stephan van Hulst wrote:

When tests pass, the next step is triggered, which usually is not related to version control, but rather to some form of deploying the build artefacts.



Is it correct to say that  preparing the build artefacts is CI and deploying the build artefacts is CD. If not, then up to what stage exactly does it come under CI and from where stage does CD begin?

Stephan van Hulst wrote:
Jenkins is a good example of a CI tool



Is it correct to say that Jenkins can do things like build pipeline (involving running the unit testes and preparing the build artefacts) but it cannot do the Deploy part and for that we require something?

Stephan van Hulst wrote:
Continuous Delivery can also just mean bundling the deployable artifacts together and putting them in a shared folder or making them available for download on a website.



Is it correct to say that in any case the end result of continuous delivery, would be that code is ready to be run now from wherever it is intended to be run from?

Stephan van Hulst wrote:
Again, these are common scenarios, but far from the only ones.


If the code is to be deployed and run from Cloud then, it requires things like CodeDeploy or Spinnaker, but if the code is required to be just deployed on Tomcat then what is required as CD tool and can it be done without using a CD tool too, if so how?





 
Tim Holloway
Saloon Keeper
Posts: 28321
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jenkins  can definitely deploy the artefacts it makes. I've suggested that it do so for the JForum (Ranch) software, in fact. Jenkins is really just a fancy scripting and control system so it can do pretty much any sequence of applications/services, especially — though not exclusively —if they are in Java.

DevOps tools such as Ansible, Salt and Puppet are often used to do deployment as well. One of my favorite setups is to make Maven built an RPM package from the project. RPM is RedHat Package Manager and OS packages for the Red Hat, CentOS, Fedora and similar systems are RPMs. It's also possible for Maven to build .deb packages for Debian/Ubuntu family or For that matter, to make Windows installables. Those can then be deployed by a CI/CD tool like Jenkins or the DevOps tools. I prefer to build RPMs over simple WARs because often you need to be able to construct exernal resource that an OS package manager can do that can't be done by unpriivileged Java code. Although for simple deploys I might have Ansible create the support files and copy the deployable app into the target server(s). DevOps utilities are especially useful for deployment of elastic resources.

Quite a few people here on the Ranch actually just have Maven build and deploy directly, although I'm not a big fan of that myself.

There are all sorts of mix-and-match strategies you can use. It's mainly a matter of picking what works for you.
 
Monica Shiralkar
Ranch Hand
Posts: 2952
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Jenkins  can definitely deploy the artefacts it makes .



Does it means Jenkins is CICD tool and not just a CI tool ? If Jenkins can do deployment too of the artefacts it makes, then is there any advantage of using CD tools like CodeDeploy and Spinnaker, if the CI part we are already doing using Jenkins (for triggering thr build pipeline checkin of the code which includes running of unit tests ?
 
Tim Holloway
Saloon Keeper
Posts: 28321
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CodeDeploy and Spinnaker are cloud support tools. I've not worked with them so I cannot say how much help that they would be, but it's entirely likely that Jenkins might be used to invoke them. I could definitely deploy via brute force to AWS, however and have done so long before such tools were available. But they're designed to make the job easier.

You definitely don't need cloud tools to deploy to your LAN, though. For example, the Ranch has its own Jenkins instance within the virtual hosting system that also contains JForum, so a cloud-specific deployer would be of little help. Definitely not one tied to a particular cloud system such as Amazon AWS.
 
Tim Holloway
Saloon Keeper
Posts: 28321
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As for Spinnake and Jenkins playing together, this chart may prove informative:

https://spinnaker.io/docs/guides/tutorials/codelabs/hello-deployment/
 
Tim Holloway
Saloon Keeper
Posts: 28321
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
... And finally, note that in that chart, Jenkins is producing and deployin Debian packages (.deb files). Just like I said I like to to with RPMs. The only difference is that they're using Debian for their eample production servers and I'm using CentOS.
 
Monica Shiralkar
Ranch Hand
Posts: 2952
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. So, if we are using Jenkins with say CodeDeploy/Spinnaker or some other tool, then when Jenkins pipeline gets triggered by the code check and runs the test case and creates the deployable artefacts, then whatever part CodeDeploy/Spinnaker or other tool is doing by making it easy to deploy, broadly what is the way to be followed it would have been without them ?
 
Monica Shiralkar
Ranch Hand
Posts: 2952
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it so that although Jenkins is a tool that can take care of compete CICD, when it comes to cloud the better way is to use Jenkins only for CI part and do CD part using a Cloud CD tools like CodeDeploy or Spinnaker ?
 
Stephan van Hulst
Saloon Keeper
Posts: 15731
368
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jenkins is NOT a tool that takes care of CI/CD completely. It's a tool that manages the CI/CD pipeline. It delegates to other tools for the specifics of CI or CD.

Think about it: Why would Jenkins compile and test your code? It just delegates this to the build tool, in most cases this is likely Maven. Similarly, why would it perform deployment by itself? It just delegates this to other tools.

Depending on your requirements, CodeDeploy is an example of a tool you can use to deploy your application, and I wouldn't be surprised if there is a hook in Jenkins that allows it to call CodeDeploy when you configure it so.

I suggest that you read the Jenkins manual or follow a Jenkins tutorial.
 
Tim Holloway
Saloon Keeper
Posts: 28321
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course, many tools these days are built on other tools. Spring Boot embeds Tomcat in its productions. WebLogic has ANTLR in it. Jira is full of open-source components, even though it isn't open-source itself (nor is WebLogic).

And Maven, likewise. To get Maven to build an RPM, Maven actually runs the RPM build tools, which unfortunately means that the build host OS must be in the Red Hat family. Likewise Maven builds for ".deb" are so structured.

Virtually no system of any consequence is built up from scratch these days. It just isn't economical or even desirable.

And yes, there's a CodeDeploy plug-in for Jenkins: https://plugins.jenkins.io/codedeploy/
 
Monica Shiralkar
Ranch Hand
Posts: 2952
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Jenkins is NOT a tool that takes care of CI/CD completely. It's a tool that manages the CI/CD pipeline. It delegates to other tools for the specifics of CI or CD.


Thanks. Understood.


Stephan van Hulst wrote:

Depending on your requirements, CodeDeploy is an example of a tool you can use to deploy your application



And in case of deploying not on cloud but on web servers ike Tomcat, what are the commonly used tools which Jenkins typically delegates to ?
 
Stephan van Hulst
Saloon Keeper
Posts: 15731
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could just use the "Deploy to container" plugin that Jenkins comes with.
 
Monica Shiralkar
Ranch Hand
Posts: 2952
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
 
Honk if you love justice! And honk twice for tiny ads!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic