oodt-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mattmann, Chris A (388J)" <chris.a.mattm...@jpl.nasa.gov>
Subject Re: Environment variables in config files
Date Fri, 22 Mar 2013 02:59:12 GMT
Hey Guys,

Maybe I can help here and it would be great to document on the wiki
(please) :)

One of the "load bearing walls" of OODT, is cas-metadta, and a nifty class
called PathUtils that I created a long time ago.


My original vision for PathUtils was for it to be a class that would use
OODT metadata
(from somewhere, the workflow manager, the file manager, met extractors
[client or server
side, etc.] to do environment variable replacement in paths). Logical or
physical paths, etc.

This originally helped in the Versioning interface within File Manager:


(see architecture diagram)



Eventually I found PathUtils could be used for all sorts of other things.
Mixing metadata based
replacement with environment variable replacement. Mixing that with full
paths in config files. Recursively doing
this, etc.

At that point we built a bunch of core stuff on it, and the way I wanted
to do environment variables was
using the '[' and ']' separators e.g., [ENV VAR NAME] expands to

Why didn't I use the dollar? I didn't want it to get confused with Maven
paths, and other paths (e.g., $ replacement
in Java regexs, etc.) This also existed way before Spring got popular and
started to deal with some of these
facilities. So general rule of thumb in OODT: Environment variable
replacement happens a lot of places. Most of the
properties in config files are env var replaceable by default (and if not
by default by adding envReplace="true" as an
attribute on the tag, etc.)

If there are specific questions or places you find it's not, suggest that
it should be and file a JIRA
issue and we can discuss.



On 3/21/13 5:06 PM, "Lewis John Mcgibbney" <lewis.mcgibbney@gmail.com>

>Hi Ryan,
>So can you please confirm if the environment variables are to be placed
>into the env.sh script?
>If so I will duly update the documentation on the wiki.
>Thank you very much
>On Thu, Mar 21, 2013 at 5:00 PM, Gerard, Ryan S. (GSFC-586.0)[SGT INC] <
>ryan.s.gerard@nasa.gov> wrote:
>> Thanks Lewis,
>> Yes, it appears OODT does support environment variables if put within
>> brackets.
>> For example, [ENV_VARIABLE_NAME] can be inserted into any xml config
>> and it will be deferenced.
>> Thanks for your reply.
>> Ryan
>> On 3/21/13 6:38 PM, "Lewis John Mcgibbney" <lewis.mcgibbney@gmail.com>
>> wrote:
>> >Hi Ryan,
>> >Please excuse if I am wrong, however I think (if you are doing as I am
>> >using the RADiX module and Maven archetype) then all environment
>> >should be set within [0] prior to building your project.
>> >I also found myself confused yesterday and spent a bit of time looking
>> >this.
>> >We need to document this somewhere as the definition of environment
>> >variables is critical but not very clear within the OODT documentation.
>> >If one of the OODT team can confirm or correct me then we can get such
>> >information at least logged.
>> >Thanks
>> >Lewis
>> >
>> >[0] *http://s.apache.org/pg*
>> >
>> >On Thu, Mar 21, 2013 at 3:13 PM, Gerard, Ryan S. (GSFC-586.0)[SGT INC]
>> >ryan.s.gerard@nasa.gov> wrote:
>> >
>> >> Is there a special OODT syntax to use environment variables in OODT?
>> >> thought I ran across something a while ago but perhaps its wasn't for
>> >> config files. I'm referring to files such as events.xml within
>> >>cas-workflow
>> >> and tasks.xml.
>> >>
>> >> Thanks,
>> >> Ryan
>> >>
>> >
>> >
>> >
>> >--
>> >*Lewis*

View raw message