Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/frontend/scripts/update-integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const EXCLUDED_PACKAGES = [
'Aspire.Cli',
'Aspire.Hosting.IncrementalMigration',
'Aspire.Hosting.NodeJs',
'Aspire.Hosting.Testing',
'Aspire.Microsoft.AspNetCore.SystemWebAdapters',
'Aspire.MongoDB.Driver.v3',
'Aspire.RabbitMQ.Client.v7',
Expand Down
48 changes: 1 addition & 47 deletions src/frontend/src/content/docs/integrations/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ pageActions: false
---

import TopicHero from '@components/TopicHero.astro';
import FeatureShowcase from '@components/FeatureShowcase.astro';
import CapabilityGrid from '@components/CapabilityGrid.astro';
import CTABanner from '@components/CTABanner.astro';

<TopicHero
icon="puzzle"
title="Plug in anything."
highlight="Ship faster."
subtitle="Snap databases, caches, messaging, and cloud services into your AppHost with one line — health checks, telemetry, and resiliency included."
subtitle="Snap databases, caches, messaging, and cloud services into your AppHost with one line — Aspire handles the resource model and connection details."
accent="green"
floatingIcons={[
'seti:db',
Expand Down Expand Up @@ -87,51 +86,6 @@ import CTABanner from '@components/CTABanner.astro';
]}
/>

## Built-in superpowers

Every client integration inherits a set of standardized capabilities from Service Defaults — you get production-grade behavior for free.

<FeatureShowcase
features={[
{
icon: 'approve-check-circle',
title: 'Health checks',
description:
'Automatic HTTP health endpoints let orchestrators, load balancers, and the Aspire Dashboard monitor resource availability in real time.',
href: '/integrations/overview/#integration-features',
label: 'Learn more',
accent: 'green',
},
{
icon: 'random',
title: 'Resiliency',
description:
'Built-in retry policies, circuit breakers, and timeouts help your application recover gracefully from transient failures.',
href: '/integrations/overview/#integration-features',
label: 'Learn more',
accent: 'blue',
},
{
icon: 'bars',
title: 'OpenTelemetry',
description:
'Traces, metrics, and structured logs are wired up automatically — giving you full observability with zero configuration.',
href: '/integrations/overview/#integration-features',
label: 'Learn more',
accent: 'purple',
},
{
icon: 'puzzle',
title: 'Extensible',
description:
'Build your own hosting or client integrations to model any resource. The integration system is fully open and composable.',
href: '/integrations/custom-integrations/hosting-integrations/',
label: 'Build your own',
accent: 'orange',
},
]}
/>

<CTABanner
title="Find the right integration"
description="Search and filter 150+ integrations by name, tag, or category. The gallery has everything you need to connect your app to the world."
Expand Down
88 changes: 28 additions & 60 deletions src/frontend/src/content/docs/integrations/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,28 @@ editUrl: false
---

import { Aside, Tabs, TabItem } from '@astrojs/starlight/components';
import PivotSelector from '@components/PivotSelector.astro';
import Pivot from '@components/Pivot.astro';

Aspire integrations are a curated suite of packages that make it easy to connect your cloud-native applications with popular services like Redis and PostgreSQL. Each integration provides essential cloud-native capabilities through automatic setup or standardized configuration.
Aspire integrations are AppHost packages that add APIs for defining resources your app depends on, such as databases, caches, messaging systems, and cloud services.

<Aside type="tip">
Always strive to use the latest version of Aspire integrations to take
advantage of the latest features, improvements, and security updates.
</Aside>

## Integration responsibilities
## What integrations do

Most Aspire integrations are made up of two separate libraries, each with a different responsibility. One type represents resources within the _app host_ project—known as [hosting integrations](#hosting-integrations). The other type of integration represents client libraries that connect to the resources modeled by hosting integrations, and they're known as [client integrations](#client-integrations).
Integrations tell Aspire how to create, connect to, and pass connection details for resources in your app model. An integration can start a local resource, create or connect to a cloud resource, or point to an existing service such as a local SQL server.

### Hosting integrations

Hosting integrations configure applications by provisioning resources (like containers or cloud resources) or pointing to existing instances (such as a local SQL server). These packages model various services, platforms, or capabilities, including caches, databases, logging, storage, and messaging systems.

Hosting integrations extend the `IDistributedApplicationBuilder` interface to enable the _app host_ project to express resources within its [_app model_](/architecture/overview/#app-model-architecture). Key characteristics include:
In the AppHost, integrations add methods to `IDistributedApplicationBuilder` so you can describe those resources in the [_app model_](/architecture/overview/#app-model-architecture). Key characteristics include:

- Tagged with `aspire`, `integration`, and `hosting` in [official packages](/integrations/gallery/?search=hosting)
- Available from both official Aspire releases and community contributions through the Community Toolkit
- Enable resource modeling for various services and platforms

### Client integrations

Client integrations wire up client libraries to dependency injection (DI), define configuration schema, and add _health checks_, _resiliency_, and _telemetry_ where applicable. Aspire client integration libraries are prefixed with `Aspire.` and then include the full package name that they integrate with, such as `Aspire.StackExchange.Redis`.

These packages configure existing client libraries to connect to hosting integrations. Key characteristics include:

- Extend the `IHostApplicationBuilder` interface for client-consuming projects (web apps, APIs)
- Tagged with `aspire`, `integration`, and `client` on NuGet
- Available from both official Aspire releases and community contributions through the Community Toolkit

### Relationship between hosting and client integrations

Hosting and client integrations work together but are **not** coupled and can be used independently. Configuration via environment variables connects client integrations to their corresponding hosting integrations, with the AppHost project managing this connection.
- Define resources for different services and platforms
- Pass connection information to apps that reference those resources

## Wiring resources to consuming projects with references

Once you've created resources, such as databases or messaging systems, by setting up hosting integrations in the AppHost, you can pass those resources to consuming projects, such as APIs or web apps, by calling the "with reference" APIs. These methods express an explicit dependency between a resource and a consuming project. When Aspire starts, it injects connection information as environment variables into the consuming project so it can locate and connect to that resource.
After you create resources in the AppHost, you can pass them to apps such as APIs or web front ends by calling the "with reference" APIs. A reference tells Aspire that an app depends on a resource. When Aspire starts, it gives the app the connection details it needs by setting environment variables.

<Tabs syncKey="aspire-lang">
<TabItem id="csharp" label="C#">
Expand All @@ -63,17 +44,13 @@ architecture-beta
service redishosting(server)[Redis hosting integration] in apphost
service redis(logos:redis)[Redis cache] in apphost

service pgclient(iconoir:server-connection)[PostgreSQL client integration] in consumer
service app(server)[App] in consumer
service redisclient(iconoir:server-connection)[Redis client integration] in consumer

pghosting:R --> L:postgres
postgres:R --> L:pgclient
pgclient:R --> L:app
postgres:R --> L:app

redishosting:R --> L:redis
redis:R --> L:redisclient
redisclient:R --> T:app
redis:R --> T:app
```

```csharp title="C# — AppHost.cs"
Expand Down Expand Up @@ -130,38 +107,32 @@ await builder.build().run();
</TabItem>
</Tabs>

### Environment variables injected with references
### Environment variables set by references

The environment variables Aspire injects depend on the type of resource being referenced. For example:
The environment variables Aspire sets depend on the type of resource being referenced. For example:

- **Connection string resources**: Aspire sets a `{NAME}_{PROPERTY}` environment variables, where `{NAME}` matches the resource name. For example, referencing a resource named `"cache"`, that is available on port 6379, and has the password "Passw0rd", injects `CACHE_URI=redis://:Passw0rd@localhost:6379`.
- **Service endpoint resources**: Aspire sets `{NAME}_{SCHEME}` variables used for service discovery. For example, referencing a project named `apiservice`, that is available on port 7001, injects `APISERVICE_HTTPS=https://localhost:7001`.
- **Connection string resources**: Aspire sets a `ConnectionStrings__{name}` environment variable, where `{name}` matches the resource name. For example, referencing a resource named `"cache"` injects `ConnectionStrings__cache`.
Comment thread
davidfowl marked this conversation as resolved.
Outdated
- **Service endpoint resources**: Aspire sets `{NAME}_{SCHEME}` variables for app endpoints. For example, referencing a project named `apiservice`, that is available on port 7001, sets `APISERVICE_HTTPS=https://localhost:7001`.

Other environment variables often include credentials, port numbers, and other connection details.

### Consuming the injected variables
### Read connection details from environment variables

Any application can read these environment variables to connect to its dependencies directly, without any Aspire-specific libraries.

<Tabs syncKey="consuming-project-lang">
<TabItem id="csharp" label="C#">

If your consuming project is written in C#, you have an additional option: [**Aspire client integrations**](#client-integrations):

```csharp title="C# — Program.cs (consuming .NET project)"
var builder = WebApplication.CreateBuilder(args);

// Client integration reads connection string injected by WithReference
builder.AddRedisClient(connectionName: "cache");

var app = builder.Build();
```csharp title="C# — Program.cs"
// Read the environment variable directly
var redisUrl = Environment.GetEnvironmentVariable("ConnectionStrings__cache");
Comment thread
davidfowl marked this conversation as resolved.
Outdated
```

</TabItem>
<TabItem id="typescript" label="TypeScript">

```typescript title="TypeScript — app.ts"
// Read the injected environment variable directly
// Read the environment variable directly
const redisUrl = process.env["ConnectionStrings__cache"];
```

Expand All @@ -171,7 +142,7 @@ const redisUrl = process.env["ConnectionStrings__cache"];
```go title="Go — main.go"
import "os"

// Read the injected environment variable directly
// Read the environment variable directly
redisURL := os.Getenv("ConnectionStrings__cache")
```

Expand All @@ -181,27 +152,24 @@ redisURL := os.Getenv("ConnectionStrings__cache")
```python title="Python — app.py"
import os

# Read the injected environment variable directly
# Read the environment variable directly
redis_url = os.getenv("ConnectionStrings__cache")
```

</TabItem>
</Tabs>

## Integration features

When you add a client integration to a project within your Aspire solution, _service defaults_ are automatically applied to that project; meaning the Service Defaults project is referenced and the `AddServiceDefaults` extension method is called. These defaults are designed to work well in most scenarios and can be customized as needed. The following service defaults are applied:
## What an integration can do

- **Observability and telemetry**: Automatically sets up logging, tracing, and metrics configurations:
- **Logging**: A technique where code is instrumented to produce logs of interesting events that occurred while the program was running.
- **Tracing**: A specialized form of logging that helps you localize failures and performance issues within applications distributed across multiple machines or processes.
- **Metrics**: Numerical measurements recorded over time to monitor application performance and health. Metrics are often used to generate alerts when potential problems are detected.
Not every integration provides every capability. Each package supports the capabilities that make sense for the resource it models. Depending on the package, an integration can:

- **Health checks**: Exposes HTTP endpoints to provide basic availability and state information about an app. Health checks are used to influence decisions made by container orchestrators, load balancers, API gateways, and other management services.
- **Resiliency**: The ability of your system to react to failure and still remain functional. Resiliency extends beyond preventing failures to include recovering and reconstructing your cloud-native environment back to a healthy state.
- **Define resources**: Add containers, cloud resources, executable resources, or references to existing infrastructure to the AppHost model.
- **Share connection information**: Pass endpoints, connection strings, credentials, and other resource details to consuming apps through references.
- **Support local development**: Run common dependencies locally and view their state in the Aspire Dashboard.
- **Support deployment**: Keep resource relationships in the app model so deployment tooling can understand how apps and resources connect.

## Versioning considerations

Hosting and client integrations are updated each release to target the latest stable versions of dependent resources. When container images are updated with new image versions, the hosting integrations update to these new versions. Similarly, when a new package version is available for a dependent client library, the corresponding client integration updates to the new version. This ensures the latest features and security updates are available to applications. The Aspire update type (major, minor, patch) doesn't necessarily indicate the type of update in dependent resources. For example, a new major version of a dependent resource may be updated in a Aspire patch release, if necessary.
Aspire integrations are updated each release to use current stable versions of the resources they depend on. For example, when a container image has a new version, the related integration can update to use it. The Aspire update type (major, minor, patch) doesn't necessarily match the update type of the underlying resource. For example, an Aspire patch release might include a major update to a container image when necessary.

When major breaking changes happen in dependent resources, integrations may temporarily split into version-dependent packages to ease updating across the breaking change.
When a resource has a major breaking change, Aspire may temporarily provide version-specific integration packages to make upgrades easier.
2 changes: 1 addition & 1 deletion src/frontend/src/content/i18n/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"client": "Klient",
"clientTooltip": "Vis/skjul klient-integrationer",
"search": "Søg integrationer...",
"noResults": "Prøv at søge efter f.eks. \"SQL\", \"Cache\" eller \"Testing\" for at finde integrationer!",
"noResults": "Prøv at søge efter f.eks. \"SQL\", \"Cache\" eller \"Redis\" for at finde integrationer!",
"explore": "Udforsk {{integration}}-integrationer"
},
"404": {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"client": "Client",
"clientTooltip": "Client-Integrationen ein-/ausblenden",
"search": "Integrationen suchen...",
"noResults": "Such z.B. nach \"SQL\", \"Cache\" oder \"Testing\" um Integrationen zu entdecken!",
"noResults": "Such z.B. nach \"SQL\", \"Cache\" oder \"Redis\" um Integrationen zu entdecken!",
"explore": "Erkunde {{integration}}-Integrationen"
},
"404": {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"client": "Client",
"clientTooltip": "Toggle client integrations",
"search": "Search integrations...",
"noResults": "Try searching for things like \"SQL\", \"Cache\", or \"Testing\" to discover integrations!",
"noResults": "Try searching for things like \"SQL\", \"Cache\", or \"Redis\" to discover integrations!",
"explore": "Explore {{integration}} integrations",
"addCommand": "Run aspire add to install {{title}}",
"viewLanguageDocs": "View {{title}} documentation by language",
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"client": "Cliente",
"clientTooltip": "Mostrar/ocultar integraciones de cliente",
"search": "Buscar integraciones...",
"noResults": "Prueba a buscar cosas como \"SQL\", \"Cache\" o \"Testing\" para descubrir integraciones!",
"noResults": "Prueba a buscar cosas como \"SQL\", \"Cache\" o \"Redis\" para descubrir integraciones!",
"explore": "Explora las integraciones de {{integration}}"
},
"404": {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"client": "Client",
"clientTooltip": "Afficher/masquer les intégrations client",
"search": "Rechercher des intégrations...",
"noResults": "Essayez des recherches comme \"SQL\", \"Cache\" ou \"Testing\" pour découvrir des intégrations !",
"noResults": "Essayez des recherches comme \"SQL\", \"Cache\" ou \"Redis\" pour découvrir des intégrations !",
"explore": "Explorez les intégrations {{integration}}"
},
"404": {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/i18n/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"client": "क्लाइंट",
"clientTooltip": "क्लाइंट इंटीग्रेशन टॉगल करें",
"search": "इंटीग्रेशन खोजें...",
"noResults": "इंटीग्रेशन खोजने के लिए \"SQL\", \"Cache\" या \"Testing\" जैसे शब्द आज़माएँ!",
"noResults": "इंटीग्रेशन खोजने के लिए \"SQL\", \"Cache\" या \"Redis\" जैसे शब्द आज़माएँ!",
"explore": "{{integration}} इंटीग्रेशन का अन्वेषण करें"
},
"404": {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"client": "Klien",
"clientTooltip": "Tampilkan/sembunyikan integrasi klien",
"search": "Cari integrasi...",
"noResults": "Coba cari \"SQL\", \"Cache\" atau \"Testing\" untuk menemukan integrasi!",
"noResults": "Coba cari \"SQL\", \"Cache\" atau \"Redis\" untuk menemukan integrasi!",
"explore": "Jelajahi integrasi {{integration}}"
},
"404": {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"client": "Client",
"clientTooltip": "Mostra/nascondi integrazioni client",
"search": "Cerca integrazioni...",
"noResults": "Prova a cercare \"SQL\", \"Cache\" o \"Testing\" per scoprire integrazioni!",
"noResults": "Prova a cercare \"SQL\", \"Cache\" o \"Redis\" per scoprire integrazioni!",
"explore": "Esplora le integrazioni {{integration}}"
},
"404": {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"client": "クライアント",
"clientTooltip": "クライアントインテグレーションの表示切り替え",
"search": "連携を検索...",
"noResults": "統合を探すには \"SQL\"、\"Cache\"、\"Testing\" などを検索してみてください!",
"noResults": "統合を探すには \"SQL\"、\"Cache\"、\"Redis\" などを検索してみてください!",
"explore": "{{integration}} の連携を探索"
},
"404": {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"client": "클라이언트",
"clientTooltip": "클라이언트 통합 토글",
"search": "통합 검색...",
"noResults": "\"SQL\", \"Cache\", \"Testing\" 등을 검색해 통합을 찾아보세요!",
"noResults": "\"SQL\", \"Cache\", \"Redis\" 등을 검색해 통합을 찾아보세요!",
"explore": "{{integration}} 통합을 탐색"
},
"404": {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/i18n/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"client": "Cliente",
"clientTooltip": "Mostrar/ocultar integrações de cliente",
"search": "Pesquisar integrações...",
"noResults": "Tente pesquisar por \"SQL\", \"Cache\" ou \"Testing\" para descobrir integrações!",
"noResults": "Tente pesquisar por \"SQL\", \"Cache\" ou \"Redis\" para descobrir integrações!",
"explore": "Explore integrações de {{integration}}"
},
"404": {
Expand Down
Loading
Loading