Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
ci: update manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
foxminchan committed Jun 2, 2024
1 parent adbf8fa commit 33e20cb
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ dotnet aspirate apply
The project uses OpenTelemetry to collect the telemetry data from the application. The data is sent to the OpenTelemetry Collector and exported to the Aspire Dashboard. The Aspire Dashboard is a monitoring and observability tool that provides insights into the application's performance and behavior. It helps developers to identify and troubleshoot issues in the application.
</p>

<img loading="lazy" src="./img/aspire-dashboard.png" alt="Aspire Dashboard Overview" width="100%" />
<img loading="lazy" src="./img/aspire-dashboard-overview.png" alt="Aspire Dashboard Overview" width="100%" />

<img loading="lazy" src="./img/aspire-dashboard-trace.png" alt="Aspire Dashboard Trace" width="100%" />

Expand Down
Binary file added img/aspire-dashboard-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/aspire-dashboard.png
Binary file not shown.
108 changes: 89 additions & 19 deletions src/RookieShop.AppHost/aspire-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,63 @@
}
}
},
"StripeApiKey": {
"type": "parameter.v0",
"value": "{StripeApiKey.inputs.value}",
"inputs": {
"value": {
"type": "string",
"secret": true
}
}
},
"EmailSecret": {
"type": "parameter.v0",
"value": "{EmailSecret.inputs.value}",
"inputs": {
"value": {
"type": "string",
"secret": true
}
}
},
"GoogleClientId": {
"type": "parameter.v0",
"value": "{GoogleClientId.inputs.value}",
"inputs": {
"value": {
"type": "string",
"secret": true
}
}
},
"GoogleClientSecret": {
"type": "parameter.v0",
"value": "{GoogleClientSecret.inputs.value}",
"inputs": {
"value": {
"type": "string",
"secret": true
}
}
},
"OpenAiKey": {
"type": "parameter.v0",
"value": "{OpenAiKey.inputs.value}",
"inputs": {
"value": {
"type": "string",
"secret": true
}
}
},
"db": {
"type": "container.v0",
"connectionString": "Host={db.bindings.tcp.host};Port={db.bindings.tcp.port};Username={SqlUser.value};Password={SqlPassword.value}",
"image": "docker.io/library/postgres:16.2",
"bindMounts": [
{
"source": "../mnt/postgres",
"source": "../../mnt/postgres",
"target": "/var/lib/postgresql/data",
"readOnly": false
}
Expand Down Expand Up @@ -58,10 +108,14 @@
"type": "container.v0",
"connectionString": "{redis.bindings.tcp.host}:{redis.bindings.tcp.port}",
"image": "docker.io/library/redis:7.2",
"args": ["--save", "60", "1"],
"args": [
"--save",
"60",
"1"
],
"bindMounts": [
{
"source": "../mnt/redis",
"source": "../../mnt/redis",
"target": "/data",
"readOnly": false
}
Expand Down Expand Up @@ -89,17 +143,19 @@
},
"identity-service": {
"type": "project.v0",
"path": "RookieShop.IdentityService/RookieShop.IdentityService.csproj",
"path": "../RookieShop.IdentityService/RookieShop.IdentityService.csproj",
"env": {
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true",
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true",
"OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY": "in_memory",
"ASPNETCORE_FORWARDEDHEADERS_ENABLED": "true",
"ConnectionStrings__redis": "{redis.connectionString}",
"ConnectionStrings__userdb": "{userdb.connectionString}",
"Provider__Google__ClientId": "{GoogleClientId.value}",
"Provider__Google__ClientSecret": "{GoogleClientSecret.value}",
"Client__Backoffice": "{backoffice.bindings.http.url}",
"Client__Storefront": "{storefront.bindings.https.url}",
"Client__Swagger": "{api-service.bindings.https.url}"
"Client__Storefront": "{storefront.bindings.http.url}",
"Client__Swagger": "{api-service.bindings.http.url}"
},
"bindings": {
"http": {
Expand All @@ -116,16 +172,20 @@
},
"api-service": {
"type": "project.v0",
"path": "RookieShop.ApiService/RookieShop.ApiService.csproj",
"path": "../RookieShop.ApiService/RookieShop.ApiService.csproj",
"env": {
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true",
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true",
"OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY": "in_memory",
"ASPNETCORE_FORWARDEDHEADERS_ENABLED": "true",
"ConnectionStrings__redis": "{redis.connectionString}",
"ConnectionStrings__shopdb": "{shopdb.connectionString}",
"StripeSettings__SecretKey": "{StripeApiKey.value}",
"SmtpSettings__Secret": "{EmailSecret.value}",
"AzuriteSettings__ConnectionString": "{blobs.connectionString}",
"OpenIdSettings__Authority": "{identity-service.bindings.https.url}"
"OpenIdSettings__Authority": "{identity-service.bindings.https.url}",
"CorsSettings__Storefront": "{storefront.bindings.http.url}",
"CorsSettings__Backoffice": "{backoffice.bindings.http.url}"
},
"bindings": {
"http": {
Expand All @@ -137,55 +197,65 @@
"scheme": "https",
"protocol": "tcp",
"transport": "http"
},
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http"
}
}
},
"backoffice": {
"type": "dockerfile.v0",
"path": "../ui/backoffice/Dockerfile",
"context": "../ui/backoffice",
"path": "../../ui/backoffice/Dockerfile",
"context": "../../ui/backoffice",
"env": {
"NODE_ENV": "development",
"PORT": "{backoffice.bindings.http.targetPort}",
"BROWSER": "none",
"BASE_API": "{api-service.bindings.https.url}/api/v1",
"AUTH_DUENDE_IDENTITY_SERVER6_ISSUER": "{identity-service.bindings.https.url}"
"NEXT_PUBLIC_BASE_API": "{api-service.bindings.http.url}/api/v1",
"NEXT_PUBLIC_DUENDE_AUTHORITY": "{identity-service.bindings.https.url}"
},
"bindings": {
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http",
"port": 3000,
"targetPort": 8000
}
}
},
"storefront": {
"type": "project.v0",
"path": "../ui/storefront/RookieShop.Storefront.csproj",
"path": "../../ui/storefront/RookieShop.Storefront.csproj",
"env": {
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true",
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true",
"OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY": "in_memory",
"ASPNETCORE_FORWARDEDHEADERS_ENABLED": "true",
"ConnectionStrings__redis": "{redis.connectionString}",
"SmartComponents__ApiKey": "{OpenAiKey.value}",
"OpenIdSettings__Authority": "{identity-service.bindings.https.url}",
"BaseApiEndpoint": "{api-service.bindings.https.url}/api/v1"
"BaseApiEndpoint": "{api-service.bindings.http.url}/api/v1"
},
"bindings": {
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http",
"external": true
"transport": "http"
},
"https": {
"scheme": "https",
"protocol": "tcp",
"transport": "http",
"external": true
"transport": "http"
},
"http": {
"scheme": "http",
"protocol": "tcp",
"transport": "http"
}
}
}
}
}
}
37 changes: 28 additions & 9 deletions src/RookieShop.AppHost/storage.module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ param principalId string
@description('')
param principalType string


