Closed gtrianta1965 closed 7 years ago
I was thinking of something like this.
FileStream file = "";
List<String> confFileNames;
for (String aName : -conf){
confFileNames.add(aName);
}
if (confFileNames.length > 1){
for (String aConf : confFileNames){
file += println(aConf + "\n");
}
}
setConf(file);
Maybe it could be something to be added in the generic utils class or make a class called FileUtils and move all file functions from orchestrator to FileUtils.
I thought about a pathSeparator (-conf:....... : ...... : ....... )instead of writhing -conf:... -conf:.....
e.g.
System.out.println(File.pathSeparator);
File fileproperties= new File("tmp"+File.pathSeparator+getConfigFile());
resolved in branch readmultipleconfigfiles
Team,
It might be convinient for someone to seperate her services in different configuration files and wants to run all of them. Imagine the following:
Mary works in a company and monitors three different environments. The development, test and production. She has three seperate configuration files as she doesn't want to include them all in one config (Development environment sometimes is down).
But there are times that she would like to monitor all of them. She gave me a call yesterday and she asked me if it is possible to do it. I told her that she can merge all of them using an editor in another configuration file (e.g. dev-uat-prod-config.properties).
But this is a workaround as she will soon discover that everytime she changes one of the original configurations, another "merge" should be performed to include the newly added services. Otherwise the dev-uat-prod-config.properties will become obsolete.
So I thought that it would be a good idea to auto merge services from different configurations. For example:
sw -conf:dev-config.properties -conf:test-config.properties -conf:prod-config.properties -nogui
Give it a though