Skip to content

Commit

Permalink
updating samples for new environment variables schema (#1742)
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Beenham <[email protected]>
Co-authored-by: Karishma Chawla <[email protected]>
  • Loading branch information
superbeeny and kachawla authored Sep 6, 2024
1 parent c3b967b commit ac2909a
Show file tree
Hide file tree
Showing 25 changed files with 649 additions and 217 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This repository contains the source code for quickstarts, reference apps, and tutorials for Radius.

To try out one of these samples, visit https://docs.radapp.dev
To try out one of these samples, visit https://docs.radapp.io

## Codespace

Expand Down
16 changes: 12 additions & 4 deletions samples/aws-sqs/sqs.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ resource producer 'Applications.Core/containers@2023-10-01-preview' = {
container: {
env: union(
{
SQS_QUEUE_URL: queue.properties.QueueUrl
HTTP_SERVER_PORT: '3000'
SQS_QUEUE_URL: {
value: queue.properties.QueueUrl
}
HTTP_SERVER_PORT: {
value: '3000'
}
},
aws_credential
)
Expand All @@ -58,8 +62,12 @@ resource consumer 'Applications.Core/containers@2023-10-01-preview' = {
container: {
env: union(
{
SQS_QUEUE_URL: queue.properties.QueueUrl
HTTP_SERVER_PORT: '4000'
SQS_QUEUE_URL: {
value: queue.properties.QueueUrl
}
HTTP_SERVER_PORT: {
value: '4000'
}
},
aws_credential
)
Expand Down
16 changes: 12 additions & 4 deletions samples/aws/awss3.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,18 @@ resource frontend 'Applications.Core/containers@2023-10-01-preview' = {
application: app.id
container: {
env: {
BUCKET_NAME: s3.properties.BucketName
AWS_ACCESS_KEY_ID: aws_access_key_id
AWS_SECRET_ACCESS_KEY: aws_secret_access_key
AWS_DEFAULT_REGION: aws_region
BUCKET_NAME: {
value: s3.properties.BucketName
}
AWS_ACCESS_KEY_ID: {
value: aws_access_key_id
}
AWS_SECRET_ACCESS_KEY: {
value: aws_secret_access_key
}
AWS_DEFAULT_REGION: {
value: aws_region
}
}
image: image
}
Expand Down
8 changes: 6 additions & 2 deletions samples/dapr/dapr-azure.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ resource frontend 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: 'ghcr.io/radius-project/samples/dapr-frontend:latest'
env: {
CONNECTION_BACKEND_APPID: backend.name
ASPNETCORE_URLS: 'http://*:8080'
CONNECTION_BACKEND_APPID: {
value: backend.name
}
ASPNETCORE_URLS: {
value: 'http://*:8080'
}
}
ports: {
ui: {
Expand Down
8 changes: 6 additions & 2 deletions samples/dapr/dapr.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ resource frontend 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: frontendImage
env: {
CONNECTION_BACKEND_APPID: backend.name
ASPNETCORE_URLS: 'http://*:8080'
CONNECTION_BACKEND_APPID: {
value: backend.name
}
ASPNETCORE_URLS: {
value: 'http://*:8080'
}
}
ports: {
ui: {
Expand Down
20 changes: 15 additions & 5 deletions samples/eshop-dapr/services/basket-api.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,21 @@ resource basketApi 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: 'ghcr.io/radius-project/samples/eshopdapr/basket.api:rad-latest'
env: {
ASPNETCORE_ENVIRONMENT: 'Development'
ASPNETCORE_URLS: 'http://0.0.0.0:80'
IdentityUrl: 'http://identity-api:80'
IdentityUrlExternal: '${gateway.properties.url}/identity/'
SeqServerUrl: 'http://seq:5340'
ASPNETCORE_ENVIRONMENT: {
value: 'Development'
}
ASPNETCORE_URLS: {
value: 'http://0.0.0.0:80'
}
IdentityUrl: {
value: 'http://identity-api:80'
}
IdentityUrlExternal: {
value: '${gateway.properties.url}/identity/'
}
SeqServerUrl: {
value: 'http://seq:5340'
}
}
ports: {
http: {
Expand Down
20 changes: 15 additions & 5 deletions samples/eshop-dapr/services/blazor-client.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,21 @@ resource blazorClient 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: 'ghcr.io/radius-project/samples/eshopdapr/blazor.client:rad-latest'
env: {
ASPNETCORE_ENVIRONMENT: 'Development'
ASPNETCORE_URLS: 'http://0.0.0.0:80'
ApiGatewayUrlExternal: '${gateway.properties.url}/api/'
IdentityUrlExternal: '${gateway.properties.url}/identity/'
SeqServerUrl: 'http://seq:5340'
ASPNETCORE_ENVIRONMENT: {
value: 'Development'
}
ASPNETCORE_URLS: {
value: 'http://0.0.0.0:80'
}
ApiGatewayUrlExternal: {
value: '${gateway.properties.url}/api/'
}
IdentityUrlExternal: {
value: '${gateway.properties.url}/identity/'
}
SeqServerUrl: {
value: 'http://seq:5340'
}
}
ports: {
http: {
Expand Down
16 changes: 12 additions & 4 deletions samples/eshop-dapr/services/catalog-api.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,18 @@ resource catalogApi 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: 'ghcr.io/radius-project/samples/eshopdapr/catalog.api:rad-latest'
env: {
ASPNETCORE_ENVIRONMENT: 'Development'
ASPNETCORE_URLS: 'http://0.0.0.0:80'
RetryMigrations: 'true'
SeqServerUrl: 'http://seq:5340'
ASPNETCORE_ENVIRONMENT: {
value: 'Development'
}
ASPNETCORE_URLS: {
value: 'http://0.0.0.0:80'
}
RetryMigrations: {
value: 'true'
}
SeqServerUrl: {
value: 'http://seq:5340'
}
}
ports: {
http: {
Expand Down
28 changes: 21 additions & 7 deletions samples/eshop-dapr/services/identity-api.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,27 @@ resource identityApi 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: 'ghcr.io/radius-project/samples/eshopdapr/identity.api:rad-latest'
env: {
ASPNETCORE_ENVIRONMENT: 'Development'
ASPNETCORE_URLS: 'http://0.0.0.0:80'
PATH_BASE: '/identity/'
BlazorClientUrlExternal: gateway.properties.url
IssuerUrl: '${gateway.properties.url}/identity/'
RetryMigrations: 'true'
SeqServerUrl: 'http://seq:5340'
ASPNETCORE_ENVIRONMENT: {
value: 'Development'
}
ASPNETCORE_URLS: {
value: 'http://0.0.0.0:80'
}
PATH_BASE: {
value: '/identity/'
}
BlazorClientUrlExternal: {
value: gateway.properties.url
}
IssuerUrl: {
value: '${gateway.properties.url}/identity/'
}
RetryMigrations: {
value: 'true'
}
SeqServerUrl: {
value: 'http://seq:5340'
}
}
ports: {
http: {
Expand Down
28 changes: 21 additions & 7 deletions samples/eshop-dapr/services/ordering-api.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,27 @@ resource orderingApi 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: 'ghcr.io/radius-project/samples/eshopdapr/ordering.api:rad-latest'
env: {
ASPNETCORE_ENVIRONMENT: 'Development'
ASPNETCORE_URLS: 'http://0.0.0.0:80'
IdentityUrl: 'http://identity-api:80'
IdentityUrlExternal: '${gateway.properties.url}/identity/'
RetryMigrations: 'true'
SeqServerUrl: 'http://seq:5340'
SendConfirmationEmail: 'false'
ASPNETCORE_ENVIRONMENT: {
value: 'Development'
}
ASPNETCORE_URLS: {
value: 'http://0.0.0.0:80'
}
IdentityUrl: {
value: 'http://identity-api:80'
}
IdentityUrlExternal: {
value: '${gateway.properties.url}/identity/'
}
RetryMigrations: {
value: 'true'
}
SeqServerUrl: {
value: 'http://seq:5340'
}
SendConfirmationEmail: {
value: 'false'
}
}
ports: {
http: {
Expand Down
12 changes: 9 additions & 3 deletions samples/eshop-dapr/services/payment-api.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@ resource paymentApi 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: 'ghcr.io/radius-project/samples/eshopdapr/payment.api:rad-latest'
env: {
ASPNETCORE_ENVIRONMENT: 'Development'
ASPNETCORE_URLS: 'http://0.0.0.0:80'
SeqServerUrl: 'http://seq:5340'
ASPNETCORE_ENVIRONMENT: {
value: 'Development'
}
ASPNETCORE_URLS: {
value: 'http://0.0.0.0:80'
}
SeqServerUrl: {
value: 'http://seq:5340'
}
}
ports: {
http: {
Expand Down
4 changes: 3 additions & 1 deletion samples/eshop-dapr/services/seq.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ resource seq 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: 'datalust/seq:latest'
env: {
ACCEPT_EULA: 'Y'
ACCEPT_EULA: {
value: 'Y'
}
}
ports: {
http: {
Expand Down
32 changes: 24 additions & 8 deletions samples/eshop-dapr/services/webshopping-agg.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,30 @@ resource webshoppingAgg 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: 'ghcr.io/radius-project/samples/eshopdapr/webshoppingagg:rad-latest'
env: {
ASPNETCORE_ENVIRONMENT: 'Development'
ASPNETCORE_URLS: 'http://0.0.0.0:80'
IdentityUrl: 'http://identity-api:80'
IdentityUrlExternal: '${gateway.properties.url}/identity/'
SeqServerUrl: 'http://seq:5340'
BasketUrlHC: 'http://localhost:3500/v1.0/invoke/basket-api/method/liveness'
CatalogUrlHC: 'http://localhost:3500/v1.0/invoke/catalog-api/method/liveness'
IdentityUrlHC: 'http://localhost:3500/v1.0/invoke/identity-api/method/liveness'
ASPNETCORE_ENVIRONMENT: {
value: 'Development'
}
ASPNETCORE_URLS: {
value: 'http://0.0.0.0:80'
}
IdentityUrl: {
value: 'http://identity-api:80'
}
IdentityUrlExternal: {
value: '${gateway.properties.url}/identity/'
}
SeqServerUrl: {
value: 'http://seq:5340'
}
BasketUrlHC: {
value: 'http://localhost:3500/v1.0/invoke/basket-api/method/liveness'
}
CatalogUrlHC: {
value: 'http://localhost:3500/v1.0/invoke/catalog-api/method/liveness'
}
IdentityUrlHC: {
value: 'http://localhost:3500/v1.0/invoke/identity-api/method/liveness'
}
}
ports: {
http: {
Expand Down
16 changes: 12 additions & 4 deletions samples/eshop-dapr/services/webshopping-gw.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ resource webshoppingGw 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: 'ghcr.io/radius-project/samples/eshopdapr/webshoppingapigw:rad-latest'
env: {
ENVOY_CATALOG_API_ADDRESS: 'catalog-api'
ENVOY_CATALOG_API_PORT: '80'
ENVOY_ORDERING_API_ADDRESS: 'ordering-api'
ENVOY_ORDERING_API_PORT: '80'
ENVOY_CATALOG_API_ADDRESS: {
value: 'catalog-api'
}
ENVOY_CATALOG_API_PORT: {
value: '80'
}
ENVOY_ORDERING_API_ADDRESS: {
value: 'ordering-api'
}
ENVOY_ORDERING_API_PORT: {
value: '80'
}
}
ports: {
http: {
Expand Down
Loading

0 comments on commit ac2909a

Please sign in to comment.