feat: CommunityToolkit.Aspire.Hosting.Floc — Floci AWS emulator hosing integration#1448
Draft
edmondshtogu wants to merge 1 commit into
Draft
feat: CommunityToolkit.Aspire.Hosting.Floc — Floci AWS emulator hosing integration#1448edmondshtogu wants to merge 1 commit into
edmondshtogu wants to merge 1 commit into
Conversation
…ting integration
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1448Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1448" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes floci-io/floci#1242
Adds CommunityToolkit.Aspire.Hosting.Floci — a hosting integration for Floci, a high-performance AWS emulator (65+ services, LocalStack-compatible) that runs as a container inside the Aspire AppHost.
What's included
Core integration (
src/CommunityToolkit.Aspire.Hosting.Floci/)AddFloci(name, port?, defaultRegion?, defaultAccountId?)— adds the Floci container with health check at/_floci/infoWithReference(floci)automatically injectsAWS_ENDPOINT_URL,AWS_DEFAULT_REGION,AWS_ACCESS_KEY_ID, andAWS_SECRET_ACCESS_KEYinto dependent resources via aBeforeStartEventsubscriber. Host processes getlocalhost:{port}; containers gethost.docker.internal:{port}WithDataVolume/WithDataBindMount— switches Floci to persistent storage modeWithDockerSocket— mounts the Docker socket and setsFLOCI_DOCKER_DOCKER_HOSTso Lambda and other container-backed services can launch sibling containersWithConfigFile(hostPath)— bind-mounts a Quarkusapplication.ymloverride at/deployments/config/application.ymlfor advanced Floci configuration not covered by extension methodsWithHttpsCertificateConfigurationis registered insideAddFlociand fires automatically when the Aspire developer certificate service is active (or whenWithHttpsDeveloperCertificate()is chained). SetsFLOCI_TLS_ENABLED,FLOCI_TLS_CERT_PATH,FLOCI_TLS_KEY_PATHand switches connection strings tohttps://— no integration-specific TLS wrapper needed.WithDeveloperCertificateTrust(true)is also registered so Floci trusts the dev cert for its own outbound callsExample app (
examples/floci/)AppHost— orchestrates Floci + ApiService, demonstratingWithReference,WaitFor, and health checksApiService— minimal ASP.NET Core app showingS3bucket listing viaAWSSDK.S3AppHost.TypeScript— TypeScript AppHost covering the full exported API surface for compile-time validationTests (
tests/CommunityToolkit.Aspire.Hosting.Floci.Tests/)PR Checklist
Other information
AWS_ENDPOINT_URLis the standard SDK v4 env var; noAmazonS3Config.RegionEndpointshould be set alongsideServiceURL(triggers aNullReferenceExceptionin the v4 endpoint rule engine — documented in the example)ASPIRECERTIFICATES001experimental diagnostic is suppressed at file level in the hosting extension@ts-expect-errorguards for experimental certificate APIs that have no polyglot binding yet