feat: add SeaweedFS hosting and client integrations#1349
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1349Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1349" |
|
|
||
| filerGroup.MapPost("/upload", async ([FromQuery] string fileName, [FromBody] string content, SeaweedFSFilerClient filerClient) => | ||
| { | ||
| var stringContent = new StringContent(content); |
aaronpowell
left a comment
There was a problem hiding this comment.
Couple of nits on the namespaces and project files
f3ea5af to
b680e26
Compare
|
Done! |
aaronpowell
left a comment
There was a problem hiding this comment.
With 13.4, we don't need to have as much verbosity in the AspireExport attributes, so I've put in the cleanup on that.
We'll also need a TypeScript apphost created and a test against it (there's several examples in the repo).
| @@ -0,0 +1,13 @@ | |||
| <Project Sdk="Aspire.AppHost.Sdk/13.3.0"> | |||
There was a problem hiding this comment.
| <Project Sdk="Aspire.AppHost.Sdk/13.3.0"> | |
| <Project Sdk="Aspire.AppHost.Sdk/13.4.0-preview.1.26275.15"> |
| /// <param name="name">The name of the resource. This name will be used as the connection string name when referenced in a dependency.</param> | ||
| /// <returns>A reference to the <see cref="IResourceBuilder{SeaweedFSContainerResource}"/>.</returns> | ||
| #pragma warning disable ASPIREATS001 | ||
| [AspireExport("addSeaweedFS", Description = "Adds a base SeaweedFS container resource")] |
There was a problem hiding this comment.
| [AspireExport("addSeaweedFS", Description = "Adds a base SeaweedFS container resource")] | |
| [AspireExport] |
| /// Enables the SeaweedFS S3-Compatible API Gateway. | ||
| /// </summary> | ||
| #pragma warning disable ASPIREATS001 | ||
| [AspireExport("withS3", Description = "Enables the SeaweedFS S3-Compatible API Gateway")] |
There was a problem hiding this comment.
| [AspireExport("withS3", Description = "Enables the SeaweedFS S3-Compatible API Gateway")] | |
| [AspireExport] |
| /// Enables the SeaweedFS Native Filer API. | ||
| /// </summary> | ||
| #pragma warning disable ASPIREATS001 | ||
| [AspireExport("withFiler", Description = "Enables the SeaweedFS Native Filer API")] |
There was a problem hiding this comment.
| [AspireExport("withFiler", Description = "Enables the SeaweedFS Native Filer API")] | |
| [AspireExport] |
| /// Configures the Master API host port that the SeaweedFS resource is exposed on. | ||
| /// </summary> | ||
| #pragma warning disable ASPIREATS001 | ||
| [AspireExport("withHostPort", Description = "Configures the host port that the SeaweedFS Master API is exposed on")] |
There was a problem hiding this comment.
| [AspireExport("withHostPort", Description = "Configures the host port that the SeaweedFS Master API is exposed on")] | |
| [AspireExport] |
| /// Configures the Secret Key that the SeaweedFS S3 resource uses. | ||
| /// </summary> | ||
| #pragma warning disable ASPIREATS001 | ||
| [AspireExport("withSecretKey", Description = "Configures the Secret Key that the SeaweedFS S3 resource uses")] |
There was a problem hiding this comment.
| [AspireExport("withSecretKey", Description = "Configures the Secret Key that the SeaweedFS S3 resource uses")] | |
| [AspireExport] |
| /// Configures the SeaweedFS S3 API to use a specific external security configuration file. | ||
| /// </summary> | ||
| #pragma warning disable ASPIREATS001 | ||
| [AspireExport("withS3ConfigFile", Description = "Configures the SeaweedFS S3 API to use a specific external security configuration file")] |
There was a problem hiding this comment.
| [AspireExport("withS3ConfigFile", Description = "Configures the SeaweedFS S3 API to use a specific external security configuration file")] | |
| [AspireExport] |
| /// Adds a bind mount for the SeaweedFS data folder. | ||
| /// </summary> | ||
| #pragma warning disable ASPIREATS001 | ||
| [AspireExport("withDataBindMount", Description = "Adds a bind mount for the SeaweedFS data folder")] |
There was a problem hiding this comment.
| [AspireExport("withDataBindMount", Description = "Adds a bind mount for the SeaweedFS data folder")] | |
| [AspireExport] |
| /// Adds a named volume for the SeaweedFS data folder. | ||
| /// </summary> | ||
| #pragma warning disable ASPIREATS001 | ||
| [AspireExport("withDataVolume", Description = "Adds a named volume for the SeaweedFS data folder")] |
There was a problem hiding this comment.
| [AspireExport("withDataVolume", Description = "Adds a named volume for the SeaweedFS data folder")] | |
| [AspireExport] |
43b3548 to
bd355c3
Compare
|
Done! |
Closes #1336
Overview of changes
This PR introduces the SeaweedFS integration for the Aspire Community Toolkit, providing a highly performant and scalable object/file storage alternative.
As discussed in the linked issue, it includes:
CommunityToolkit.Aspire.Hosting.SeaweedFS): A robust AppHost resource builder that configures the SeaweedFS cluster, exposing both the S3 Gateway and the Native Filer endpoints dynamically, along with data volume persistence support.CommunityToolkit.Aspire.SeaweedFS.Client): Extensions to seamlessly inject the standardAWSSDK.S3client and a strongly-typedSeaweedFSFilerClientusing Aspire's service discovery, complete with independent health checks.All details and motivations are outlined in the linked issue.
PR Checklist