diff --git a/01-Bicep/scripts/script01.md b/01-Bicep/scripts/script01.md index 9153c8d..244a06e 100644 --- a/01-Bicep/scripts/script01.md +++ b/01-Bicep/scripts/script01.md @@ -8,4 +8,4 @@ rad group show test -o json rad run ./app_v1.bicep --group test --application demo01 $CTRL+C -rad app delete demo01 -g test -y \ No newline at end of file +rad app delete demo01 --group test -y \ No newline at end of file diff --git a/01-Bicep/scripts/script02.md b/01-Bicep/scripts/script02.md index e656f57..e0fbac8 100644 --- a/01-Bicep/scripts/script02.md +++ b/01-Bicep/scripts/script02.md @@ -1,7 +1,8 @@ cd .. -rad run ./app_v2.bicep --group test --application demo01 +rad deploy ./app_v2.bicep --group test --application demo01 +rad resource expose --group test --application demo01 containers container01 --port 3000 --remote-port 3000 $CTRL+C -rad env show test -g test -o json -rad app delete demo01 -g test -y \ No newline at end of file +rad env show test --group test -o json +rad app delete demo01 --group test -y \ No newline at end of file diff --git a/04-Full/app.bicep b/04-Full/app.bicep new file mode 100644 index 0000000..fe13a21 --- /dev/null +++ b/04-Full/app.bicep @@ -0,0 +1,61 @@ +extension radius + +@description('Specifies the Environment Name.') +param environmentName string = 'test' + +@description('The Radius Application Name.') +param applicationName string = 'demo04' + +@description('Indicates whether to use HTTPS for the Gateway.') +param useHttps string + +@description('The host name of the application.') +param hostName string + +//Deploy shared resources like Jaeger and PubSub +module shared 'shared.bicep' = { + name: 'shared' + params: { + environmentName: environmentName + applicationName: applicationName + } +} +//deploy the frontend (Blazor WebAssembly app) +module frontend 'frontend.bicep' = { + name: 'frontend' + params: { + environmentName: environmentName + applicationName: applicationName + useHttps: useHttps + hostName: hostName + } + dependsOn: [ + shared + dispatchApi + plantApi + ] +} + +//deploy the plant API +module plantApi 'plant.bicep' = { + name: 'plant' + params: { + environmentName: environmentName + applicationName: applicationName + } + dependsOn: [ + shared + ] +} + +//deploy the dispatch API +module dispatchApi 'dispatch.bicep' = { + name: 'dispatch' + params: { + environmentName: environmentName + applicationName: applicationName + } + dependsOn: [ + shared + ] +} diff --git a/04-Full/recipes/azure/otlp_recipe.bicep b/04-Full/recipes/azure/otlp_recipe.bicep index d3272e8..31311c6 100644 --- a/04-Full/recipes/azure/otlp_recipe.bicep +++ b/04-Full/recipes/azure/otlp_recipe.bicep @@ -42,15 +42,18 @@ resource configMap 'core/ConfigMap@v1' = { 'otel-collector-config.yaml': concat(''' receivers: zipkin: + endpoint: "0.0.0.0:9411" extensions: health_check: path: "/health" + endpoint: "0.0.0.0:13133" pprof: endpoint: :1888 zpages: endpoint: :55679 exporters: debug: + verbosity: basic azuremonitor: connection_string: "InstrumentationKey=-45e5-8007-0e9b6c6a5c15;IngestionEndpoint=https://northeurope-2.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=2f51e7eb-f120-4961-8fbd-52905eb88912" processors: diff --git a/04-Full/scripts/portforwards.bat b/04-Full/scripts/portforwards.bat index bf9204a..db68475 100644 --- a/04-Full/scripts/portforwards.bat +++ b/04-Full/scripts/portforwards.bat @@ -1,6 +1,5 @@ -@REM #port forward to app +@REM #set correct k8s cluster kubectl config use-context docker-desktop -wt kubectl port-forward services/frontend 80:80 -n test-demo04 @REM #port forward Jaeger wt kubectl port-forward services/jaeger-3cat3stttmlle 16686:16686 -n test-demo04 diff --git a/04-Full/scripts/script01.md b/04-Full/scripts/script01.md index f944cf2..ae71067 100644 --- a/04-Full/scripts/script01.md +++ b/04-Full/scripts/script01.md @@ -1,7 +1,7 @@ cd .. rad workspace switch local -rad deploy ./frontend.bicep -g test --parameters hostName=localhost --parameters useHttps=true +rad deploy ./app.bicep -g test --parameters hostName=localhost --parameters useHttps=true wt $PWD\scripts\portforwards.bat @@ -9,7 +9,7 @@ wt $PWD\scripts\portforwards.bat #check api health curl -k https://localhost/api/healthz -explorer http://localhost +explorer https://localhost/dispatch explorer http://localhost:16686 explorer http://localhost:7007/resources/test/Applications.Core/applications/demo04/application diff --git a/04-Full/scripts/script02.md b/04-Full/scripts/script02.md index aa1bd57..67c82d2 100644 --- a/04-Full/scripts/script02.md +++ b/04-Full/scripts/script02.md @@ -3,7 +3,7 @@ rad workspace list rad workspace switch cloud rad group create prod -rad deploy ./frontend.bicep --parameters environmentName=prod --parameters hostName=demo.loekd.com +rad deploy ./app.bicep --parameters environmentName=prod --parameters hostName=demo.loekd.com --parameters useHttps=true #check api health curl https://demo.loekd.com/api/healthz