sharing config files across applications

33 views
Skip to first unread message

bg

unread,
Oct 29, 2012, 6:41:21 AM10/29/12
to lif...@googlegroups.com
Hi all,

I have four  lift applications which all run off very similar config files. Would it be considered best practice to share config files across applications, and if so, any suggestions on how to approach this?

Marko Elezovic

unread,
Oct 29, 2012, 7:02:15 AM10/29/12
to lif...@googlegroups.com
Heya bg!

I'm also thinking about investing in a proper solution because I'm
getting a bit tired of manually copying all the credentials which are
not revisioned in the repository.

What I've frequently heard of, but never actually tried out, is a
central configuration server setup people often use in enterprize-ish
environments. Basically the runner of the application requests all the
necessary configurations in runtime by authenticating to the
configuration server. Thus it's easier to perform any type of scaling or
default configuration setup.

Does anyone here have a configuration server to recommend or would the
best course of action be to try and roll my own?

Regards,
Marko
> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
>
>

bg

unread,
Oct 29, 2012, 7:40:32 AM10/29/12
to lif...@googlegroups.com
Hi Marko - thats a interesting suggestion, but probably a little bit "big" for me at the moment.

I was thinking that I have a utility Project which in SBT is a Dependacy in all four of the Apps.

Perhaps I could approach it by defining my prop file within the utility Project?

How would I add some directory in the utility project to the classpath so the Props search (tryo{getClass.getResourceAsStream(name)) looks within that directory as well ?

====

Utilies (just some basic scala classes, build in SBT by defining as a Project
-> scala code
-> something like /resources/props/commonPropFile, do I need to add to the classpath, if so, how?

App 1 (one of 4 lift app, each of the apps has dependsOn the Utilities Project)
-> src/main/resources/props = wouldn't use this location anymore, but would do the lookup in the Utilities project
-> code

App 2

App 3

App 4

Diego Medina

unread,
Oct 29, 2012, 10:25:23 PM10/29/12
to lif...@googlegroups.com
maybe the sbt mailing list will have a good answer, but I think that
in practice, having one projet, and then your other project depend on
it should work.

Diego
--
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://www.fmpwizard.com
Reply all
Reply to author
Forward
0 new messages