Tomcat + Spring + CI workflow [closed]

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?

Welcome to the world of CI! (may I suggest this book? It really helped me get my head around all of this CI practice)

Remote machine: won’t there be any problems with two (or even three, as jenkins might need one) instances of same app on tomcat?

In my experience: Yes. But I’m sure they’re caused by my own lack of knowledge/experience. My testing environment is a crappy old pc and system resources are scarce. I’ve automated almost all steps from git push to app deployment but every once in a while some .jar doesn’t get released by Tomcat, and I get out of memory errors from my builds on Jenkins. (I’ve already been here, here, here, here and even here).
You might probably have to configure your Jenkins project in such a way that it should undeploy the current app running on Tomcat, restart Tomcat, build the new one and deploy that new build.

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?

After reading the book I mentioned, it seems that the best case scenario would be that every developer should run jenkins and tomcat on their machines, build and deploy only with their changes there (after passing the tests, of course) and then push the changes to the common repository where tests are going to be run again along with the changes of everyone else and the app is going to be built and deployed on production/testing. I can’t think of any case where an app would run on a tomcat instance in one machine and crash on another but then again remember my lack of knowledge.

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật