Browse Source

Merge pull request #24471 from abpframework/berkan/aspire-doc

Add documentation for .NET Aspire option in Microservice Template
pull/24472/head
Engincan VESKE 1 month ago
committed by GitHub
parent
commit
939041609e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      docs/en/docs-nav.json
  2. 4
      docs/en/framework/architecture/multi-tenancy/index.md
  3. 2
      docs/en/framework/fundamentals/dependency-injection.md
  4. 4
      docs/en/framework/fundamentals/exception-handling.md
  5. 2
      docs/en/framework/fundamentals/validation.md
  6. 2
      docs/en/framework/infrastructure/audit-logging.md
  7. 2
      docs/en/framework/infrastructure/background-workers/hangfire.md
  8. 2
      docs/en/framework/infrastructure/background-workers/quartz.md
  9. 2
      docs/en/framework/infrastructure/current-user.md
  10. 4
      docs/en/framework/infrastructure/emailing.md
  11. 2
      docs/en/framework/infrastructure/settings.md
  12. BIN
      docs/en/get-started/images/abp-studio-new-microservice-solution-dialog-optional-modules.png
  13. BIN
      docs/en/get-started/images/abp-studio-new-microservice-solution-dialog-properties.png
  14. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-additional-options-microservice.png
  15. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-additional-services.png
  16. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-aspire-configuration-microservice.png
  17. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-database-configurations-microservice.png
  18. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-database-provider-microservice.png
  19. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-dynamic-localization.png
  20. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-languages-microservice.png
  21. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-microservice.png
  22. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-mobile-framework-microservice.png
  23. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-multi-tenancy.png
  24. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-public-web-site.png
  25. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-ui-framework-microservice.png
  26. BIN
      docs/en/get-started/images/abp-studio-new-solution-dialog-ui-theme-microservice.png
  27. 19
      docs/en/get-started/microservice.md
  28. 2
      docs/en/modules/account/impersonation.md
  29. 2
      docs/en/modules/ai-management/index.md
  30. 2
      docs/en/modules/saas.md
  31. 372
      docs/en/solution-templates/microservice/aspire-integration.md
  32. 4
      docs/en/solution-templates/microservice/helm-charts-and-kubernetes.md
  33. BIN
      docs/en/solution-templates/microservice/images/aspire-apphost-topology.png
  34. BIN
      docs/en/solution-templates/microservice/images/aspire-configuration.png
  35. BIN
      docs/en/solution-templates/microservice/images/aspire-dashboard-console.png
  36. BIN
      docs/en/solution-templates/microservice/images/aspire-dashboard-login.png
  37. BIN
      docs/en/solution-templates/microservice/images/aspire-dashboard-metrics.png
  38. BIN
      docs/en/solution-templates/microservice/images/aspire-dashboard-resources.png
  39. BIN
      docs/en/solution-templates/microservice/images/aspire-dashboard-structured-logs.png
  40. BIN
      docs/en/solution-templates/microservice/images/aspire-dashboard-traces.png
  41. BIN
      docs/en/solution-templates/microservice/images/aspire-database-postgre-pgadmin.png
  42. BIN
      docs/en/solution-templates/microservice/images/aspire-grafana-dashboard.png
  43. BIN
      docs/en/solution-templates/microservice/images/aspire-jaeger-traces.png
  44. BIN
      docs/en/solution-templates/microservice/images/aspire-kibana-dashboard.png
  45. BIN
      docs/en/solution-templates/microservice/images/aspire-prometheus-dashboard.png
  46. BIN
      docs/en/solution-templates/microservice/images/aspire-rabbitmq-management.png
  47. BIN
      docs/en/solution-templates/microservice/images/aspire-redis-insight.png
  48. BIN
      docs/en/solution-templates/microservice/images/aspire-solution-structure.png
  49. BIN
      docs/en/solution-templates/microservice/images/solution-runner-aspire-profile.png
  50. BIN
      docs/en/solution-templates/microservice/images/solution-runner-default-profile.png

