Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 9 additions & 6 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,15 @@

# CommunityToolkit.Aspire.RavenDB.Client
# CommunityToolkit.Aspire.Hosting.RavenDB

/examples/ravendb/ @shiranshalom @aviv86 @karmeli87 @ppekrol
/src/CommunityToolkit.Aspire.RavenDB.Client/ @shiranshalom @aviv86 @karmeli87 @ppekrol
/tests/CommunityToolkit.Aspire.RavenDB.Client.Tests/ @shiranshalom @aviv86 @karmeli87 @ppekrol
/src/CommunityToolkit.Aspire.Hosting.RavenDB/ @shiranshalom @aviv86 @karmeli87 @ppekrol
/tests/CommunityToolkit.Aspire.Hosting.RavenDB.Tests/ @shiranshalom @aviv86 @karmeli87 @ppekrol
# CommunityToolkit.Aspire.Hosting.RavenDB.Cloud

/examples/ravendb/ @ppekrol @poissoncorp @karmeli87
/src/CommunityToolkit.Aspire.RavenDB.Client/ @ppekrol @poissoncorp @karmeli87
/tests/CommunityToolkit.Aspire.RavenDB.Client.Tests/ @ppekrol @poissoncorp @karmeli87
/src/CommunityToolkit.Aspire.Hosting.RavenDB/ @ppekrol @poissoncorp @karmeli87
/tests/CommunityToolkit.Aspire.Hosting.RavenDB.Tests/ @ppekrol @poissoncorp @karmeli87
/src/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud/ @ppekrol @poissoncorp @karmeli87
/tests/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud.Tests/ @ppekrol @poissoncorp @karmeli87

# CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions

Expand Down
3 changes: 3 additions & 0 deletions CommunityToolkit.Aspire.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
<Project Path="examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.ApiService/CommunityToolkit.Aspire.Hosting.RavenDB.ApiService.csproj" />
<Project Path="examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.ServiceDefaults/CommunityToolkit.Aspire.Hosting.RavenDB.ServiceDefaults.csproj" />
<Project Path="examples/ravendb/RavenDB.AppHost/CommunityToolkit.Aspire.Hosting.RavenDB.AppHost.csproj" />
<Project Path="examples/ravendb/RavenDB.Cloud.AppHost/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud.AppHost.csproj" />
</Folder>
<Folder Name="/examples/redis-ext/">
<Project Path="examples/redis-ext/CommunityToolkit.Aspire.Hosting.Redis.Extensions.AppHost/CommunityToolkit.Aspire.Hosting.Redis.Extensions.AppHost.csproj" />
Expand Down Expand Up @@ -311,6 +312,7 @@
<Project Path="src/CommunityToolkit.Aspire.Hosting.PowerShell/CommunityToolkit.Aspire.Hosting.PowerShell.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.Python.Extensions/CommunityToolkit.Aspire.Hosting.Python.Extensions.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.RavenDB/CommunityToolkit.Aspire.Hosting.RavenDB.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.Redis.Extensions/CommunityToolkit.Aspire.Hosting.Redis.Extensions.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.RedPanda/CommunityToolkit.Aspire.Hosting.RedPanda.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.Rust.Extensions/CommunityToolkit.Aspire.Hosting.Rust.Extensions.csproj" />
Expand Down Expand Up @@ -396,6 +398,7 @@
<Project Path="tests/CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions.Tests/CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.PowerShell.Tests/CommunityToolkit.Aspire.Hosting.PowerShell.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.RavenDB.Tests/CommunityToolkit.Aspire.Hosting.RavenDB.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud.Tests/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.Redis.Extensions.Tests/CommunityToolkit.Aspire.Hosting.Redis.Extensions.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.RedPanda.Tests/CommunityToolkit.Aspire.Hosting.RedPanda.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.Rust.Extensions.Tests/CommunityToolkit.Aspire.Hosting.Rust.Extensions.Tests.csproj" />
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ For Aspire 17, migrate Toolkit Go, Java, and Cargo-based Rust applications to th
| - **Learn More**: [`Hosting.PowerShell`](src/CommunityToolkit.Aspire.Hosting.PowerShell/README.md) <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.PowerShell](https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Hosting.PowerShell)](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.PowerShell/) <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.PowerShell](https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Hosting.PowerShell?label=nuget%20(preview))](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.PowerShell/absoluteLatest) | Run powershell scripts in-process with your Aspire AppHost, injecting aspire resources and/or object instances as variables, using the command lines tools of your choice like azure cli, azd, or any other terminal tools. |
| - **Learn More**: [`Hosting.Python.Extensions`](src/CommunityToolkit.Aspire.Hosting.Python.Extensions/README.md) <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.Python.Extensions](https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Hosting.Python.Extensions)](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.Python.Extensions/) <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Python.Extensions](https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Hosting.Python.Extensions?label=nuget%20(preview))](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.Python.Extensions/absoluteLatest) | ⚠️ **Deprecated** — An Aspire integration for hosting Uvicorn apps. |
| - **Learn More**: [`Hosting.RavenDB`](src/CommunityToolkit.Aspire.Hosting.RavenDB/README.md) <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.RavenDB](https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Hosting.RavenDB)](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.RavenDB/) <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.RavenDB](https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Hosting.RavenDB?label=nuget%20(preview))](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.RavenDB/absoluteLatest) | An Aspire integration leveraging the RavenDB container. |
| - **Learn More**: [`Hosting.RavenDB.Cloud`](src/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud/README.md) <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.RavenDB.Cloud](https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud)](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud/) <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.RavenDB.Cloud](https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud?label=nuget%20(preview))](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud/absoluteLatest) | Publishes the Aspire RavenDB integration to RavenDB Cloud: aspire deploy creates or finds a RavenDB Cloud product and hands the applications its URL and a client certificate of their own. |
| - **Learn More**: [`Hosting.Redis.Extensions`](src/CommunityToolkit.Aspire.Hosting.Redis.Extensions/README.md) <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.Redis.Extensions](https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Hosting.Redis.Extensions)](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.Redis.Extensions/) <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Redis.Extensions](https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Hosting.Redis.Extensions?label=nuget%20(preview))](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.Redis.Extensions/absoluteLatest) | An Aspire hosting integration for extending Redis resources with additional management tooling. |
| - **Learn More**: [`Hosting.RedPanda`](src/CommunityToolkit.Aspire.Hosting.RedPanda/README.md) <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.RedPanda](https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Hosting.RedPanda)](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.RedPanda/) <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.RedPanda](https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Hosting.RedPanda?label=nuget%20(preview))](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.RedPanda/absoluteLatest) | An Aspire hosting package for the Redpanda Kafka-compatible streaming platform. |
| - **Learn More**: [`Hosting.Rust.Extensions`](src/CommunityToolkit.Aspire.Hosting.Rust.Extensions/README.md) <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.Rust.Extensions](https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Hosting.Rust.Extensions)](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.Rust.Extensions/) <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Rust.Extensions](https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Hosting.Rust.Extensions?label=nuget%20(preview))](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.Rust.Extensions/absoluteLatest) | An Aspire integration for running Rust applications with Bacon. |
Expand Down
12 changes: 12 additions & 0 deletions docs/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,15 @@ Suppress this diagnostic only when you intentionally opt into the experimental A
Retired. This diagnostic applied only to internal Perl Dockerfile helpers and did not gate a
consumer API. The ID is reserved and must not be reused. Generated Perl Dockerfile publishing
remains preview; see the Perl integration README for its validation status.

