- ABP Framework version: 8.0.3
- UI Type: Angular
- Database System: MongoDB
- Tiered (for MVC) yes or Auth Server Separated (for Angular): yes
- Steps to reproduce the issue: I need the exact steps to be followed to create a microservices solution in ABP. I have purchased the enterprise license and want to start devlopment on microservices asap.
13 Answer(s)
-
0
Hello,
please check this documentation https://docs.abp.io/en/commercial/latest/startup-templates/microservice/create-new-microservice
thanks,
-
0
I need to use MongoDB with microservices architecture but not able to get it. Used this command :
abp new Project1 -t microservice-pro -u angular -d mongodb
-
0
Hello,
Please check this for mongodb https://docs.abp.io/en/commercial/latest/guides/microservice-mongodb
thanks
-
0
Also there are few more things that I need help with :
- I need to use Azure Cosmos DB , so how do I need Mongo DB drivers to connect to Cosmos DB.
- I don't need to have an UI for my project as these will be only microservices. So how do I manage that?
- Where do I write down the Dtos, Entities and Interfaces? Inside the services project directly?
- Where do I write down the unit test cases for my APIs?
- How do I deploy these microservices?
Thanks in advance.
-
0
Hello,
I am trying to give answer per question as below -
please check https://community.abp.io/posts/using-cosmosdb-with-the-abp-framework-via-mongodb-api-x47bjeik
You can use below command in addition while creating project
--no-ui
: Specifies to not include the UI. This makes possible to create service-only modules (a.k.a. microservices - without UI).To write Dtos, Entities and interfaces you can refer tutorials given in documentation https://docs.abp.io/en/commercial/latest/tutorials/book-store/part-1?UI=NG&DB=Mongo from this link follow the backend code development and ignore Ui side development as you want to use no Ui template
For testing part refer https://docs.abp.io/en/commercial/latest/tutorials/book-store/part-4?UI=NG&DB=Mongo
For deployment you can refer https://docs.abp.io/en/abp/latest/Deployment/Distributed-Microservice
I hope your all questions have answered.
Thanks
-
0
For points 3 and 4 we do not have Domain, Application Contracts and Test solutions in Microservice template. So I am not sure whether do I put them?
Also when creating the project using microservice template , I am getting many errors while opening the project. e.g. Severity Code Description Project File Line Suppression State Error NU1105 Unable to find project information for . If you are using Visual Studio, this may be because the project is unloaded or not part of the current solution so run a restore from the command-line. Otherwise, the project file may be invalid or missing targets required for restore.
-
0
For points 3 and 4 we do not have Domain, Application Contracts and Test solutions in Microservice template. So I am not sure whether do I put them?
If it's a ABP Studio template ABP Studio's microservice template has single layer services (actually two layers: host and contracts but they named it single layer), it's designed to host modules. you should create your own modules and add their dependencies to the related services: YourModule.Application.Contracts -> YourService.Contracts YourModule.[DB_PROVIDER] & YourModule.HttpApi & YourModule.Application -> YourService YourService.Contracts & YourModule.HttpApi.Client & YourModule.Web -> apps/web
Also when creating the project using microservice template , I am getting many errors while opening the project.
you should build your solution via abp studio or run this command in these folders apps/authserver + apps/web + apps/public
dotnet build /graphbuild
-
0
Hello ,
For points 3 and 4 we do not have Domain, Application Contracts and Test solutions in Microservice template. So I am not sure whether do I put them?
For this point you can check this link https://docs.abp.io/en/abp/latest/Samples/Microservice-Demo#product-management
Thank you.
-
0
I tried to build the solution using dotnet build /graphbuild After that I am running the Administration Service and I am getting error for this after the project runs on browser: Please help me with the same.
Also, I have few other questions:
- How do we remove these by default services and add new ones according to my project? Any specific document for that?
- After passing noui as well in the command for project creation, still I get the we apps folder where Web solution is there.
Please help with the same.
-
0
Hello,
Have you followed all steps to run the application given here https://docs.abp.io/en/commercial/latest/startup-templates/microservice/get-started
once check in your DB whether database is created or not?
otherwise run
DBMigrator
Application.thanks
-
0
-
0
My project requirements are:
I need to have 4 to 10 API microservices and no web is required. For web we are having Angular as a separate solution.
We need to use Azure Cosmos DB. As per your document we are not having any mongo connection string provided in the azure. Just primary and secondary keys and connection string for Cosmos DB . We need your help in how do we connect to cosmos in our microservices. Refer to the image below for cosmos db configuration that I have:
We need to use client IDP server for authentication and authorization of API's.
We need to have more information on where and how to implement Unit testing .
Please help me in creating the solution with only these requirements. I do not need other features like RabbitMQ in my solution.
-
0
I need to have 4 to 10 API microservices and no web is required. For web we are having Angular as a separate solution.
You can create a microservice project with angular UI and remove you don't need some of them
We need to use Azure Cosmos DB. As per your document we are not having any mongo connection string provided in the azure. Just primary and secondary keys and connection string for Cosmos DB . We need your help in how do we connect to cosmos in our microservices. Refer to the image below for cosmos db configuration that I have:
Here is the Microsoft document about how to get the Cosmos db connection string: https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/connect-account#get-the-mongodb-connection-string-by-using-the-quick-start
We need to use client IDP server for authentication and authorization of API's.
I didn't get it.
We need to have more information on where and how to implement Unit testing .
ABP has a lot of examples for unit testing when you create the project, you can see unit test code in the solution
See also https://docs.abp.io/en/commercial/latest/tutorials/book-store/part-4?UI=NG&DB=EFhttps://docs.abp.io/en/abp/latest/UI/Angular/Testing https://community.abp.io/articles/unit-testing-with-the-angular-ui-p4l550q3
I do not need other features like RabbitMQ in my solution.
You can remove RabbitMQ related config from the solution without question.