Hi Harsha,

On Wed, Jan 29, 2020 at 2:39 PM Harsha Kumara <[email protected]> wrote:

> 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?
>

*/wso2am-3.0.0/repository/resources/conf/deployment-templates/*  is the
location where the profile specific deployment.toml files are located.
The issue is that some users don't plan about profile optimization
initially, so do the configurations on the normal deployment.toml file.
In this case, users will have to merge our profile-specific deployment toml
file with their updated general deployment.toml file and place it into the
above mentioned path manually, before running the profile optimization.
Anyway the merge operation would be difficult and so it is then better to
ask user to forget about his configurations and redo them after doing the
profile optimization. Then this addition la new-option is not required.

But the objective of this effort is to allow users who has already done the
profile optimization steps in deployment.toml file, to run the optimization
script to execute the other optimization steps.
@Tharindu Dharmarathna <[email protected]> , @Pubudu Gunatilaka
<[email protected]> , @Bhathiya Jayasekara <[email protected]> I think this
is the original expectation according to the initial suggestion on this
matter.

Regards,
Samitha


> 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
>


-- 
*Samitha Chathuranga*
*Associate Technical Lead*, *WSO2 Inc.*
lean.enterprise.middleware
Mobile: +94715123761

[image: http://wso2.com/signature] <http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to