puppet in java

93 views
Skip to first unread message

PRAVEEN D

unread,
Nov 28, 2013, 4:28:39 AM11/28/13
to puppet...@googlegroups.com
We have bunch or property files(key/value pairs) used in different modules in our java web applicaiton. our applicaiton is also distributed, part of that runs on a head office and some of the parts run at the branch. All the branches run a local server for day to day activities.  We are looking to automate these files when moving to different environments like deve, test, prod. So that we can manage these property files without restarting the applicaiton. From my understanding puppet is able to manage those property files and can be distributed to any number o nodes. 

From my understanding with puppet, it creates a manifest files and these are updated by the agents from the puppet master. My question is how to read these manifest files in java? does this puppet supports in all operating systems?

Thanks,
Praveen

Dan White

unread,
Nov 28, 2013, 10:57:00 AM11/28/13
to Puppet Users Mailing List
How do you currently do this by hand ?
Knowing would help in figuring out an answer.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/72669544-12ec-4e75-92e1-f0d3e85e8878%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

PRAVEEN D

unread,
Dec 4, 2013, 2:27:43 AM12/4/13
to puppet...@googlegroups.com
Current application is a standalone web application running in one server, so we use spring framwork to load the properties. New direction is to go with a distributed and clustered model, that is where we are getting complicated with the property file management. Let me know your thoughts on this.

Henrik Lindberg

unread,
Dec 4, 2013, 9:53:08 PM12/4/13
to puppet...@googlegroups.com
How do you get the property file to be where it is supposed to be on the
target system, and where is it located on the target system? A plain
file, in a jar, does the jar have to be signed etc.

An explanation of how this is done now helps figuring out a good way of
automating it with Puppet.

Regards
- henrik

Romain Pelisse

unread,
Dec 5, 2013, 6:27:17 AM12/5/13
to puppet...@googlegroups.com
Hi,

If I understand your use case, you actually don't need to read the "file in java", you just need to place properties files under "puppet control", meaning, ask Puppet to either deploy the files (if missing) or ensure its content is equal to the one on the Puppetmaster.

The real issue is that (up to my knowledge) no Java application will reload a properties file, so even if Puppet deploys a change to it, if the Java process has already been started, you'll need to restart it. Puppet has a mechanism called notify to do that, but if you don't want to restart the application this is not an option. 

An other way to do it would be use Puppet to set up a cronjob that restarts the application during the "local night". This way; if you deploy a change during the day, the application will be made aware of it in the following night.

if you really need to have the Java app immediatly load the change, you need change from regular property files (.properties, load by the "bundle" mechanism) to plain configuration file, which scanned for changes regularly by your app. (ie code changes).





--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/72669544-12ec-4e75-92e1-f0d3e85e8878%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Romain PELISSE,
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it" -- Terry Pratchett
Belaran ins Prussia (blog)     (... finally up and running !)
Reply all
Reply to author
Forward
0 new messages