agentleFS
tleub-ebptleub-ebp/WorkPilot-AI/skills/dotnet/aspire-orchestration/SKILL.md

aspire-orchestration

Skill4 starsChanged 3 months agoMITView on GitHub

Orchestration cloud-native .NET Aspire — applications distribuées, microservices, conteneurs, service discovery et observabilité (OpenTelemetry, health checks). À utiliser pour composer un AppHost Aspire, câbler des dépendances (Postgres/Redis/RabbitMQ) ou instrumenter des services distribués.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

.NET Aspire — Orchestration Cloud-Native

Aspire décrit toute l'application distribuée en C# dans un projet AppHost : services, dépendances (BD, cache, broker), endpoints et observabilité. Les exemples complets sont dans reference.md.

Modèle AppHost

var builder = DistributedApplication.CreateBuilder(args);

builder.AddProject<Projects.OrderService>("orderservice")
    .WithReference(builder.AddPostgres("ordersdb"))   // injecte la connection string
    .WithReference(builder.AddRedis("orderscache"))
    .WithHttpEndpoint(port: 8080, name: "orderservice-http");

builder.Build().Run();
BriqueRôle
AddProject<T>("name")Déclare un service .NET orchestré
AddPostgres / AddRedis / AddRabbitMQ(...)Provisionne une ressource conteneurisée
.WithReference(resource)Injecte automatiquement la connection string + service discovery
.WithHttpEndpoint(...)Expose un endpoint nommé
AddServiceDefaults() (côté service)Active télémétrie + discovery + résilience par défaut

Observabilité (intégrée)

Chaque service appelle builder.AddServiceDefaults() puis configure OpenTelemetry (tracing + metrics) et des health checks taggés ready. Exposer /health (readiness), /health/live (liveness) et le scraping Prometheus. Détails et health checks custom : reference.md.

Déploiement

  • Dev : docker-compose pour les dépendances, chaque conteneur avec healthcheck + depends_on.
  • Prod : Kubernetes avec livenessProbe → /health/live, readinessProbe → /health, secrets pour les connection strings, requests/limits CPU+mémoire.
  • Résilience : Polly (retry exponentiel + circuit breaker + timeout) sur chaque appel inter-services.

Anti-patterns

  • ❌ Service sans health checks
  • ❌ Configuration hardcodée (utiliser les références Aspire + secrets)
  • ❌ Appels externes sans retry/circuit breaker
  • ❌ Logs non structurés / pas de tracing distribué
  • ❌ Circuit breaker mal configuré (seuils/délais par défaut non revus)

Cas d'usage

E-commerce (commandes distribuées, inventory temps réel) · SaaS multi-tenant (isolation + scaling + monitoring tenant-aware) · services financiers (haute dispo, audit trail, monitoring de latence).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.