Project: springxd
Issue XD-1371: Clarify API or syntax for managing deployment parameters
Suppose we have 3 environements of Spring XD : - Dev environment - Test environment - Prod environement ( Suppose whe develop the script bellow: ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// stream1 = http | filter --expression=payload.contains('toto') | file --dir=/tmp/toto stream2 = http | filter --expression=payload.contains('titi') | file --dir=/tmp/titi ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// When we need to deploy the script in Test and Prod environements , we must modify "dir" option of "file" sink. This is very easy when there is not a lot of options and when we have a small factory team. But in a big factory environment this will be problematic. In order to industrialize deployment, it would be convenient to implement in DSL a directory interface API or something equivalent like below: Suppose we call this directory interface XDDI ... like "XD Directory Interface" :-) The script can be like that: ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// stream1 = http | filter --expression=payload.contains('toto') | file --dir=XDDI('totoKey') stream2 = http | filter --expression=payload.contains('titi') | file --dir=XDDI('titiKey') ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// The XDDI keys are defined in a centralized directory interface (admin console or XDDI.properties) The XDDI keys/values in Dev environment: ///////////////////////////////////// totoKey=/tmp/toto titiKey=/tmp/titi ///////////////////////////////////// The XDDI keys/values in Test environment: ////////////////////////////////////////// totoKey=/tartempion/toto titiKey=/petaouchnok/titi ///////////////////////////////////////// The XDDI keys/values in Prod environment: ///////////////////////////////////////////////////// totoKey=/vavoirlabasijysuis/toto titiKey=/vavoirlabasijysuis/titi ///////////////////////////////////////////////////// When the script is deployed in Test or Prod environement, if the script contain a key that is not defined in centralized directory, the deployment fail. This will reduce errors risks in a big factory environnement (several hundred parameters and signifiant team turnover).
Story points: 3