Automated Deployment solution for multiple Java web-apps

前端 未结 9 838
时光说笑
时光说笑 2020-12-23 12:02

I\'m looking for solutions, preferably open source, that can manage deployments of multiple interdependent java web-applications.

The solution requires an ab

9条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-23 12:38

    My suggestion is to use a combination of tools (separation of concerns, the right tool for the right problem) that will help you to accomplish your objective, let me mention some of the ones that I've used:

    • SVN or Git (SCM)
    • Maven (Software project management and comprehesion tool)
    • Jenkins (To create/trigger your CI and CD process)
      • Artifactory Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin (To promote your artifacts to Artifactory and to be able to release artifacts [https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Artifactory+Plugin+-+Release+Management])
      • Rundeck Plugin: https://wiki.jenkins-ci.org/display/JENKINS/RunDeck+Plugin (To integrate Jenkins with Rundeck)
      • Build Pipeline Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Build+Pipeline+Plugin (To create your delivery pipeline)
    • Artifactory http://www.jfrog.com/open-source/ (To store your SNAPSHOT and RELEASES of your artifacts)
    • Rundeck http://rundeck.org/ (To turn your operation procedures in self-service jobs)

    in addition to the tools mentioned above, there are other that can be helpful and you can use them according to your project needs: http://www.oracle.com/technetwork/articles/java/deployment-tools-2227133.html

    Now talking about the problem. The first thing that I noticed is that you mentioned that you already have your release artifacts in your repository manager (like Artifactory), so the next step that we need to do is a way to orchestrate the deployment of these artifacts at the same time, I think one option is to use the Paremeterized Build (https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build, where you need to define multiple parameters that will contain the different versions of the artifacts that you want to deploy, once the user fills these values we will use them to pass as parameters to a rundeck job (rundeck is a tool that helps you to orchestrate tasks in different nodes), this rundeck deployment master job will receive the parameters and will orchestrate the deployment of your artifacts. Some examples of the steps that a rundeck job will contain are: Stop your Container, Backup your current Components, Start your Container, Download your artifacts from your repository manager, Create Resources in your Container, Deploy your components in your container, Execute your DB Deploy, Send an email if the process fails, etc .. Usually each of these steps are sub-jobs (that also receive parameters), and at the end we create one master job that uses/orchestrate all these sub-jobs.

    Let me add some images examples of this type of CD process. This example is only deploying War/Ear artifacts, but it can help you to see the big picture:

    https://drive.google.com/folderview?id=0B-FVAopZZjDWdGl0WlNjX1RnRDQ&usp=sharing

    I hope this can be helpful.

提交回复
热议问题