UrbanCode

 View Only

Application configuration migration process

  • 1.  Application configuration migration process

    Posted Thu December 01, 2022 12:01 PM
    Hi,

    it is possible to run different versions of a component process? 

    The problem I am trying to solve is that we have different versions of a java application deployed to different environments. Sometimes when a new version of the java application is released we need to make some configuration changes (like adding new key-value pairs to properties file, removing/updating old pairs, clearing application cache because storage model has been updated, modifying startups script ...). I'd like to encapsulate these changes in a process that would run only when certain component version is deployed.

    For example if I have version 1.1 of the java application deployed in environment ENV1 and I want to deploy version 1.2 of the java application that has backwards in-compatible model change and needs to do application cache reload as part of this deployment. 
    Later when I want to deploy version 1.3 of the java application that is backwards compatible I don't want to do any application cache reload as that takes few hours to run.
    Now imagine another environment ENV2 where I have version 1.1 of the application deployed and I want to deploy version 1.3. In this case I want to deploy code 1.3 but I want to apply all configuration changes introduced between 1.1->1.2 (cache reload) and 1.2->1.3 (none).

    I am currently trying to solve it with a 'configuration migration component' that is only used to update configuration of the application from one version to the next. This component has no new version in case there is no configuration change (in my example this would be from 1.2 to 1.3). This component has version type of iterative and has only one artifact - a shell script that handles the configuration updates. 
    I am wondering if there is a better way than using a shell script - perhaps using versioned component processes? Perhaps you have better ideas?

    Thank you,
    Michal