1 Reply Latest reply on Jan 9, 2009 6:54 AM by Bill Robinson

    using ??TARGET.HOST?? in configuration object dictionary



      We have a complex application running in multiple environments. The application is configured via a number of configuration files which may contain environment specific parameters.



      on host_1




      on host_2




      I would like to manage each config file (app1, app2) as configuration file in BL, and then define a component template containing all of the config files to compare config across environments, and within environments between releases etc. So, I have attempted to generically remove the environment specific aspects by defining

      a set of configuration files in the config dictionary as follows:

      /foo/bar/**??TARGET.HOST??.cfg (returns nothing)


      /foo/bar/app1/config/app1_??TARGET_HOST??.cfg (returns nothing)


      /foo/bar/**.cfg does return everything, but doesn't give me the environment-agnostic view I'm after.


      How can I combine properties and wildcards to give me the results I want?

      I can't find any documentation that even explains how '**' works (seems to recurse into sub directories and match anything with ending in .cfg)


      The number of applications and environments means it's not practical to do this any other way.


      Any thoughts?



        • 1. Re: using ??TARGET.HOST?? in configuration object dictionary
          Bill Robinson

          so could you represent this like:


          /foo/bar/??APPNAME??/config/??APPNAME??_??TARGET.HOST??.cfg ?


          So you should create a Component Template to describe your application, it will be better to put things here that in the global Config Object Dictionary.


          In the Template, define the discovery condition as /foo/bar/??APPNAME?? exists (or something that tells you an app is on the box)


          In the 'Local Properties' in the Template create a Property called 'APPNAME' - make it a string or string enumeration.


          Then, in the 'Local Properties' on the 'Instances' tab (something like that) create an instance for each application and set the 'APPNAME' appropriately (I don't think you can use 'NAME' because 'NAME' turns into something like ' '