Ask Your Question

how to create java environment (installing mysql,jdk,jre,tomcat) using single script/module

asked 2014-11-05 07:00:39 -0600

abhishekb gravatar image

Please suggest how java environment can be setup using puppet consisting of following packages -

  1. JDK,JRE
  2. Tomcat (with war deployment)
  3. Mysql

Note: I have done this using separate scripts, but i want to do this using same script/module.

edit retag flag offensive close merge delete


Can you able to share the scripts for the above Java environment setup.As I was newbee unable to get hold off the technology.

Renuka gravatar imageRenuka ( 2014-11-18 17:20:14 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-05 16:12:20 -0600

cbarbour gravatar image

I would advise you against trying to combine those into a single module.

There are a few issues in trying to combine them into a single module. The major issue is that it reduces flexibility. If you have a 'Java App Stack' module that includes those items, and a 'AMQ stack' module that also includes java, you create a conflict when one day you decide that you want to have 'AMQ' installed on your 'Java App Stack.'

The normal approach would be to create a wrapper module that includes Java, Tomcat, and MySQL. Since includes do not create conflicts, you could easily create another wrapper module for a different app stack, and both would work together. The wrapper pattern is common in Puppet sites; we call them profiles.

This approach also makes debugging way easier. If you have a problem with one component of the stack, you need only look at that one module. Reducing your scope makes your intent clearer, makes documenting and testing your modules simpler, and reduces the complexity of your interfaces.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-11-05 07:00:39 -0600

Seen: 631 times

Last updated: Nov 05 '14