resource storageAccount_1XR3Um8QY 'Microsoft.Storage/storageAccounts@2022-09-01' = {
name: toLower(take('storage${uniqueString(resourceGroup().id)}', 24))
location: location
Expand All @@ -31,35 +30,55 @@ resource storageAccount_1XR3Um8QY 'Microsoft.Storage/storageAccounts@2022-09-01'
resource blobService_vTLU20GRg 'Microsoft.Storage/storageAccounts/blobServices@2022-09-01' = {
parent: storageAccount_1XR3Um8QY
name: 'default'
properties: {
}
properties: {}
}

resource roleAssignment_Gz09cEnxb 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: storageAccount_1XR3Um8QY
name: guid(storageAccount_1XR3Um8QY.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'))
name: guid(
storageAccount_1XR3Um8QY.id,
principalId,
subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe')
)
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe')
roleDefinitionId: subscriptionResourceId(
'Microsoft.Authorization/roleDefinitions',
'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
)
principalId: principalId
principalType: principalType
}
}

resource roleAssignment_HRj6MDafS 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: storageAccount_1XR3Um8QY
name: guid(storageAccount_1XR3Um8QY.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3'))
name: guid(
storageAccount_1XR3Um8QY.id,
principalId,
subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3')
)
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3')
roleDefinitionId: subscriptionResourceId(
'Microsoft.Authorization/roleDefinitions',
'0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3'
)
principalId: principalId
principalType: principalType
}
}

resource roleAssignment_r0wA6OpKE 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: storageAccount_1XR3Um8QY
name: guid(storageAccount_1XR3Um8QY.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88'))
name: guid(
storageAccount_1XR3Um8QY.id,
principalId,
subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88')
)
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88')
roleDefinitionId: subscriptionResourceId(
'Microsoft.Authorization/roleDefinitions',
'974c5e8b-45b9-4653-ba55-5f855dd0fb88'
)
principalId: principalId
principalType: principalType
}
Expand Down

0 comments on commit 33e20cb

Please sign in to comment.