## CTASPIRERAVENDB001

The RavenDB hosting integration's API for deployment packages, such as `CommunityToolkit.Aspire.Hosting.RavenDB.Cloud`, which publish a RavenDB server somewhere else than its container. It may change while those packages are previews.

Current usage:

- `WithPublishStrategy(...)` and `RavenDBPublishStrategy` - publish the server with a deployment package's URL instead of its container
- `RavenDBServerResource.PublishStrategy` - the strategy in use, if any
- `RavenDBServerResource.DatabasesToCreate` - the databases declared with `ensureCreated`, which a deployment package creates

AppHosts do not call these: they call the deployment package's own method, such as `PublishAsRavenDBCloud(...)`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import { createBuilder, RavenDBCloudDiskLayout, RavenDBCloudProvider, RavenDBCloudStorageType } from "./.aspire/modules/aspire.mjs";

const builder = await createBuilder();
const appHostDirectory = path.dirname(fileURLToPath(import.meta.url));
const apiServiceProjectPath = path.join(
appHostDirectory,
"..",
"CommunityToolkit.Aspire.Hosting.RavenDB.ApiService",
"CommunityToolkit.Aspire.Hosting.RavenDB.ApiService.csproj",
);

// The applications run in Docker Compose; RavenDB Cloud gets them the product URL and a certificate of their own.
await builder.addDockerComposeEnvironment("compose");

const apiKey = await builder.addParameter("ravendb-cloud-api-key", { secret: true });

// aspire run starts a local RavenDB container; aspire deploy finds or creates the RavenDB Cloud product.
const ravendb = await builder.addRavenDB("ravendb")
.publishAsRavenDBCloud(
apiKey,
"aspire-ravendb-example",
async spec => {
await spec.development(
RavenDBCloudProvider.Aws,
"eu-central-1", // region
"Dev10", // instance type
10, // disk size in GB
RavenDBCloudStorageType.SsdStandard,
RavenDBCloudDiskLayout.SingleDataDisk,
"Stable72"); // release channel
},
{ configure: async cloud => { await cloud.withAllowedIps(["203.0.113.0/24"]); } });

await ravendb.addDatabase("ravenDatabase", { ensureCreated: true });

const apiService = await builder.addDotnetProject("apiservice", apiServiceProjectPath);
await apiService.withReference(ravendb);
await apiService.waitFor(ravendb);

await builder.build().run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"appHost": {
"path": "apphost.mts",
"language": "typescript/nodejs"
},
"sdk": {
"version": "17.0.0"
},
"profiles": {
"https": {
"applicationUrl": "https://localhost:29751;http://localhost:28932",
"environmentVariables": {
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:10976",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:13320"
}
}
},
"packages": {
"Aspire.Hosting.Docker": "17.0.0",
"Aspire.Hosting.Dotnet": "17.0.0",
"CommunityToolkit.Aspire.Hosting.RavenDB": "../../../src/CommunityToolkit.Aspire.Hosting.RavenDB/CommunityToolkit.Aspire.Hosting.RavenDB.csproj",
"CommunityToolkit.Aspire.Hosting.RavenDB.Cloud": "../../../src/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud/CommunityToolkit.Aspire.Hosting.RavenDB.Cloud.csproj"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// @ts-check

import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';

export default defineConfig({
files: ['apphost.mts'],
extends: [tseslint.configs.base],
languageOptions: {
parserOptions: {
projectService: true,
},
},
rules: {
'@typescript-eslint/no-floating-promises': ['error', { checkThenables: true }],
},
});
Loading
Loading