|
362 | 362 |
|
363 | 363 | sqlGateway = sqlGateway.WithArgs("/opt/flink/bin/sql-gateway.sh", "start-foreground"); |
364 | 364 |
|
365 | | -// Flink.JobGateway - Add Flink Job Gateway as .NET project |
366 | | -// CRITICAL: Using .AddProject() for proper Aspire service discovery and endpoint management |
367 | | -// JobGateway runs as a host process (not containerized) for reliable endpoint discovery |
368 | | -// Note: ASPNETCORE_URLS set for LocalTesting mode compatibility; removed for LearningCourse mode |
369 | | -#pragma warning disable S1481 // Gateway resource is created but not directly referenced - used via Aspire orchestration |
370 | | -IResourceBuilder<ProjectResource> gateway = builder.AddProject<Projects.FlinkDotNet_JobGateway>("flink-job-gateway") |
371 | | - .WithHttpEndpoint(port: 8086, name: "gateway-http"); |
372 | | - |
373 | | -// In LocalTesting mode, explicitly set ASPNETCORE_URLS to ensure proper binding |
374 | | -// In LearningCourse mode, Aspire's service discovery manages port binding automatically |
375 | | -if (!isLearningCourse) |
376 | | -{ |
377 | | - gateway = gateway.WithEnvironment("ASPNETCORE_URLS", "http://localhost:8086"); |
378 | | -} |
| 365 | +IResourceBuilder<ProjectResource> gateway = builder.AddProject<Projects.FlinkDotNet_JobGateway>("flink-job-gateway"); |
379 | 366 |
|
380 | 367 | gateway = gateway |
381 | 368 | .WithEnvironment("FLINK_CONNECTOR_PATH", connectorsDir) |
|
385 | 372 | .WithEnvironment("Flink__SqlGateway__BaseUrl", sqlGateway.GetEndpoint("sg-http")) |
386 | 373 | .WaitFor(jobManager) |
387 | 374 | .WaitFor(sqlGateway); |
388 | | -#pragma warning restore S1481 |
389 | 375 |
|
390 | 376 | // Temporal PostgreSQL - Database for Temporal server |
391 | 377 | // CRITICAL: Must configure PostgreSQL WITHOUT password for Temporal auto-setup compatibility |
|
428 | 414 | // Provides state management, caching, and distributed coordination capabilities |
429 | 415 | // CRITICAL: Use Bitnami Redis image with ALLOW_EMPTY_PASSWORD for learning exercises |
430 | 416 | // This allows exercises to connect with simple "localhost:port" format without authentication |
431 | | -#pragma warning disable S1481 // Redis resource is created but not directly referenced - used via connection string |
432 | | - IResourceBuilder<ContainerResource> redis = builder.AddContainer("redis", "bitnami/redis", LatestTag) |
433 | | - .WithHttpEndpoint(targetPort: Ports.RedisHostPort, name: "redis-port") |
434 | | - .WithEnvironment("ALLOW_EMPTY_PASSWORD", "yes"); // Disable password requirement for learning |
435 | | -#pragma warning restore S1481 |
| 417 | + |
| 418 | +builder.AddContainer("redis", "bitnami/redis", LatestTag) |
| 419 | +.WithHttpEndpoint(targetPort: Ports.RedisHostPort, name: "redis-port") |
| 420 | +.WithEnvironment("ALLOW_EMPTY_PASSWORD", "yes"); // Disable password requirement for learning |
436 | 421 |
|
437 | 422 | Console.WriteLine("Redis deployed with Aspire-managed host port for LearningCourse exercises"); |
438 | 423 |
|
|
500 | 485 | Console.WriteLine(" [INFO] Kafka metrics dashboard mounted for Grafana"); |
501 | 486 | } |
502 | 487 |
|
503 | | -#pragma warning disable S1481 // Grafana resource is created but not directly referenced - accessed via browser |
504 | | - IResourceBuilder<ContainerResource> grafana = grafanaBuilder; |
505 | | -#pragma warning restore S1481 |
506 | | - |
507 | 488 | Console.WriteLine("Grafana deployed with Aspire-managed host port for visualization"); |
508 | 489 | } |
509 | 490 |
|
510 | | -#pragma warning disable S6966 // Await RunAsync instead - Required for Aspire testing framework compatibility |
511 | 491 | builder.Build().Run(); |
512 | | -#pragma warning restore S6966 |
513 | 492 |
|
514 | 493 | static bool ConfigureContainerRuntime() |
515 | 494 | { |
|
0 commit comments