Re: Best Practices - Properties files
Re: Best Practices - Properties files
- Subject: Re: Best Practices - Properties files
- From: Tim Worman <email@hidden>
- Date: Wed, 24 Jun 2009 22:16:41 -0700
Keiran:
Thanks - there's some awesome options in there that I didn't know
about! I forgot to mention the one I was actually using in dev and
that is ~/WebObjects.properties but that one is pretty well
documented. I really like that one for using special dev passwords and
keeping it safely tucked away.
On Jun 24, 2009, at 7:17 PM, Kieran Kelleher wrote:
As you saw u can use Properties.<username> for specific user
configurations. This same feature can be used for configurations
too, for example have a deployment config file named
Properties.deploy and then in the WOMonitor args, simply put
-Duser.name=deploy
OK - I get this now. I'd misunderstood. It's actually using the
username variant and passing that in as a launch argument. I guess
you'd want to make sure you'd deployed a secure version of WOMonitor
as well. I haven't. :-( Still running "stock parts" with that.
For sensitive passwords that you want kept out of svn repository,
you can put them in WOMonitor args directly like
-DMyEOModel.password = mypassword
OR use @@ template substitution and in WOMonitor args, put this:
-Duser.name=deploy
-Dsecretpassword=mypassword
and in Properties.deploy you can use a wonder simple template format
like this which does property resolving/substitution
MyEOModel.password = @@secretpassword@@
I love this option! I may have to really look at this option further.
I would not have been familiar enough
For *most* properties, see the file ERExtensions/Resources/
Properties. In fact the Resources/Properties file of each Wonder
framework usually documents the Properties that can be configured.
Also a new Wonder project in WOLips will usually have recommended
property settings. Browsing the source code of Wonder can sometimes
lead you to discover configurable properties that are not documented
anywhere too.
I figured I could probably jump into the ERXConfigurationManager
source to find any db connection options I was missing - but
unfortunately what's really been missing is the time to do that. :-) I
did look up the API and found that there were OpenBase specific
options but I stuck with DB.URL since I wasn't able to get those
working.
Useless Side Note: Googling "ERXConfigurationManager" returns the
Wonder 2.0 API as the first hit and actually does not return the
current API as any hit. :-) I've noticed this with other Wonder class
searches too. I "Wonder" if there's something we can do about that?
Deployment scripts generally take the split tar.gz's created by the
standard build.xml and scp them to a remote server using ssh where
dsa public/private keypairs remove the need to enter passwords. Then
the copied tar.gz's can be copied from one remote machine to all
other WO servers in the cluster and inflated and permissions can be
set.
Tim, I am sure there are other ways too to skin the cat.
Yeah, for sure. I am pretty manually doing exactly what you described
sans clusters. I really want to look into launchd watch paths on both
the dev machine and deployment server. With the proper keypairs it
seems that the rest could be accomplished automatically by hitting
particular directory targets.
Thanks for your input!!
Tim
HTH, Kieran
On Jun 24, 2009, at 9:59 PM, Tim Worman wrote:
All:
context: I've been wanting to start some threads on simple best
practices and maybe get involved in helping with the wiki. From my
own work, this seemed as good a place to start as any.
--------------
I have a project that is pretty recently moved to Wonder. From
searching list posting and blogs I have seen mentions of different
configurations of Properties files that Wonder will discover and
use for database connection stuff, etc. Some of them I hadn't seen
mention of elsewhere.
I've recently started using Properties.<username> for doing dev
work and keeping passwords in there (and away from my code
repository). However, I've also recently seen whisper of a
Properties.dev.
Two things I'd like to see:
1. a full concise list of what all the possible Properties files
(requiring Wonder or not) and also how the more experienced among
us leverage them. If it turns out there are some that don't have
great documentation I'll volunteer to update the wiki!!
2. It still seems to me that another Properties file must be
inserted at deployment for different db passwords, etc. How do the
veterans among handle this? I've seen some deployment scripts
around but haven't dug into that stuff yet. I still build very
locally and deploy very manually (scp). :-)
Tim
UCLA GSE&IS
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden