Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/8.0-preview5] Endpoint changes #3278

Merged
merged 2 commits into from
Mar 29, 2024
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
1 change: 1 addition & 0 deletions playground/AWS/AWS.AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// .WithReference(awsConfig);

builder.AddProject<Projects.Frontend>("Frontend")
.WithExternalHttpEndpoints()
// Demonstrating binding all of the output variables to a section in IConfiguration. By default they are bound to the AWS::Resources prefix.
// The prefix is configurable by the optional configSection parameter.
.WithReference(awsResources)
Expand Down
6 changes: 4 additions & 2 deletions playground/AWS/AWS.AppHost/aspire-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
},
"https": {
"scheme": "https",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
}
}
}
Expand Down
1 change: 1 addition & 0 deletions playground/AspireEventHub/EventHubs.AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
.WithReference(blob);

builder.AddProject<Projects.EventHubsApi>("api")
.WithExternalHttpEndpoints()
.WithReference(eventHub);

builder.Build().Run();
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
var azureSearch = builder.AddAzureSearch("search");

builder.AddProject<Projects.AzureSearch_ApiService>("api")
.WithExternalHttpEndpoints()
.WithReference(azureSearch);

// This project is only added in playground projects to support development/debugging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
var blobs = storage.AddBlobs("blobs");

builder.AddProject<Projects.AzureStorageEndToEnd_ApiService>("api")
.WithExternalHttpEndpoints()
.WithReference(blobs);

// This project is only added in playground projects to support development/debugging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
},
"https": {
"scheme": "https",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.RunAsEmulator();

builder.AddProject<Projects.CosmosEndToEnd_ApiService>("api")
.WithExternalHttpEndpoints()
.WithReference(db);

// This project is only added in playground projects to support development/debugging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
},
"https": {
"scheme": "https",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
var db1 = builder.AddSqlServer("sql1").AddDatabase("db1");

builder.AddProject<Projects.DatabaseMigration_ApiService>("api")
.WithExternalHttpEndpoints()
.WithReference(db1);

builder.AddProject<Projects.DatabaseMigration_MigrationService>("migration")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"scheme": "tcp",
"protocol": "tcp",
"transport": "tcp",
"containerPort": 1433
"targetPort": 1433
}
}
},
Expand All @@ -34,12 +34,14 @@
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
},
"https": {
"scheme": "https",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
);

builder.AddProject<Projects.OpenAIEndToEnd_WebStory>("webstory")
.WithExternalHttpEndpoints()
.WithReference(openai)
.WithEnvironment("OpenAI__DeploymentName", deploymentAndModelName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
},
"https": {
"scheme": "https",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
var insertionrows = builder.AddParameter("insertionrows");

builder.AddProject<Projects.ParameterEndToEnd_ApiService>("api")
.WithExternalHttpEndpoints()
.WithEnvironment("InsertionRows", insertionrows)
.WithReference(db);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
},
"https": {
"scheme": "https",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
var db10 = builder.AddPostgres("pg10").WithPgAdmin().PublishAsConnectionString().AddDatabase("db10");

builder.AddProject<Projects.PostgresEndToEnd_ApiService>("api")
.WithExternalHttpEndpoints()
.WithReference(db1)
.WithReference(db2)
.WithReference(db3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scheme": "tcp",
"protocol": "tcp",
"transport": "tcp",
"containerPort": 5432
"targetPort": 5432
}
}
},
Expand All @@ -38,7 +38,7 @@
"scheme": "tcp",
"protocol": "tcp",
"transport": "tcp",
"containerPort": 5432
"targetPort": 5432
}
}
},
Expand All @@ -61,7 +61,7 @@
"scheme": "tcp",
"protocol": "tcp",
"transport": "tcp",
"containerPort": 5432
"targetPort": 5432
}
}
},
Expand All @@ -88,7 +88,7 @@
"scheme": "tcp",
"protocol": "tcp",
"transport": "tcp",
"containerPort": 5432
"targetPort": 5432
}
}
},
Expand All @@ -111,7 +111,7 @@
"scheme": "tcp",
"protocol": "tcp",
"transport": "tcp",
"containerPort": 5432
"targetPort": 5432
}
}
},
Expand All @@ -134,7 +134,7 @@
"scheme": "tcp",
"protocol": "tcp",
"transport": "tcp",
"containerPort": 5432
"targetPort": 5432
}
}
},
Expand Down Expand Up @@ -187,12 +187,14 @@
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
},
"https": {
"scheme": "https",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.WithReference(redis);

builder.AddProject<Projects.ProxylessEndToEnd_ApiService>("api2", launchProfileName: null)
.WithEndpoint(13456, "http")
.WithHttpEndpoint(port: 13456)
.WithReference(redis);

// This project is only added in playground projects to support development/debugging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scheme": "tcp",
"protocol": "tcp",
"transport": "tcp",
"containerPort": 6379
"targetPort": 6379
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
var db2 = builder.AddSqlServer("sql2").PublishAsContainer().AddDatabase("db2");

builder.AddProject<Projects.SqlServerEndToEnd_ApiService>("api")
.WithExternalHttpEndpoints()
.WithReference(db1)
.WithReference(db2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"scheme": "tcp",
"protocol": "tcp",
"transport": "tcp",
"containerPort": 1433
"targetPort": 1433
}
}
},
Expand All @@ -48,12 +48,14 @@
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
},
"https": {
"scheme": "https",
"protocol": "tcp",
"transport": "http"
"transport": "http",
"external": true
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion playground/Stress/Stress.AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
for (var i = 0; i < 30; i++)
{
var port = 5180 + i;
serviceBuilder.WithHttpEndpoint(port, $"http-{port}");
serviceBuilder.WithHttpEndpoint(port, name: $"http-{port}");
}

builder.AddProject<Projects.Stress_TelemetryService>("stress-telemetryservice");
Expand Down
1 change: 1 addition & 0 deletions playground/TestShop/AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
.WithReference(messaging);

builder.AddProject<Projects.MyFrontend>("frontend")
.WithExternalHttpEndpoints()
.WithReference(basketService)
.WithReference(catalogService);

Expand Down
Loading