4
docs/en/docs-nav.json

@ -2290,6 +2290,10 @@
"text": "Helm Charts and Kubernetes",
"path": "solution-templates/microservice/helm-charts-and-kubernetes.md"
},
{
"text": ".NET Aspire Integration",
"path": "solution-templates/microservice/aspire-integration.md"
},
{
"text": "Guides",
"items": [

4
docs/en/framework/architecture/multi-tenancy/index.md

@ -47,7 +47,7 @@ ABP supports all the following approaches to store the tenant data in the databa
- **Database per Tenant**: Every tenant has a separate, dedicated database to store the data related to that tenant.
- **Hybrid**: Some tenants share a single database while some tenants may have their own databases.
[Saas module (PRO)](../../../modules/saas.md) allows you to set a connection string for any tenant (as optional), so you can achieve any of the approaches.
[SaaS module (PRO)](../../../modules/saas.md) allows you to set a connection string for any tenant (as optional), so you can achieve any of the approaches.
> You can see the community article *[Multi-Tenancy with Separate Databases in .NET and ABP Framework](https://abp.io/community/articles/multitenancy-with-separate-databases-in-dotnet-and-abp-51nvl4u9)* for more details about different database architectures with practical implementation details.
@ -466,7 +466,7 @@ The [Tenant Management module](../../../modules/tenant-management.md) provides a
### A note about separate database per tenant approach in open source version
While ABP fully supports this option, managing connection strings of tenants from the UI is not available in open source version. You need to have [Saas module (PRO)](../../../modules/saas.md).
While ABP fully supports this option, managing connection strings of tenants from the UI is not available in open source version. You need to have [SaaS module (PRO)](../../../modules/saas.md).
Alternatively, you can implement this feature yourself by customizing the tenant management module and tenant application service to create and migrate the database on the fly.
## See Also

2
docs/en/framework/fundamentals/dependency-injection.md

@ -264,7 +264,7 @@ public class TaxAppService : ApplicationService
``TaxAppService`` gets ``ITaxCalculator`` in its constructor. The dependency injection system automatically provides the requested service at runtime.
Constructor injection is preffered way of injecting dependencies to a class. In that way, the class can not be constructed unless all constructor-injected dependencies are provided. Thus, the class explicitly declares it's required services.
Constructor injection is preferred way of injecting dependencies to a class. In that way, the class can not be constructed unless all constructor-injected dependencies are provided. Thus, the class explicitly declares it's required services.
### Property Injection

4
docs/en/framework/fundamentals/exception-handling.md

@ -88,7 +88,7 @@ Error **details** in an optional field of the JSON error message. Thrown `Except
}
````
`AbpValidationException` implements the `IHasValidationErrors` interface and it is automatically thrown by the framework when a request input is not valid. So, usually you don't need to deal with validation errors unless you have higly customised validation logic.
`AbpValidationException` implements the `IHasValidationErrors` interface and it is automatically thrown by the framework when a request input is not valid. So, usually you don't need to deal with validation errors unless you have highly customized validation logic.
### Logging
@ -289,7 +289,7 @@ The `IHttpExceptionStatusCodeFinder` is used to automatically determine the HTTP
### Custom Mappings
Automatic HTTP status code determination can be overrided by custom mappings. For example:
Automatic HTTP status code determination can be overridden by custom mappings. For example:
````C#
services.Configure<AbpExceptionHttpStatusCodeOptions>(options =>

2
docs/en/framework/fundamentals/validation.md

@ -121,7 +121,7 @@ namespace Acme.BookStore
#### Enabling/Disabling Validation
You can use the `[DisableValidation]` to disable it for methods, classs and properties.
You can use the `[DisableValidation]` to disable it for methods, classes and properties.
````csharp
[DisableValidation]

2
docs/en/framework/infrastructure/audit-logging.md

@ -215,7 +215,7 @@ public class MyUser : Entity<Guid>
public string Email { get; set; }
[DisableAuditing] //Ignore the Passoword on audit logging
[DisableAuditing] //Ignore the Password on audit logging
public string Password { get; set; }
}
````

2
docs/en/framework/infrastructure/background-workers/hangfire.md

@ -61,7 +61,7 @@ After you have installed these NuGet packages, you need to configure your projec
var configuration = context.Services.GetConfiguration();
var hostingEnvironment = context.Services.GetHostingEnvironment();
//... other configarations.
//... other configurations.
ConfigureHangfire(context, configuration);
}

2
docs/en/framework/infrastructure/background-workers/quartz.md

@ -43,7 +43,7 @@ public class YourModule : AbpModule
}
````
> Quartz background worker integration provided `QuartzPeriodicBackgroundWorkerAdapter` to adapt `PeriodicBackgroundWorkerBase` and `AsyncPeriodicBackgroundWorkerBase` derived class. So, you can still fllow the [background workers document](../background-workers) to define the background worker.
> Quartz background worker integration provided `QuartzPeriodicBackgroundWorkerAdapter` to adapt `PeriodicBackgroundWorkerBase` and `AsyncPeriodicBackgroundWorkerBase` derived class. So, you can still follow the [background workers document](../background-workers) to define the background worker.
## Configuration

2
docs/en/framework/infrastructure/current-user.md

@ -101,7 +101,7 @@ For a web application, it gets the `User` property of the current `HttpContext`.
### Basic Usage
You can inject `ICurrentPrincipalAccessor` and use the `Principal` property to the the current principal:
You can inject `ICurrentPrincipalAccessor` and use the `Principal` property to get the current principal:
````csharp
public class MyService : ITransientDependency

4
docs/en/framework/infrastructure/emailing.md

@ -235,7 +235,7 @@ The final rendered message was shown above.
You typically want to replace the standard templates with your own ones, so you can prepare a branded email messages. To do that, you can use the power of the [virtual file system](../infrastructure/virtual-file-system.md) (VFS) or replace them in your own template definition provider.
Pathes of the templates in the virtual file system are shown below:
Paths of the templates in the virtual file system are shown below:
* `/Volo/Abp/Emailing/Templates/Layout.tpl`
* `/Volo/Abp/Emailing/Templates/Message.tpl`
@ -250,7 +250,7 @@ See the [text templating system](./text-templating) document for details.
## NullEmailSender
`NullEmailSender` is a built-in class that implements the `IEmailSender`, but writes email contents to the [standard log system](../fundamentals/logging.md), rathen than actually sending the emails.
`NullEmailSender` is a built-in class that implements the `IEmailSender`, but writes email contents to the [standard log system](../fundamentals/logging.md), rather than actually sending the emails.
This class can be useful especially in development time where you generally don't want to send real emails. The [application startup template](../../solution-templates/layered-web-application) already uses this class in the **DEBUG mode** with the following configuration in the domain layer:

2
docs/en/framework/infrastructure/settings.md

@ -43,7 +43,7 @@ ABP automatically discovers this class and registers the setting definitions.
* **DefaultValue**: A setting may have a default value.
* **DisplayName**: A localizable string that can be used to show the setting name on the UI.
* **Description**: A localizable string that can be used to show the setting description on the UI.
* **IsVisibleToClients**: A boolean value indicates that whether this setting value is available in the client side or not. Default value is false to prevent accidently publishing an internal critical setting value.
* **IsVisibleToClients**: A boolean value indicates that whether this setting value is available in the client side or not. Default value is false to prevent accidentally publishing an internal critical setting value.
* **IsInherited**: A boolean value indicates that whether this setting value is inherited from other providers or not. Default value is true and fallbacks to the next provider if the setting value was not set for the requested provider (see the setting value providers section for more).
* **IsEncrypted**: A boolean value indicates that whether this setting value should be encrypted on save and decrypted on read. It makes possible to secure the setting value in the database.
* **Providers**: Can be used to restrict providers available for a particular setting (see the setting value providers section for more).

BIN
docs/en/get-started/images/abp-studio-new-microservice-solution-dialog-optional-modules.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 24 KiB

BIN
docs/en/get-started/images/abp-studio-new-microservice-solution-dialog-properties.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 27 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-additional-options-microservice.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 34 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-additional-services.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 26 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-aspire-configuration-microservice.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-database-configurations-microservice.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 20 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-database-provider-microservice.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 24 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-dynamic-localization.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 30 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-languages-microservice.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-microservice.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 41 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-mobile-framework-microservice.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 30 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-multi-tenancy.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 28 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-public-web-site.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 25 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-ui-framework-microservice.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 51 KiB

BIN
docs/en/get-started/images/abp-studio-new-solution-dialog-ui-theme-microservice.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 28 KiB

19
docs/en/get-started/microservice.md

@ -94,6 +94,25 @@ Once you select the desired modules, click the *Next* button for the *UI Theme*
LeptonX is the suggested UI theme that is proper for production usage. Select one of the themes and configure the additional options if you want.
Click the Next button to see *Language Selection* selection:
![abp-studio-new-solution-dialog-languages](images/abp-studio-new-solution-dialog-languages-microservice.png)
In this step, you can choose which languages your application will support.
* Default Language: Select the main language for your app.
* Localizable User Interface: Turn this on to support multiple languages.
* Available Languages: Check the languages you want to include.
* Click Add Custom Language if you want to add a language that is not listed.
Click the Next button to see *.NET Aspire* configuration selection:
![abp-studio-new-solution-dialog-aspire-configuration](images/abp-studio-new-solution-dialog-aspire-configuration-microservice.png)
In this step, you can enable or disable the .NET Aspire integration for your solution. If you enable it, the solution will be pre-configured to work with .NET Aspire for easier microservice development and deployment. See the [Aspire Integration](../solution-templates/microservice/aspire-integration.md) document for more information about this feature.
Click the Next button to see *Additional Options* selection:

2
docs/en/modules/account/impersonation.md

@ -7,7 +7,7 @@
# Tenant impersonation & User impersonation
User impersonation allows you to temporarily sign in as a different user in your tenant's users. This article introduces how to enable impersonation in ABP. Impersonation is enabled by defautl in ABP v5.0 and above.
User impersonation allows you to temporarily sign in as a different user in your tenant's users. This article introduces how to enable impersonation in ABP. Impersonation is enabled by default in ABP v5.0 and above.
## Introduction

2
docs/en/modules/ai-management/index.md

@ -599,7 +599,7 @@ chatComponent.off('messageSent', callbackFunction);
## Using Dynamic Workspace Configurations for custom requirements
The AI Management module allows you to access only configuration of a workspace without resolving pre-constructed chat client. This is useful when you want to use a workspace for your own purposes and you don't need to use the chat client.
The `IWorkspaceConfigurationStore` service is used to access the configuration of a workspace. It has multiple implementaations according to the usage scenario.
The `IWorkspaceConfigurationStore` service is used to access the configuration of a workspace. It has multiple implementations according to the usage scenario.
```csharp
public class MyService

2
docs/en/modules/saas.md

@ -40,7 +40,7 @@ Firstly, Payment module must be configured properly:
```bash
abp add-module Volo.Payment
```
_Or you can install via using ABP Suite._
_Or you can install via using ABP Studio._
- Configure Saas module to use Payment.

372
docs/en/solution-templates/microservice/aspire-integration.md

@ -0,0 +1,372 @@
```json
//[doc-seo]
{
"Description": "Learn how to integrate .NET Aspire into your ABP-based solution for streamlined development, orchestration, and observability of distributed applications."
}
```
# .NET Aspire Integration
````json
//[doc-nav]
{
"Next": {
"Name": "Miscellaneous guides in the Microservice solution",
"Path": "solution-templates/microservice/guides"
}
}
````
> You must have an ABP Business or a higher license to be able to create a microservice solution.
## .NET Aspire Overview
[Aspire](https://aspire.dev/get-started/what-is-aspire/) streamlines building, running, debugging, and deploying distributed apps. Picture your app as a set of services, databases, and frontends—when they’re deployed, they all work together seamlessly, but every time you develop them they need to be individually started and connected. With Aspire, you get a unified toolchain that eliminates complex configs and makes local debugging effortless. Instantly launch and debug your entire app with a single command. Ready to deploy? Aspire lets you publish anywhere—Kubernetes, the cloud, or your own servers. It’s also fully extensible, so you can integrate your favorite tools and services with ease. It provides:
- **Orchestration**: A code-first approach to defining and running distributed applications, managing dependencies, and launch order.
- **Integrations**: Pre-built components for common services (databases, caches, message brokers) with automatic configuration.
- **Tooling**: A developer dashboard for real-time monitoring of logs, traces, metrics, and resource health.
- **Service Discovery**: Automatic service-to-service communication without hardcoded endpoints.
- **Observability**: Built-in OpenTelemetry support for distributed tracing, metrics, and structured logging.
## ABP Integration
When you enable .NET Aspire in an ABP microservice solution, you get a fully integrated development experience where:
- All microservices, gateways, and applications are orchestrated through a single entry point (AppHost).
- Infrastructure containers (databases, Redis, RabbitMQ, Elasticsearch, etc.) are managed as code.
- OpenTelemetry, health checks, and service discovery are automatically configured for all projects via the shared ServiceDefaults project.
## Enabling Aspire
When creating a new microservice solution via ABP Studio:
1. In the solution creation wizard, look for the **".NET Aspire Integration"** step.
2. Toggle the option to **enable .NET Aspire**.
3. Complete the wizard—Aspire projects will be generated along with your solution.
![Enable Aspire in ABP Studio](images/aspire-configuration.png)
## Solution Structure Changes
When Aspire is enabled, two additional projects are added to your solution:
![Aspire Solution Structure](images/aspire-solution-structure.png)
### AppHost (Orchestrator)
[`AppHost`](https://aspire.dev/get-started/app-host/) is the .NET Aspire orchestrator project that declares all resources (services, databases, containers, applications) and their dependencies in C# code. All services, gateways, and applications in the solution have their project references added to `AppHost`.
**Why is it added?**
- Centralized orchestration: Start your entire microservice ecosystem with a single command.
- Code-first infrastructure: Databases, Redis, RabbitMQ, Elasticsearch, and observability tools are defined programmatically.
- Dependency management: `AppHost` ensures services start in the correct order using `WaitFor()` declarations.
- Automatic configuration: Connection strings, endpoints, and environment variables are injected automatically.
**Key files in AppHost:**
| File | Purpose |
|------|---------|
| `AppHost.cs` | Entry point—creates the distributed application builder and adds all resources |
| `AppHostExtensions.cs` | Extension methods for adding infrastructures, databases, microservices, gateways, and applications |
**What it manages:**
- Database servers (SQL Server, PostgreSQL, MySQL, or MongoDB)
- Per-service databases
- Redis (caching)
- RabbitMQ (messaging)
- Elasticsearch + Kibana (logging)
- Prometheus + Grafana (metrics)
- Jaeger (tracing)
- OpenTelemetry Collector
- All microservices, gateways, and web applications
![Aspire AppHost Resource Topology](images/aspire-apphost-topology.png)
### ServiceDefaults
[`ServiceDefaults`](https://aspire.dev/fundamentals/service-defaults/) is a shared library that provides common cloud-native configuration for all projects in the solution. The `ServiceDefaults` project reference is added to all services, gateways, and applications in the solution.
**Why is it added?**
- Consistency: Every service uses the same observability, health check, and resilience patterns.
- Less boilerplate: Add `builder.AddServiceDefaults()` once, get all defaults automatically.
- Production-ready: OpenTelemetry, health endpoints, and HTTP resilience are preconfigured.
**What it provides:**
| Feature | Description |
|---------|-------------|
| OpenTelemetry | Tracing, metrics, and structured logging with automatic instrumentation |
| Health Checks | `/health` and `/alive` endpoints for Kubernetes-style probes |
| Service Discovery | Automatic resolution of service endpoints |
| HTTP Resilience | Retry policies, timeouts, and circuit breakers for HTTP clients |
**Usage example:**
```csharp
var builder = WebApplication.CreateBuilder(args);
builder.AddServiceDefaults(); // Adds all cloud-native defaults
// ... rest of configuration
```
## Running the Solution
### Without Aspire
1. Open **Solution Runner** in ABP Studio.
2. Start all resources in Solution Runner (services, gateways, applications, and tools such as databases, Redis, RabbitMQ, etc.) individually or collectively using the `Default` profile.
![Solution Runner without Aspire](images/solution-runner-default-profile.png)
### With Aspire
1. Open **Solution Runner** in ABP Studio.
2. Select the **Aspire** profile.
3. Run `MyCompanyName.MyProjectName.AppHost`.
4. AppHost automatically:
- Starts all infrastructure containers (database, Redis, RabbitMQ, Elasticsearch, etc.).
- Launches all microservices, gateways, and applications in dependency order.
- Injects connection strings and environment variables.
- Opens the Aspire Dashboard for monitoring.
![Solution Runner with Aspire](images/solution-runner-aspire-profile.png)
## Aspire Dashboard
The dashboard enables real-time tracking of key aspects of your app, including logs, traces, and environment configurations. It's designed to enhance the development experience by providing a clear and insightful view of your app's state and structure.
Key features of the dashboard include:
- Real-time tracking of logs, traces, and environment configurations.
- User interface to stop, start, and restart resources.
- Collects and displays logs and telemetry; view structured logs, traces, and metrics in an intuitive UI.
- Enhanced debugging with GitHub Copilot, your AI-powered assistant built into the dashboard.
### Opening the Dashboard
When AppHost starts, the Aspire Dashboard opens automatically in ABP Studio's built-in browser at `https://localhost:15105`. Alternatively, you can right-click on AppHost in Solution Runner and select **Browse** to open it manually.
![Aspire Dashboard Login](images/aspire-dashboard-login.png)
**Dashboard login token**: `1q2w3E*` (default, configurable via launch settings)
### Dashboard Features
The dashboard includes several tabs, each offering different insights into your application:
#### Resources
View the status of all resources in your application, including projects, containers, and executables. Monitor health checks, view environment variables, and access endpoints for each resource.
![Aspire Dashboard Resources Tab](images/aspire-dashboard-resources.png)
#### Console
Display console logs from all resources in real-time. Filter by resource and log level to quickly find relevant information during development and debugging.
![Aspire Dashboard Console Tab](images/aspire-dashboard-console.png)
#### Structured Logs
View structured logs from all resources with advanced filtering capabilities. Search and filter logs by resource, log level, timestamp, and custom properties to diagnose issues efficiently.
![Aspire Dashboard Structured Logs Tab](images/aspire-dashboard-structured-logs.png)
#### Traces
Explore distributed traces across your microservices to understand request flows and identify performance bottlenecks. Visualize how requests propagate through different services and examine timing information.
![Aspire Dashboard Traces Tab](images/aspire-dashboard-traces.png)
#### Metrics
Monitor real-time metrics including HTTP requests, response times, garbage collection, memory usage, and custom metrics. Visualize metric trends with interactive charts to understand application performance.
![Aspire Dashboard Metrics Tab](images/aspire-dashboard-metrics.png)
## Tools and Their Management UIs
AppHost pre-configures the following observability and tools. The URLs below are for their **management/dashboard interfaces** (these tools may expose additional internal endpoints for service communication).
All URLs and configurations are defined in the `AppHost` project. If you need to change ports or other settings, you can modify them in the `AppHost` project.
After running AppHost, you can access these tools either by opening the URLs directly in your browser or via Solution Runner **Tools** tab.
### Database Management System Admin Tool
The database management admin tool varies by database type:
| Database | Tool | URL |
|----------|------|-----|
| SQL Server | DBeaver CloudBeaver | `http://localhost:8081` |
| MySQL | phpMyAdmin | `http://localhost:8082` |
| PostgreSQL | pgAdmin | `http://localhost:8083` |
| MongoDB | Mongo Express | `http://localhost:8084` |
For example, if using PostgreSQL, access **pgAdmin** at `http://localhost:8083` or via Solution Runner Tools tab:
![pgAdmin Dashboard](images/aspire-database-postgre-pgadmin.png)
### Grafana
**URL**: `http://localhost:3001`
**Credentials**: `admin` / `admin`
Grafana is a visualization and analytics platform for monitoring metrics. It provides interactive dashboards with charts and graphs for tracking application performance.
![Grafana Dashboard](images/aspire-grafana-dashboard.png)
### Jaeger
**URL**: `http://localhost:16686`
**Credentials**: No authentication required
Jaeger is a distributed tracing system to monitor and troubleshoot problems on interconnected software components called microservices.
![Jaeger Traces](images/aspire-jaeger-traces.png)
### Kibana
**URL**: `http://localhost:5601`
**Credentials**: No authentication required
Kibana is a visualization tool for Elasticsearch data. It provides search and data visualization capabilities for logs stored in Elasticsearch.
![Kibana Dashboard](images/aspire-kibana-dashboard.png)
### Prometheus
**URL**: `http://localhost:9090`
**Credentials**: No authentication required
Prometheus is a monitoring and alerting toolkit. It collects and stores metrics as time series data, allowing you to query and analyze application performance.
![Prometheus Dashboard](images/aspire-prometheus-dashboard.png)
### RabbitMQ Management
**URL**: `http://localhost:15672`
**Credentials**: `guest` / `guest`
RabbitMQ Management UI provides a web-based interface for managing and monitoring RabbitMQ message broker, including queues, exchanges, and message flows.
![RabbitMQ Management](images/aspire-rabbitmq-management.png)
### Redis Insight
**URL**: `http://localhost:5540`
**Credentials**: No authentication required
Redis Insight is a visual tool for Redis that allows you to browse data, run commands, and monitor Redis performance.
![Redis Insight](images/aspire-redis-insight.png)
## Adding New Services, Gateways, or Applications
When you add a new microservice, gateway, or application via **ABP Studio**:
1. `AppHost` is updated automatically - the new project is registered as a resource with appropriate configurations.
2. `ServiceDefaults` is referenced - the new project gets cloud-native defaults.
> You don't need to manually edit `AppHost` in most cases.
## Adding a Resource Manually
If you need to add a resource manually (not via **ABP Studio**), follow these steps:
### 1. Reference ServiceDefaults in your new project
```xml
<ProjectReference Include="..\..\..\aspire\service-defaults\MyCompanyName.MyProjectName.ServiceDefaults\MyCompanyName.MyProjectName.ServiceDefaults.csproj" />
```
> Adjust the path as necessary based on your solution structure.
### 2. Add ServiceDefaults in Program.cs
```csharp
var builder = WebApplication.CreateBuilder(args);
builder.AddServiceDefaults();
// ... your configuration
```
### 3. Add Project Reference to AppHost
Add a reference to your resource project in `MySolutionName.MyProjectName.AppHost/MySolutionName.MyProjectName.AppHost.csproj`:
```xml
<ProjectReference Include="..\..\services\myresource\src\MySolutionName.MyProjectName.MyResource\MySolutionName.MyProjectName.MyResource.csproj" />
```
### 4. Register Resource in AppHost
Edit `AppHostExtensions.cs` and add your resource in the `AddAdditionalResources` method:
```csharp
var myResource = builder
.AddProject<Projects.MySolutionName_MyProjectName_ServiceName>("myresource", "MySolutionName.MyProjectName.MyResource")
.WaitFor(databases.AdministrationDb)
.WaitFor(databases.IdentityDb)
.WaitFor(databases.MyServiceDb)
.WaitFor(databases.AuditLoggingDb)
.WaitFor(databases.SaasDb)
.WaitFor(databases.LanguageManagementDb)
.WaitFor(redis)
.WaitFor(rabbitMq)
.WithReference(databases.AdministrationDb)
.WithReference(databases.IdentityDb)
.WithReference(databases.BlobStoringDb)
.WithReference(databases.MyServiceDb)
.WithReference(databases.AuditLoggingDb)
.WithReference(databases.SaasDb)
.WithReference(databases.LanguageManagementDb)
.ConfigureRabbitMq(rabbitMq, infrastructureDefaultUser, infrastructureDefaultUserPassword)
.ConfigureRedis(redis)
.ConfigureElasticSearch(elasticsearch);
applicationResources["MyResource"] = myResource;
```
> Adjust the dependencies and configurations as necessary.
### 5. Configure Gateway (if needed)
If your resource should be accessible through a gateway, add the gateway configuration in the `AddAdditionalResources` method:
```csharp
var webgateway = applicationResources.FirstOrDefault(x => x.Key == "WebGateway").Value;
if (webgateway != null)
{
webgateway
.WaitFor(applicationResources["MyResource"])
.WithReference(applicationResources["MyResource"])
.WithEnvironment("ReverseProxy__Clusters__MyResource__Destinations__MyResource__Address", "http://MyResource");
}
```
### 6. Configure Authentication Server (if needed)
If your resource needs to be added to `CORS` and `RedirectAllowedUrls` configuration for the authentication server, update the `allowedUrls` variable in the `ConfigureAuthServer` method:
```csharp
var allowedUrls = ReferenceExpression.Create($"{applicationResources["MyService"].GetEndpoint("http")},...");
```
### 7. Add Database (if needed)
If your resource requires a dedicated database, add it in the `AddDatabases` method:
```csharp
var myServiceDb = databaseServers.Postgres.AddDatabase("MyService", "MySolutionName.MyProjectName_MyService");
```
> Adjust the database management system as necessary.
### 8. Add to Solution Runner Profiles (optional)
To run your resource in **Solution Runner** profiles(Default or Aspire), add it following the instructions in the [Studio running applications documentation](../../studio/running-applications.md#add).
## Deploying the Application
.NET Aspire supports deployment to Azure Container Apps, Kubernetes, and other cloud platforms. For detailed deployment guidance, see the official documentation: [.NET Aspire Deployment](https://aspire.dev/deployment/overview/)
To learn more about .NET Aspire, visit: https://aspire.dev/get-started/what-is-aspire/

4
docs/en/solution-templates/microservice/helm-charts-and-kubernetes.md

@ -11,8 +11,8 @@
//[doc-nav]
{
"Next": {
"Name": "Miscellaneous guides in the Microservice solution",
"Path": "solution-templates/microservice/guides"
"Name": "Aspire Integration in the Microservice solution",
"Path": "solution-templates/microservice/aspire-integration"
}
}
````

BIN
docs/en/solution-templates/microservice/images/aspire-apphost-topology.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-configuration.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-dashboard-console.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-dashboard-login.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-dashboard-metrics.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-dashboard-resources.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-dashboard-structured-logs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-dashboard-traces.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-database-postgre-pgadmin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-grafana-dashboard.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-jaeger-traces.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-kibana-dashboard.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-prometheus-dashboard.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-rabbitmq-management.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-redis-insight.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 KiB

BIN
docs/en/solution-templates/microservice/images/aspire-solution-structure.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

BIN
docs/en/solution-templates/microservice/images/solution-runner-aspire-profile.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

BIN
docs/en/solution-templates/microservice/images/solution-runner-default-profile.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Loading…
Cancel
Save