views:

18

answers:

1

Hi All!

I think in our project we have the common problem for really big projects... We have 4 regions in which our system is installed - Europe, USA, ASIA and Japan.. Each region has 3 types of environment - dev, test and prod. For each environment we have property file where we are specifying configurations for instances. In whole we have now 12 files with huge amount of properties. The problem is that it is very hard to handle changes in properties files and manage them. Does anybody know any tool that could help to edit/add/delete properties with minimal manual work?

Thank you! Best Regards, Yuliya

A: 

You could manage this using version controlled template and substitution files.

A template file would contain all properties, with markers for values to be substituted

  some.property.never.changes=Literal value
  some.property.which.changes=--A_SUBSTITUTION_KEY--
  another.property.never.changes=Literal value
  another.property.which.changes=--ANOTHER_SUBSTITUTION_KEY--

A substitution file would contain substitution values for a particular instance

  A_SUBSTITUTION_KEY=A literal value
  ANOTHER_SUBSTITUTION_KEY=Another literal value

Easy to merge substitution values into template creating a new file using build tool such as Ant.

You could choose to version control just the template and substitution files, or you could choose to version control the merged output files.

sudocode