-
Notifications
You must be signed in to change notification settings - Fork 521
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
add elasticsearch hosting #4430
Merged
Merged
Changes from 39 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
2141fb5
add elasticsearch hosting
Alirexaa ca9709c
Add password support to elasticsearch resource
Alirexaa 1f11711
Update ElasticsearchBuilderExtensions.cs
mitchdenny 287e364
fix typo,variable name,add example docs,add aspire-manifest.json
Alirexaa 0ca1018
Update src/Aspire.Hosting.Elasticsearch/ElasticsearchContainerImageTa…
Alirexaa b8716a4
Update src/Aspire.Hosting.Elasticsearch/ElasticsearchResource.cs
Alirexaa abc9e83
Change Elasticsearch username to constant
Alirexaa 72d8e01
Update Elasticsearch playground
Alirexaa 6026ca1
Update Elasticseach playground aspire-manifest
Alirexaa cb16e86
Merge branch 'dotnet:main' into elasticsearch-hosing
Alirexaa 0d8d276
Add Aspire.Elastic.Clints.Elasticsearch component
Alirexaa 08537b0
add README.md
Alirexaa 879c5f9
fix readme
Alirexaa a49cf72
using Aspire.Elastic.Clients.Elasticsearch in playground
Alirexaa ae5e116
fix build error , add health check
Alirexaa 4811f54
Merge branch 'main' into elasticsearch-hosing
Alirexaa 64b06e3
using PackageReference `AspNetCore.HealthChecks.Elasticsearch` with `…
Alirexaa d77e270
Merge branch 'elasticsearch-hosing' of https://github.com/Alirexaa/as…
Alirexaa 4aae48c
add tests project
Alirexaa 82e7298
add more tests
Alirexaa 61c9db8
change ManifestGenerationTests
Alirexaa 44e15d1
add tracing
Alirexaa 6886908
fix HealthCheck
Alirexaa ccae991
Merge branch 'main' into elasticsearch-hosing
Alirexaa c5394fa
remove guard
Alirexaa 067a0b7
Merge branch 'elasticsearch-hosing' of https://github.com/Alirexaa/as…
Alirexaa c11d7be
xml docs
Alirexaa 666d73a
fix xml docs
Alirexaa e3060b6
fix build
Alirexaa fac6fc2
Apply suggestions from code review
Alirexaa 9f61338
fix compile errors
Alirexaa 3992643
delay creating Elasticsearch client
Alirexaa a4d36f8
remove HealthCheck unused code
Alirexaa 7977e56
clean renaming AddElasticClientsElasticsearch -> AddElasticsearchClient
Alirexaa cd099d7
remove readme in test project
Alirexaa b9f2622
Remove isReadonly parameters.
mitchdenny 25046b3
Minor PR feedback
eerhardt 51ce86f
Merge remote-tracking branch 'upstream/main' into elasticsearch-hosing
eerhardt e2074e8
Merge remote-tracking branch 'upstream/main' into elasticsearch-hosing
eerhardt c0986e7
Apply suggestions from code review
Alirexaa cb29f9b
seperate Elaticsearch tests
Alirexaa 42dd62b
fix build error
Alirexaa 647dc23
Merge branch 'main' into elasticsearch-hosing
Alirexaa 40999c7
add suggested changes
Alirexaa 0e0e58c
Merge branch 'elasticsearch-hosing' of https://github.com/Alirexaa/as…
Alirexaa ab7069f
Merge branch 'dotnet:main' into elasticsearch-hosing
Alirexaa 171e60d
Add Aspire.Hosting.Elasticsearch to Directory.Packages.Helix.props
sebastienros de6474f
Merge branch 'main' into elasticsearch-hosing
sebastienros a45e26f
remove invalid test
Alirexaa ce3f1a2
fix type name
Alirexaa 8f99db1
fix failing test
Alirexaa b8ce534
add functional tests
Alirexaa 71b45d3
add elastic logo
Alirexaa 69f657e
Update Telemtry And Component Progress
Alirexaa 557c72b
Add SuppressFinalPackageVersion for the initial version of the Elasti…
eerhardt b5bb53e
Merge branch 'main' into elasticsearch-hosing
radical 0c5dfc0
fix merge
radical 3088bac
Merge remote-tracking branch 'upstream/main' into elasticsearch-hosing
eerhardt aba6d1e
Merge remote-tracking branch 'origin/main' into elasticsearch-hosing
radical e0b638e
Remove elasticsearch from EndToEnd tests now that we have functional …
eerhardt fe594e5
Merge remote-tracking branch 'Alirexaa/elasticsearch-hosing' into ela…
eerhardt 91abd1b
fix tests
eerhardt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
| ||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
|
@@ -492,12 +491,27 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.Azure.WebPub | |
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.Valkey", "src\Aspire.Hosting.Valkey\Aspire.Hosting.Valkey.csproj", "{5CB63205-24F4-4388-A41B-BAF3BEA59866}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "withdockerfile", "withdockerfile", "{A6813855-E322-41EF-B2E6-7A44949EF962}" | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.Elasticsearch", "src\Aspire.Hosting.Elasticsearch\Aspire.Hosting.Elasticsearch.csproj", "{9357EC71-823B-433A-9993-B7CB2FA082D1}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Elastic.Clients.Elasticsearch", "src\Components\Aspire.Elastic.Clients.Elasticsearch\Aspire.Elastic.Clients.Elasticsearch.csproj", "{3F7B206E-5457-458F-AA81-9449FA3C1B5C}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Elasticsearch", "Elasticsearch", "{6C71A90C-30AE-45D7-9347-D66F9B257CBE}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elasticsearch.ApiService", "playground\Elasticsearch\Elasticsearch.ApiService\Elasticsearch.ApiService.csproj", "{F7F57331-5DDD-444A-A620-8639FC9362B2}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elasticsearch.AppHost", "playground\Elasticsearch\Elasticsearch.AppHost\Elasticsearch.AppHost.csproj", "{569B8215-BDB1-445D-A7BA-DB255700A4AC}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dockerfile", "dockerfile", "{A6813855-E322-41EF-B2E6-7A44949EF962}" | ||
======= | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "withdockerfile", "withdockerfile", "{5B5DC91B-5754-4CE5-B3C0-FA1584B916A0}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WithDockerfile.AppHost", "playground\withdockerfile\WithDockerfile.AppHost\WithDockerfile.AppHost.csproj", "{E6BE41D3-872C-47D2-B5B1-78C37AFAEAF9}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.Containers.Tests", "tests\Aspire.Hosting.Containers.Tests\Aspire.Hosting.Containers.Tests.csproj", "{588CD2D7-EE70-43C1-8233-330854BDF53C}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Elastic.Clients.Elasticsearch.Tests", "tests\Aspire.Elastic.Clients.Elasticsearch.Tests\Aspire.Elastic.Clients.Elasticsearch.Tests.csproj", "{D5B392A4-29CD-41F9-8847-0C211C832713}" | ||
======= | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "python", "python", "{7123AB7A-A4FD-4F64-8B05-D2DD0C3E2ABC}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo? |
||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.AppHost", "playground\python\Python.AppHost\Python.AppHost.csproj", "{173BDA6E-F175-4457-BF64-58CD184E9A81}" | ||
|
@@ -1304,6 +1318,23 @@ Global | |
{5CB63205-24F4-4388-A41B-BAF3BEA59866}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{5CB63205-24F4-4388-A41B-BAF3BEA59866}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{5CB63205-24F4-4388-A41B-BAF3BEA59866}.Release|Any CPU.Build.0 = Release|Any CPU | ||
|
||
{9357EC71-823B-433A-9993-B7CB2FA082D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{9357EC71-823B-433A-9993-B7CB2FA082D1}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{9357EC71-823B-433A-9993-B7CB2FA082D1}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{9357EC71-823B-433A-9993-B7CB2FA082D1}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{3F7B206E-5457-458F-AA81-9449FA3C1B5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3F7B206E-5457-458F-AA81-9449FA3C1B5C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{3F7B206E-5457-458F-AA81-9449FA3C1B5C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3F7B206E-5457-458F-AA81-9449FA3C1B5C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{F7F57331-5DDD-444A-A620-8639FC9362B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F7F57331-5DDD-444A-A620-8639FC9362B2}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F7F57331-5DDD-444A-A620-8639FC9362B2}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F7F57331-5DDD-444A-A620-8639FC9362B2}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{569B8215-BDB1-445D-A7BA-DB255700A4AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{569B8215-BDB1-445D-A7BA-DB255700A4AC}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{569B8215-BDB1-445D-A7BA-DB255700A4AC}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{569B8215-BDB1-445D-A7BA-DB255700A4AC}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{E6BE41D3-872C-47D2-B5B1-78C37AFAEAF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{E6BE41D3-872C-47D2-B5B1-78C37AFAEAF9}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{E6BE41D3-872C-47D2-B5B1-78C37AFAEAF9}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
|
@@ -1312,6 +1343,10 @@ Global | |
{588CD2D7-EE70-43C1-8233-330854BDF53C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{588CD2D7-EE70-43C1-8233-330854BDF53C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{588CD2D7-EE70-43C1-8233-330854BDF53C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{D5B392A4-29CD-41F9-8847-0C211C832713}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D5B392A4-29CD-41F9-8847-0C211C832713}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D5B392A4-29CD-41F9-8847-0C211C832713}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D5B392A4-29CD-41F9-8847-0C211C832713}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{173BDA6E-F175-4457-BF64-58CD184E9A81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{173BDA6E-F175-4457-BF64-58CD184E9A81}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{173BDA6E-F175-4457-BF64-58CD184E9A81}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
|
@@ -1551,6 +1586,15 @@ Global | |
{9FAE1602-2C69-4D24-8655-A164489441E8} = {4981B3A5-4AFD-4191-BF7D-8692D9783D60} | ||
{DF00FDA3-D3EC-4E07-B4EC-0EBB57A813A4} = {77CFE74A-32EE-400C-8930-5025E8555256} | ||
{5CB63205-24F4-4388-A41B-BAF3BEA59866} = {B80354C7-BE58-43F6-8928-9F3A74AB7F47} | ||
{9357EC71-823B-433A-9993-B7CB2FA082D1} = {B80354C7-BE58-43F6-8928-9F3A74AB7F47} | ||
{3F7B206E-5457-458F-AA81-9449FA3C1B5C} = {27381127-6C45-4B4C-8F18-41FF48DFE4B2} | ||
{6C71A90C-30AE-45D7-9347-D66F9B257CBE} = {D173887B-AF42-4576-B9C1-96B9E9B3D9C0} | ||
{F7F57331-5DDD-444A-A620-8639FC9362B2} = {6C71A90C-30AE-45D7-9347-D66F9B257CBE} | ||
{569B8215-BDB1-445D-A7BA-DB255700A4AC} = {6C71A90C-30AE-45D7-9347-D66F9B257CBE} | ||
{A6813855-E322-41EF-B2E6-7A44949EF962} = {D173887B-AF42-4576-B9C1-96B9E9B3D9C0} | ||
{E6BE41D3-872C-47D2-B5B1-78C37AFAEAF9} = {A6813855-E322-41EF-B2E6-7A44949EF962} | ||
{588CD2D7-EE70-43C1-8233-330854BDF53C} = {4981B3A5-4AFD-4191-BF7D-8692D9783D60} | ||
{D5B392A4-29CD-41F9-8847-0C211C832713} = {4981B3A5-4AFD-4191-BF7D-8692D9783D60} | ||
{A6813855-E322-41EF-B2E6-7A44949EF962} = {D173887B-AF42-4576-B9C1-96B9E9B3D9C0} | ||
{E6BE41D3-872C-47D2-B5B1-78C37AFAEAF9} = {A6813855-E322-41EF-B2E6-7A44949EF962} | ||
{588CD2D7-EE70-43C1-8233-330854BDF53C} = {4981B3A5-4AFD-4191-BF7D-8692D9783D60} | ||
|
This file contains 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
12 changes: 12 additions & 0 deletions
12
playground/Elasticsearch/Elasticsearch.ApiService/Elasticsearch.ApiService.csproj
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\src\Components\Aspire.Elastic.Clients.Elasticsearch\Aspire.Elastic.Clients.Elasticsearch.csproj" /> | ||
<ProjectReference Include="..\..\Playground.ServiceDefaults\Playground.ServiceDefaults.csproj" /> | ||
</ItemGroup> | ||
</Project> |
10 changes: 10 additions & 0 deletions
10
playground/Elasticsearch/Elasticsearch.ApiService/Models/Person.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace Elasticsearch.ApiService.Models; | ||
|
||
public class Person | ||
{ | ||
public required string FirstName { get; set; } | ||
public required string LastName { get; set; } | ||
} |
39 changes: 39 additions & 0 deletions
39
playground/Elasticsearch/Elasticsearch.ApiService/Program.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using Elastic.Clients.Elasticsearch; | ||
using Elasticsearch.ApiService.Models; | ||
|
||
var builder = WebApplication.CreateBuilder(args); | ||
|
||
builder.AddServiceDefaults(); | ||
|
||
builder.AddElasticsearchClient("elasticsearch"); | ||
|
||
var app = builder.Build(); | ||
|
||
app.MapGet("/get", async (ElasticsearchClient elasticClient) => | ||
{ | ||
var response = await elasticClient.GetAsync<Person>("people", "1"); | ||
return response; | ||
}); | ||
|
||
app.MapGet("/create", async (ElasticsearchClient elasticClient) => | ||
{ | ||
var exist = await elasticClient.Indices.ExistsAsync("people"); | ||
if (exist.Exists) | ||
{ | ||
await elasticClient.Indices.DeleteAsync("people"); | ||
} | ||
|
||
var person = new Person | ||
{ | ||
FirstName = "Alireza", | ||
LastName = "Baloochi" | ||
}; | ||
|
||
var response = await elasticClient.IndexAsync<Person>(person, "people", "1"); | ||
return response; | ||
}); | ||
|
||
app.Run(); |
38 changes: 38 additions & 0 deletions
38
playground/Elasticsearch/Elasticsearch.ApiService/Properties/launchSettings.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/launchsettings.json", | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:4855", | ||
"sslPort": 44376 | ||
} | ||
}, | ||
"profiles": { | ||
"http": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "http://localhost:5053", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"https": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "https://localhost:7158;http://localhost:5053", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
playground/Elasticsearch/Elasticsearch.ApiService/appsettings.Development.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning" | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
playground/Elasticsearch/Elasticsearch.ApiService/appsettings.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning" | ||
} | ||
}, | ||
"AllowedHosts": "*" | ||
} |
8 changes: 8 additions & 0 deletions
8
playground/Elasticsearch/Elasticsearch.AppHost/Directory.Build.props
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project> | ||
|
||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
|
||
<!-- NOTE: This line is only required because we are using P2P references, not NuGet. It will not exist in real apps. --> | ||
<Import Project="../../../src/Aspire.Hosting.AppHost/build/Aspire.Hosting.AppHost.props" /> | ||
|
||
</Project> |
9 changes: 9 additions & 0 deletions
9
playground/Elasticsearch/Elasticsearch.AppHost/Directory.Build.targets
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project> | ||
|
||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" /> | ||
|
||
<!-- NOTE: These lines are only required because we are using P2P references, not NuGet. They will not exist in real apps. --> | ||
<Import Project="..\..\..\src\Aspire.Hosting.AppHost\build\Aspire.Hosting.AppHost.targets" /> | ||
<Import Project="..\..\..\src\Aspire.Hosting.Sdk\SDK\Sdk.targets" /> | ||
|
||
</Project> |
22 changes: 22 additions & 0 deletions
22
playground/Elasticsearch/Elasticsearch.AppHost/Elasticsearch.AppHost.csproj
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<IsAspireHost>true</IsAspireHost> | ||
<UserSecretsId>76c9a20b-a2cc-4874-8d26-6fbe827d11bf</UserSecretsId> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\src\Aspire.Dashboard\Aspire.Dashboard.csproj" /> | ||
<ProjectReference Include="..\..\..\src\Aspire.Hosting.AppHost\Aspire.Hosting.AppHost.csproj" IsAspireProjectResource="false" /> | ||
<ProjectReference Include="..\..\..\src\Aspire.Hosting.Elasticsearch\Aspire.Hosting.Elasticsearch.csproj" IsAspireProjectResource="false" /> | ||
<ProjectReference Include="..\Elasticsearch.ApiService\Elasticsearch.ApiService.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="$(SharedDir)KnownResourceNames.cs" Link="KnownResourceNames.cs" /> | ||
</ItemGroup> | ||
</Project> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
var builder = DistributedApplication.CreateBuilder(args); | ||
|
||
var elasticsearch = builder.AddElasticsearch("elasticsearch") | ||
Alirexaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.WithDataVolume(); | ||
|
||
builder.AddProject<Projects.Elasticsearch_ApiService>("elasticsearch-apiservice") | ||
.WithReference(elasticsearch); | ||
|
||
// This project is only added in playground projects to support development/debugging | ||
// of the dashboard. It is not required in end developer code. Comment out this code | ||
// to test end developer dashboard launch experience. Refer to Directory.Build.props | ||
// for the path to the dashboard binary (defaults to the Aspire.Dashboard bin output | ||
// in the artifacts dir). | ||
builder.AddProject<Projects.Aspire_Dashboard>(KnownResourceNames.AspireDashboard); | ||
|
||
builder.Build().Run(); |
41 changes: 41 additions & 0 deletions
41
playground/Elasticsearch/Elasticsearch.AppHost/Properties/launchSettings.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/launchsettings.json", | ||
"profiles": { | ||
"https": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "https://localhost:17196;http://localhost:15122", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"DOTNET_ENVIRONMENT": "Development", | ||
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21146", | ||
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22194" | ||
} | ||
}, | ||
"http": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "http://localhost:15122", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"DOTNET_ENVIRONMENT": "Development", | ||
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19117", | ||
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20104" | ||
} | ||
}, | ||
"generate-manifest": { | ||
"commandName": "Project", | ||
"launchBrowser": true, | ||
"dotnetRunMessages": true, | ||
"commandLineArgs": "--publisher manifest --output-path aspire-manifest.json", | ||
"applicationUrl": "http://localhost:15122", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"DOTNET_ENVIRONMENT": "Development", | ||
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:16175" | ||
} | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
playground/Elasticsearch/Elasticsearch.AppHost/appsettings.Development.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning" | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
playground/Elasticsearch/Elasticsearch.AppHost/appsettings.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information", | ||
"Microsoft.AspNetCore": "Warning", | ||
"Aspire.Hosting.Dcp": "Warning" | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?