Ask Your Question
0

How to create workers.properties in apache based on number of tomcat workers

asked 2016-01-28 10:04:10 -0500

gschandra gravatar image

Hello everyone, I am trying to create workers.properties file dynamically using puppet. The challenge I have is that the file varies based on the number of backend tomcat nodes. If there is one tomcat at the backend, the file should have one worker stanza and if there are two nodes, the file should have 2 worker stanza and so on like shown below. Can any suggest a good of dealing with this challenge? Can hierahash be used with concat or createresources?

worker.properties for one tomcat node

worker.node1.type=ajp13 worker.node1.host=host1 worker.node1.port=8001

worker.properties for two tomcat nodes.

worker.node1.type=ajp13 worker.node1.host=host1 worker.node1.port=8001

worker.node2.type=ajp13 worker.node2.host=host2 worker.node2.port=8002

Thanks in advance for your help.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-01-29 00:24:12 -0500

rajeevsharma gravatar image

This can be done in number of ways, as I understand you have to make a dynamic lookup of other tomcat instances on apache server using a template to generate workers.properties file. Information about other nodes could be collected using export resource or hiera.

For your reference: http://ask.puppetlabs.com/question/18...

I hope this can help.

edit flag offensive delete link more
0

answered 2016-01-29 09:27:19 -0500

gschandra gravatar image

Hi Rajeev, thanks for the information, I will try the possible options. The reason for me to pick hiera is to manage a single source of truth.

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

Stats

Asked: 2016-01-28 10:03:10 -0500

Seen: 186 times

Last updated: Jan 29 '16