Open Closed

Microservice project to use MongoDB or Microservice project using EF but ProductService using MongoDB #2367


User avatar
0
james@melvin.tech created

ABP Framework version:** v5.0.1 UI type**: MVC DB provider**: MongoDB Tiered (MVC) or Identity Server Separated (Angular)**: yes

I used the start-up microservices template to create a solution but the documents to migrate it to use MongoDB are not updated. They seem to be for 4.4.4 https://docs.abp.io/en/commercial/latest/guides/microservice-mongodb Is there any updated documentation on how to achieve this in v5. It would also be very helpful for myself and many others if Issue 1269 had a in depth explanation. We have multiple API's using mongoDB, we want to expose leveraging the same solution. https://support.abp.io/QA/Questions/1269/using-MongoDB-in-microservice-service-inside-microservice-solution-which-uses-efcore


3 Answer(s)
  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    You need to divide base MigrationEventHandler and MigrationsChecker. You can check eShopOnAbp sample to see how.

  • User Avatar
    0
    james@melvin.tech created

    Thanks for the pointer. At this point, I'm simply trying to get the entire solution running with the commercial template in MongoDB. For clarity, ill mention each step. I ran the following command. abp new TestApi -t microservice-pro -u mvc The solution is created. I then navigated to etc\docker after i signed all the ps1files and ran up.ps1. All containers are created and show in docker desktop. I then built the solution by navigating to the solution root and running dotnet build. It completes with "Build succeeded." I then ran .\run-tye.ps1 As i have a valid HTTPS certificate that is already present, it prints this out. I checked each link and it loads the relavant site or swagger. I navigated to http://localhost:15672/#/connections and all connections are running and there are 9 Queues. If i navigate to http://localhost:9200/ it shows me the json.

    The next part gets confusing. I navigated to http://localhost:5601/ which then gives me some options. Looking at the documentation from https://docs.abp.io/en/commercial/latest/startup-templates/microservice/infrastructure the image shows the discover tab so i navigated to that tab. Nothing is logged so i checked http://localhost:9090/targets in Prometheusand it shows the following. Basically all the sites say Get "https://administration-service:443/metrics": context deadline exceeded etc The documentation says "If you are not running the solution on docker, you may have to change the prometheus static_config targets such as -targets: ['auth-server'] to -targets: ['host.docker.internal:44322']" BUT i am running docker.

    As such i cant get the solution working with logging before even attempting to migrate to MongoDB. Thanks James PS The original question still stands in that the documentation at https://docs.abp.io/en/commercial/latest/guides/microservice-mongodb is for 4.4.4 not 5.0.1

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    You probably forgot to add index testapi-log-2022.01. ElasticSearch, Prometheus and such are 3rd party applications and as much as we try to help configuring, their configuration is unrelated to abp. Hence, it is better to search for google or ask in stackoverflow about specific 3rd party questions which can return results faster.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11