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
11 changes: 6 additions & 5 deletions src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,15 @@ public static IResourceBuilder<AzureCosmosDBResource> AddAzureCosmosDB(this IDis

/// <summary>
/// Configures an Azure Cosmos DB resource to be emulated using the Azure Cosmos DB emulator with the NoSQL API. This resource requires an <see cref="AzureCosmosDBResource"/> to be added to the application model.
/// For more information on the Azure Cosmos DB emulator, see <a href="https://learn.microsoft.com/azure/cosmos-db/emulator#authentication"></a>
/// For more information on the Azure Cosmos DB emulator, see <a href="https://learn.microsoft.com/azure/cosmos-db/emulator#authentication"></a>.
/// </summary>
/// <param name="builder">The Azure Cosmos DB resource builder.</param>
/// <param name="configureContainer">Callback that exposes underlying container used for emulation to allow for customization.</param>
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
/// <remarks>
/// When using the Azure Cosmos DB emulator, the container requires a TLS/SSL certificate.
/// For more information, see <a href="https://learn.microsoft.com/azure/cosmos-db/how-to-develop-emulator?tabs=docker-linux#export-the-emulators-tlsssl-certificate"></a>
/// For more information, see <a href="https://learn.microsoft.com/azure/cosmos-db/how-to-develop-emulator?tabs=docker-linux#export-the-emulators-tlsssl-certificate"></a>.
/// This version of the package defaults to the <inheritdoc cref="CosmosDBEmulatorContainerImageTags.Tag"/> tag of the <inheritdoc cref="CosmosDBEmulatorContainerImageTags.Registry"/>/<inheritdoc cref="CosmosDBEmulatorContainerImageTags.Image"/> container image.
/// </remarks>
public static IResourceBuilder<AzureCosmosDBResource> RunAsEmulator(this IResourceBuilder<AzureCosmosDBResource> builder, Action<IResourceBuilder<AzureCosmosDBEmulatorResource>>? configureContainer = null)
{
Expand All @@ -117,9 +118,9 @@ public static IResourceBuilder<AzureCosmosDBResource> RunAsEmulator(this IResour
builder.WithEndpoint(name: "emulator", targetPort: 8081)
.WithAnnotation(new ContainerImageAnnotation
{
Registry = "mcr.microsoft.com",
Image = "cosmosdb/linux/azure-cosmos-emulator",
Tag = "latest"
Registry = CosmosDBEmulatorContainerImageTags.Registry,
Image = CosmosDBEmulatorContainerImageTags.Image,
Tag = CosmosDBEmulatorContainerImageTags.Tag
});

CosmosClient? cosmosClient = null;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Aspire.Hosting.Azure.Cosmos;

internal static class CosmosDBEmulatorContainerImageTags
{
/// <remarks>mcr.microsoft.com</remarks>
public const string Registry = "mcr.microsoft.com";

/// <remarks>cosmosdb/linux/azure-cosmos-emulator</remarks>
public const string Image = "cosmosdb/linux/azure-cosmos-emulator";

/// <remarks>latest</remarks>
public const string Tag = "latest";
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public static IResourceBuilder<AzureEventHubsResource> AddAzureEventHubs(
/// <summary>
/// Adds an Azure Event Hubs hub resource to the application model. This resource requires an <see cref="AzureEventHubsResource"/> to be added to the application model.
/// </summary>
/// <remarks>
/// This version of the package defaults to the <inheritdoc cref="EventHubsEmulatorContainerImageTags.Tag"/> tag of the <inheritdoc cref="EventHubsEmulatorContainerImageTags.Registry"/>/<inheritdoc cref="EventHubsEmulatorContainerImageTags.Image"/> container image.
/// </remarks>
/// <param name="builder">The Azure Event Hubs resource builder.</param>
/// <param name="name">The name of the Event Hub.</param>
public static IResourceBuilder<AzureEventHubsResource> AddEventHub(this IResourceBuilder<AzureEventHubsResource> builder, [ResourceName] string name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ namespace Aspire.Hosting.Azure.EventHubs;

internal static class EventHubsEmulatorContainerImageTags
{
/// <remarks>mcr.microsoft.com</remarks>
public const string Registry = "mcr.microsoft.com";

/// <remarks>azure-messaging/eventhubs-emulator</remarks>
public const string Image = "azure-messaging/eventhubs-emulator";
public const string Tag = "latest";

/// <remarks>latest</remarks>
public const string Tag = "latest"; // latest is the only arch-agnostic tag
}
5 changes: 4 additions & 1 deletion src/Aspire.Hosting.Azure.Storage/AzureStorageExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ public static IResourceBuilder<AzureStorageResource> AddAzureStorage(this IDistr
}

/// <summary>
/// Configures an Azure Storage resource to be emulated using Azurite. This resource requires an <see cref="AzureStorageResource"/> to be added to the application model. This version of the package defaults to the <inheritdoc cref="StorageEmulatorContainerImageTags.Tag"/> tag of the <inheritdoc cref="StorageEmulatorContainerImageTags.Registry"/>/<inheritdoc cref="StorageEmulatorContainerImageTags.Image"/> container image.
/// Configures an Azure Storage resource to be emulated using Azurite. This resource requires an <see cref="AzureStorageResource"/> to be added to the application model.
/// </summary>
/// <remarks>
/// This version of the package defaults to the <inheritdoc cref="StorageEmulatorContainerImageTags.Tag"/> tag of the <inheritdoc cref="StorageEmulatorContainerImageTags.Registry"/>/<inheritdoc cref="StorageEmulatorContainerImageTags.Image"/> container image.
/// </remarks>
/// <param name="builder">The Azure storage resource builder.</param>
/// <param name="configureContainer">Callback that exposes underlying container used for emulation to allow for customization.</param>
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ namespace Aspire.Hosting.Azure.Storage;

internal static class StorageEmulatorContainerImageTags
{
/// <summary>mcr.microsoft.com</summary>
/// <remarks>mcr.microsoft.com</remarks>
public const string Registry = "mcr.microsoft.com";

/// <summary>azure-storage/azurite</summary>
/// <remarks>azure-storage/azurite</remarks>
public const string Image = "azure-storage/azurite";

/// <summary>3.32.0</summary>
/// <remarks>3.32.0</remarks>
public const string Tag = "3.32.0";
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public static class ElasticsearchBuilderExtensions
private const int ElasticsearchInternalPort = 9300;

/// <summary>
/// Adds an Elasticsearch container resource to the application model. This version of the package defaults to the <inheritdoc cref="ElasticsearchContainerImageTags.Tag"/> tag of the <inheritdoc cref="ElasticsearchContainerImageTags.Image"/> container image.
/// Adds an Elasticsearch container resource to the application model.
/// </summary>
/// <remarks>
/// The default image is "elasticsearch" and the tag is "8.15.1".
/// This version of the package defaults to the <inheritdoc cref="ElasticsearchContainerImageTags.Tag"/> tag of the <inheritdoc cref="ElasticsearchContainerImageTags.Image"/> container image.
/// </remarks>
/// <param name="builder">The <see cref="IDistributedApplicationBuilder"/>.</param>
/// <param name="name">The name of the resource. This name will be used as the connection string name when referenced in a dependency.</param>
Expand All @@ -38,8 +38,8 @@ public static class ElasticsearchBuilderExtensions
/// var elasticsearch = builder.AddElasticsearch("elasticsearch");
/// var api = builder.AddProject&lt;Projects.Api&gt;("api")
/// .WithReference(elasticsearch);
///
/// builder.Build().Run();
///
/// builder.Build().Run();
/// </code>
/// </example>
public static IResourceBuilder<ElasticsearchResource> AddElasticsearch(
Expand Down Expand Up @@ -109,8 +109,8 @@ public static IResourceBuilder<ElasticsearchResource> AddElasticsearch(
/// .WithDataVolume();
/// var api = builder.AddProject&lt;Projects.Api&gt;("api")
/// .WithReference(elasticsearch);
///
/// builder.Build().Run();
///
/// builder.Build().Run();
/// </code>
/// </example>
public static IResourceBuilder<ElasticsearchResource> WithDataVolume(this IResourceBuilder<ElasticsearchResource> builder, string? name = null)
Expand All @@ -136,8 +136,8 @@ public static IResourceBuilder<ElasticsearchResource> WithDataVolume(this IResou
/// .WithDataBindMount("./data/elasticsearch/data");
/// var api = builder.AddProject&lt;Projects.Api&gt;("api")
/// .WithReference(elasticsearch);
///
/// builder.Build().Run();
///
/// builder.Build().Run();
/// </code>
/// </example>
public static IResourceBuilder<ElasticsearchResource> WithDataBindMount(this IResourceBuilder<ElasticsearchResource> builder, string source)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ namespace Aspire.Hosting.Elasticsearch;

internal static class ElasticsearchContainerImageTags
{
/// <summary>docker.io</summary>
/// <remarks>docker.io</remarks>
public const string Registry = "docker.io";

/// <summary>library/elasticsearch</summary>
/// <remarks>library/elasticsearch</remarks>
public const string Image = "library/elasticsearch";

/// <summary>8.15.2</summary>
/// <remarks>8.15.2</remarks>
public const string Tag = "8.15.2";
}

9 changes: 6 additions & 3 deletions src/Aspire.Hosting.Garnet/GarnetBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public static class GarnetBuilderExtensions
/// <summary>
/// Adds a Garnet container to the application model.
/// </summary>
/// <remarks>
/// This version of the package defaults to the <inheritdoc cref="GarnetContainerImageTags.Tag"/> tag of the <inheritdoc cref="GarnetContainerImageTags.Registry"/>/<inheritdoc cref="GarnetContainerImageTags.Image"/> container image.
/// </remarks>
/// <example>
/// Use in application host
/// <code lang="csharp">
Expand All @@ -27,8 +30,8 @@ public static class GarnetBuilderExtensions
/// var garnet = builder.AddGarnet("garnet");
/// var api = builder.AddProject&lt;Projects.Api&gt;("api)
/// .WithReference(garnet);
///
/// builder.Build().Run();
///
/// builder.Build().Run();
/// </code>
/// </example>
/// <example>
Expand All @@ -39,7 +42,7 @@ public static class GarnetBuilderExtensions
///
/// var multiplexer = builder.Services.BuildServiceProvider()
/// .GetRequiredService&lt;IConnectionMultiplexer&gt;();
///
///
/// var db = multiplexer.GetDatabase();
/// db.HashSet("key", [new HashEntry("hash", "value")]);
/// var value = db.HashGet("key", "hash");
Expand Down
5 changes: 5 additions & 0 deletions src/Aspire.Hosting.Garnet/GarnetContainerImageTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ namespace Aspire.Hosting.Garnet;

internal static class GarnetContainerImageTags
{
/// <remarks>ghcr.io</remarks>
public const string Registry = "ghcr.io";

/// <remarks>microsoft/garnet</remarks>
public const string Image = "microsoft/garnet";

/// <remarks>1.0</remarks>
public const string Tag = "1.0";
}
10 changes: 8 additions & 2 deletions src/Aspire.Hosting.Kafka/KafkaBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ public static class KafkaBuilderExtensions
private const string Target = "/var/lib/kafka/data";

/// <summary>
/// Adds a Kafka resource to the application. A container is used for local development. This version of the package defaults to the <inheritdoc cref="KafkaContainerImageTags.Tag"/> tag of the <inheritdoc cref="KafkaContainerImageTags.Image"/> container image.
/// Adds a Kafka resource to the application. A container is used for local development.
/// </summary>
/// <remarks>
/// This version of the package defaults to the <inheritdoc cref="KafkaContainerImageTags.Tag"/> tag of the <inheritdoc cref="KafkaContainerImageTags.Image"/> container image.
/// </remarks>
/// <param name="builder">The <see cref="IDistributedApplicationBuilder"/>.</param>
/// <param name="name">The name of the resource. This name will be used as the connection string name when referenced in a dependency</param>
/// <param name="port">The host port of Kafka broker.</param>
Expand Down Expand Up @@ -77,8 +80,11 @@ public static IResourceBuilder<KafkaServerResource> AddKafka(this IDistributedAp
}

/// <summary>
/// Adds a Kafka UI container to the application. This version of the package defaults to the <inheritdoc cref="KafkaContainerImageTags.KafkaUiTag"/> tag of the <inheritdoc cref="KafkaContainerImageTags.KafkaUiImage"/> container image.
/// Adds a Kafka UI container to the application.
/// </summary>
/// <remarks>
/// This version of the package defaults to the <inheritdoc cref="KafkaContainerImageTags.KafkaUiTag"/> tag of the <inheritdoc cref="KafkaContainerImageTags.KafkaUiImage"/> container image.
/// </remarks>
/// <param name="builder">The Kafka server resource builder.</param>
/// <param name="configureContainer">Configuration callback for KafkaUI container resource.</param>
/// <param name="containerName">The name of the container (Optional).</param>
Expand Down
10 changes: 5 additions & 5 deletions src/Aspire.Hosting.Kafka/KafkaContainerImageTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ namespace Aspire.Hosting;

internal static class KafkaContainerImageTags
{
/// <summary>docker.io</summary>
/// <remarks>docker.io</remarks>
public const string Registry = "docker.io";

/// <summary>confluentinc/confluent-local</summary>
/// <remarks>confluentinc/confluent-local</remarks>
public const string Image = "confluentinc/confluent-local";

/// <summary>7.7.1</summary>
/// <remarks>7.7.1</remarks>
public const string Tag = "7.7.1";

/// <summary>provectuslabs/kafka-ui</summary>
/// <remarks>provectuslabs/kafka-ui</remarks>
public const string KafkaUiImage = "provectuslabs/kafka-ui";

/// <summary>v0.7.2</summary>
/// <remarks>v0.7.2</remarks>
public const string KafkaUiTag = "v0.7.2";
}
7 changes: 6 additions & 1 deletion src/Aspire.Hosting.Keycloak/KeycloakContainerImageTags.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Aspire.Hosting.Keycloak;

internal static class KeycloakContainerImageTags
{
/// <remarks>quay.io</remarks>
public const string Registry = "quay.io";

/// <remarks>keycloak/keycloak</remarks>
public const string Image = "keycloak/keycloak";

/// <remarks>25.0</remarks>
public const string Tag = "25.0";
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public static class KeycloakResourceBuilderExtensions
/// <param name="adminPassword">The parameter used as the admin password for the Keycloak resource. If <see langword="null"/> a default password will be used.</param>
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
/// <remarks>
/// The container is based on the quay.io/keycloak/keycloak container image.
/// The default tag is 24.0. The container exposes port 8080 by default.
/// The container exposes port 8080 by default.
/// This version of the package defaults to the <inheritdoc cref="KeycloakContainerImageTags.Tag"/> tag of the <inheritdoc cref="KeycloakContainerImageTags.Registry"/>/<inheritdoc cref="KeycloakContainerImageTags.Image"/> container image.
/// </remarks>
/// <example>
/// Use in application host
Expand Down
9 changes: 6 additions & 3 deletions src/Aspire.Hosting.Milvus/MilvusBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class MilvusBuilderExtensions
private const int MilvusPortGrpc = 19530;

/// <summary>
/// Adds a Milvus resource to the application. A container is used for local development.
/// Adds a Milvus container resource to the application model.
/// </summary>
/// <example>
/// Use in application host
Expand All @@ -36,9 +36,9 @@ public static class MilvusBuilderExtensions
/// </code>
/// </example>
/// <remarks>
/// This version of the package defaults to the <inheritdoc cref="MilvusContainerImageTags.Tag"/> tag of the <inheritdoc cref="MilvusContainerImageTags.Image"/> container image.
/// The .NET client library uses the gRPC port by default to communicate and this resource exposes that endpoint.
/// A web-based administration tool for Milvus can also be added using <see cref="WithAttu"/>.
/// This version of the package defaults to the <inheritdoc cref="MilvusContainerImageTags.Tag"/> tag of the <inheritdoc cref="MilvusContainerImageTags.Image"/> container image.
/// </remarks>
/// <param name="builder">The <see cref="IDistributedApplicationBuilder"/>.</param>
/// <param name="name">The name of the resource. This name will be used as the connection string name when referenced in a dependency</param>
Expand Down Expand Up @@ -133,8 +133,11 @@ public static IResourceBuilder<MilvusDatabaseResource> AddDatabase(this IResourc
}

/// <summary>
/// Adds an administration and development platform for Milvus to the application model using Attu. This version of the package defaults to the <inheritdoc cref="MilvusContainerImageTags.AttuTag"/> tag of the <inheritdoc cref="MilvusContainerImageTags.AttuImage"/> container image.
/// Adds an administration and development platform for Milvus to the application model using Attu.
/// </summary>
/// <remarks>
/// This version of the package defaults to the <inheritdoc cref="MilvusContainerImageTags.AttuTag"/> tag of the <inheritdoc cref="MilvusContainerImageTags.AttuImage"/> container image.
/// </remarks>
/// <example>
/// Use in application host with a Milvus resource
/// <code lang="csharp">
Expand Down
10 changes: 5 additions & 5 deletions src/Aspire.Hosting.Milvus/MilvusContainerImageTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ namespace Aspire.Hosting.Milvus;

internal static class MilvusContainerImageTags
{
/// <summary>docker.io</summary>
/// <remarks>docker.io</remarks>
public const string Registry = "docker.io";

/// <summary>milvusdb/milvus</summary>
/// <remarks>milvusdb/milvus</remarks>
public const string Image = "milvusdb/milvus";

/// <summary>v2.4.12</summary>
/// <remarks>v2.4.12</remarks>
public const string Tag = "v2.4.12";

/// <summary>zilliz/attu</summary>
/// <remarks>zilliz/attu</remarks>
public const string AttuImage = "zilliz/attu";

/// <summary>v2.4</summary>
/// <remarks>v2.4</remarks>
public const string AttuTag = "v2.4";
}

Loading