Ask Your Question

combining jvm parameters from multiple modules in a template

asked 2013-05-13 12:54:26 -0600

chrisjhandy gravatar image

updated 2013-05-18 00:54:38 -0600

I want to know how I can combine jvm parameters from multiple modules into a template I have defined. My example is a resin app server which has its own initial jvm parameters stored in hiera, but then I want to install a solr application into it which has some additional jvm parameters and also want to set up newrelic monitoring on it which also has more jvm params. I want to store each set of the params separately and then layer them on top of each other. Example below:

define profile::solr ($active = 'Y') {
  $app = $title

# based on app ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-13 17:08:15 -0600

Ancillas gravatar image

If you have the JVM parameters stored as separate arrays in hiera with the same key, you could use hiera_array('jvm_parm_key') to fetch them and automatically string them together as an additive array. The hiera_array function will find all matches of your key throughout your entire hierarchy, and return a flattened array of all of them. This doesn't play nice with databindings, as you'd be using a single key that's wouldn't necessarily match the module name.

Another option would be to use multiple hiera calls to fetch all of your java parameters, and then pass them ... (more)

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

1 follower


Asked: 2013-05-13 12:54:26 -0600

Seen: 261 times

Last updated: May 13 '13