Open Closed

Best Way to Upgrade the ABP version for Micro Service Template #4926


User avatar
0
viswajwalith created
  • ABP Framework version: v5.1.3
  • UI type: MVC
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

We have a Micro Service Solution (UI, Auth and Services) up and running in ABP 5.1.3, Now we would like to upgrade to ABP 7.1.1.

Ideally we want only the UI layers upgraded to 7.1.1 and Services should run on older versions of ABP (assuming the Restful service can run on any technology or framework), but we had to reference some projects of Individual micro services (.Web.csproj and HttpApi.Client.csproj) in the UI layer(https://docs.abp.io/en/commercial/latest/startup-templates/microservice/add-microservice?_ga=2.92313949.1337259771.1681837669-324005759.1662462224#updating-administration-microservice) so we had to upgrade all other Micro Services to ABP 7.1.1 in order to do so, I feel this breaking the micro service based architecture or we mis managed this.

In Nutshell we want only Web Layers should be upgraded to ABP 7.1.1 and want other Micro Services will continue with ABP 5.1.3. Do you think it is possible? As of now we have created a Micro services with UI and referenced the same in Main UI layer, now do you think the Micro Services need to be created without UI to full fill the above requirement?

Please advise with best possible way to update to ABP 7.1.1 without touching the other Micro Services…


5 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    It's possible, but your web project should be completely independent and not refer to any service project.

    • Move all web pages of services to the web app.
    • Remove all service dependencies
    • Generate static proxy for the web app: https://docs.abp.io/en/abp/latest/CLI#options-6

    Generate static proxy for the web app: https://docs.abp.io/en/abp/latest/CLI#options-6

    We support this feature after 7.0.0, (It also requires that the service version is 7.0.0.) :https://github.com/abpframework/abp/issues/13613 But you can check changes of PR: https://github.com/abpframework/abp/pull/14429/files to customize your project

  • User Avatar
    0
    viswajwalith created

    Hi,

    It's possible, but your web project should be completely independent and not refer to any service project.

    • Move all web pages of services to the web app.
    • Remove all service dependencies
    • Generate static proxy for the web app: https://docs.abp.io/en/abp/latest/CLI#options-6

    Generate static proxy for the web app: https://docs.abp.io/en/abp/latest/CLI#options-6

    We support this feature after 7.0.0, (It also requires that the service version is 7.0.0.) :https://github.com/abpframework/abp/issues/13613 But you can check changes of PR: https://github.com/abpframework/abp/pull/14429/files to customize your project

    Thanks for the inputs, If we understand correctly we can have different versions of solutions if we move all web pages into web and remove all depended projects (web) from main UI layer. in this case we need to remove reference to contract layer as well?

    You mention We support this feature after 7.0.0, (It also requires that the service version is 7.0.0.) means this kind of approach will work only after having our entire project running on 7.0 and for future upgraded we can follow this way? please elaborate

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Thanks for the inputs, If we understand correctly we can have different versions of solutions if we move all web pages into web and remove all depended projects (web) from main UI layer. in this case we need to remove reference to contract layer as well? You mention We support this feature after 7.0.0, (It also requires that the service version is 7.0.0.) means this kind of approach will work only after having our entire project running on 7.0 and for future upgraded we can follow this way? please elaborate

    • You need to upgrade your project to at least 7.0.0.
    • Then delete all references to the services in the web app
    • Generate static proxy for web app, it will generate all required files, interfaces, DTO, etc.
  • User Avatar
    0
    viswajwalith created

    Thanks for the inputs, If we understand correctly we can have different versions of solutions if we move all web pages into web and remove all depended projects (web) from main UI layer. in this case we need to remove reference to contract layer as well? You mention We support this feature after 7.0.0, (It also requires that the service version is 7.0.0.) means this kind of approach will work only after having our entire project running on 7.0 and for future upgraded we can follow this way? please elaborate

    • You need to upgrade your project to at least 7.0.0.
    • Then delete all references to the services in the web app
    • Generate static proxy for web app, it will generate all required files, interfaces, DTO, etc.

    Hummm, In simple words at least for this time we need to upgrade all our projects with minimum of ABP 7.0.0 and may be in next upgrades we can decide to upgrade all projects to latest ABP version or just upgrade the specific projects by choice

    and what do u mean by "Generate static proxy for web app, it will generate all required files, interfaces, DTO, etc." means we need to generate static proxies for the Web Layer only right. no need to do the same for all micro service projects right.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Yes, since your web app project needs to remain independent, it should not depend on any service projects if you want to upgrade only the web app without upgrading other services

    In this case, you need to generate client proxies in the web app project.

    Static c# proxies currently depending on target service's application.contracts package, so they can reuse the DTOs and other related classes. However, that can be a problem when we want to create fully independently developed and deployed microservices. We want to use the static proxy generation even without depending target service's application.contracts package.

    More explanation:https://github.com/abpframework/abp/issues/13613

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15