Aren't there any place where we can place the profile specific deployment.toml which tool eventually replace it rather than giving a separate option?
On Wed, Jan 29, 2020 at 2:29 PM Samitha Chathuranga <[email protected]> wrote: > Hi all, > > Our profile optimization [1] script for 3.0.0 replaces [2] already > available deployment.toml with a per-profile specific updated/optimized > toml file. (i.e. api-devportal.toml, gateway-worker.toml, etc.). This > process affects already configured setups, to lose the configurations. > > A user running the profile optimization might follow two approaches. > > 1. Run profile optimization on a vanilla pack. > - So no any configurations done when the profile optimization is > executed > 2. Run profile optimization on a configured pack. > - User/deployment specific configurations are already done in the > deployment.toml file and user run the profile optimization after that. > > There is no any issue with the Approach-1. But the Approach-2 results in > the above mentioned issue. A user might have made all his configurations in > the deployment.toml file. But once the profile optimization is executed, he > will lose all those config changes. > > So the suggested solution is to pass an argument/option when we run the > optimizing script, which decides whether to replace the deployment.toml or > not. > > sh <PRODUCT_HOME>/bin/wso2server.sh --optimize *--<new-option> > *-Dprofile=api-publisher > > In this case, we have to assume(and mandate) that user has manually > applied the profile optimization related configurations too, into the > deployment.toml file while doing the other configurations. So if the "new > option" decides not to override the deployment.toml file, the profile > optimization steps other than deployment.toml changes will be applied. > > So we have two concerns on how we use this new option. > > *What is the ideal name for the new option (<new-option>)?* > Suggestions: --override, --overrideConfig > > *What is the default behavior of the new option?* > - What is the default behavior if the new option is not passed when > running the optimization.? > - Should it override the user-made configs with the profile-specific > deployment toml or not? > - Concerns: > - If override the toml, users manual configs will be completely > removed (may be unknowlingly too). > - If do not override toml, the profile optimization will be done > incompletely. Anyway we can echo a message conveying that the deployment > toml was not overridiiden. > > Appreciate your input on this. > > [1] > https://apim.docs.wso2.com/en/next/SetupAndInstall/DeployingWSO2APIManager/DistributedDeployment/product-profiles/ > [2] > https://github.com/wso2/product-apim/blob/master/modules/distribution/product/src/main/startup-scripts/profileSetup.sh#L302 > > Thanks, > Samitha > > -- > *Samitha Chathuranga* > *Associate Technical Lead*, *WSO2 Inc.* > lean.enterprise.middleware > Mobile: +94715123761 > > [image: http://wso2.com/signature] <http://wso2.com/signature> > -- *Harsha Kumara* Technical Lead, WSO2 Inc. Mobile: +94775505618 Email: [email protected] Blog: harshcreationz.blogspot.com GET INTEGRATION AGILE Integration Agility for Digitally Driven Business
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
