Pregunta

If I were using python I would probably like to use pip as a nice installer for continuous delivery with its nice repository integration and scripting capabilities.
Do I have anything similar in java which would be useful for me in continuous deployment?

Can someone recommend me how they do full continuous deployment in java?

I'm going to have multiple servers with complex configurations and huge multiple clusters with databases, NOSQL's (and using maven for the some of the projects while others are just downloaded pacakges) etc etc... anyone has recommendation for that?

Again I think pip is a very nice installer and could help me, anyone has experience maybe with ubuntu juju?

However if I use ubuntu juju that would mean I would have to use ubuntu based servers and not centos.

¿Fue útil?

Solución

I'm not completely clear what pip does, but here is my toolchain for CI/CD

You need a build tool:

  • Maven (does a lot of stuff, including downloading dependencies and driving you crazy)
  • ANT (will poke you until you die with xml brackets)
  • Gradle and others (pretty much everybody including ANT uses/can use Ivy for downloading dependencies from repositories)

You need an CI server

  • jenkins
  • various commercial options (Teamcity, Bamboo ...)

For the deploying part you need something to deploy your apps. This really depends on the build tool you use (which should be able to do the deployment). Maven has some plugins for this afaik, but I think you will have to google for your app server and the build tool to find a solution for your specific need.

Otros consejos

There's a kind of bright line between Java app build and Java app deployment. Build CI in Java is pretty straightforward with a variety of tools available - build scripting (Ant, Maven, Gradle, etc), continuous builds (Jenkins, Go, Anthill, etc), and repositories (Nexus, Artifactory, etc). Dependency management for libraries is a hairball for Java, so definitely use Maven or Ivy for it.

Deployment is a much wilder and less mature world. The environments are potentially far more complex, and often include messy non-Java things like relational databases. You can hand-roll scripts, or use ControlTier or Capistrano or something like that (which will still involve some hand-rolling).

Probably what you are looking for is building a deployment pipeline. Check a video example here: http://www.youtube.com/watch?v=6CEQOuHM86Y There are multiple ways to achieve it. Ill tell you my preferred one.

Components you will need:

  • VCS server (SVN, Git)
  • CI Server (Jenkins, Hudson, TeamCity)
  • Build Tool (Maven, Ant, Gradle)
  • Artifact Repository (Artifactory, Nexus)
  • Deployment Tool (Rundeck, Puppet, Deployinator, Capistrano)
  • Target Environment/s (Application Server like Tomcat, JBoss)

Workflow:

1) CI Server polls VCS Server for changes

2) When a change is found (i.e., a commit), starts job execution, getting an artifact (CI Server will compile and run tests). CI Server internally will use a Build tool like Maven.

3) CI Server uploads artifact to an Artifact Repository

4) Deployment Tool reads Artifact Repository and provides a list of artifacts to be deployed, plus the list of Target Environments where Developer/Ops can select a combination of both and deploy the artifact in the selected server.

Take into consideration some criteria at the moment of picking the tools. If you have a really big infrastructure (like 200+ Target Environments), robust solutions like Puppet make sense. If you have a modest one (let say, 10 Target Environments) then Rundeck may be enough. Also, take into consideration that some of the listed tools are not free (Puppet Enterprise is not free beyond ten nodes, for example).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top