Tomcat + Spring + CI workflow

Posted by ex3v on Programmers See other posts from Programmers or by ex3v
Published on 2014-08-22T14:02:47Z Indexed on 2014/08/22 16:35 UTC
Read the original article Hit count: 265

We're starting our very first project with Spring and java web stack. This project will be mainly about rewriting quite large ERP/CRM from Zend Framework to Java. Important factor in my question is that I come from php territory, where things (in terms of quality) tend to look different than in java world.

Fatcs:

  • there will be 2-3 developers,
  • at least one of developers uses Windows, rest uses Linux,
  • there is one remote linux-based machine, which should handle test and production instances,
  • after struggling with buggy legacy code, we want to introduce good programming and development practices (CI, tests, clean code and so on)
  • client: internal, frequent business logic changes,
  • scrum, daily deployments

What I want to achieve is good workflow on as many development stages as possible (coding -> commiting -> testing -> deploying). The problem is that I've never done this before, so I don't know what are best practices to do this.

What I have so far is:

  1. developers code locally,
  2. there is vagrant instance on every development machine, managed by puppet. It contains the same linux, jenkins and tomcat versions as production machine,
  3. while coding, developer deploys to vagrant machine,
  4. after local merge to test branch, jenkins on vagrant handles tests,
  5. when everything is fine, developer pushes commits and merges
  6. jenkins on remote machine pulls commit from test branch, runs tests and so on,
  7. if everything looks green, jenkins deploys to test tomcat instance
  8. Deployment to production is manual (altough it can be done using helping scripts) when business logic is tested by other divisions and everything looks fine to client.

Now, the real question: does above make any sense? Things that I'm not sure about:

  1. Remote machine: won't there be any problems with two (or even three, as jenkins might need one) instances of same app on tomcat?
  2. Using vagrant to develop on php environment is just vise. Isn't this overkill while using Tomcat? I mean, is there higher probability that tomcat will act the same on every machine?
  3. Is there sense of having local jenkins on vagrant?

© Programmers or respective owner

Related posts about java

Related posts about Workflows