The dev team uses Visual Studio and they integrate directly with Azure resources when building the code. The team chooses this workflow to so they can integration test with Azure before their code reaches the QA team.
NOTE
This developer experience is only supported for development deployments. Production deployments use network isolation and do not allow devs to connect from their workstation.
Most configurations in the project are stored in Azure App Configuration with secrets saved into Azure Key Vault. To connect to these resources from a developer workstation you need to complete the following steps.
- Set up front-end web app configuration
- Set up back-end web app configuration
To support this workflow the following steps will store data in User Secrets because the code is configured so that these values override configurations and secrets saved in Azure.
Note that
secrets.json
file is stored relative to the tooling that supports them. Use the Windows Terminal to execute the following commands instead of the Dev Container if you want to use Visual Studio to launch the project. Read How the Secret Manager tool works to learn more.
-
If you are not using PowerShell 7+, run the following command (you can use $PSVersionTable.PSVersion to check your version):
pwsh
-
Connect to Azure
Import-Module Az.Resources
Connect-AzAccount
-
Set the subscription to the one you want to use (you can use Get-AzSubscription to list available subscriptions):
$AZURE_SUBSCRIPTION_ID="<your-subscription-id>"
Set-AzContext -SubscriptionId $AZURE_SUBSCRIPTION_ID
-
Get the Azure App Configuration URI
$appConfigurationUri = ((azd env get-values --output json | ConvertFrom-Json).APP_CONFIG_SERVICE_URI)
-
Switch to the front-end web app directory
cd src/Relecloud.Web.CallCenter
-
Clear any existing user secrets
dotnet user-secrets clear
-
Set the Relecloud API base URI
dotnet user-secrets set "App:RelecloudApi:BaseUri" "https://localhost:7242"
-
Set the Azure App Configuration URI
dotnet user-secrets set "App:AppConfig:Uri" $appConfigurationUri
-
Switch back to the root of the repository
cd ../..
```pwsh
cd src/Relecloud.Web.CallCenter.Api
```
```pwsh
dotnet user-secrets clear
```
```pwsh
dotnet user-secrets set "App:AppConfig:Uri" $appConfigurationUri
```
-
Open the project in Visual Studio
-
Configure the solution to start both the front-end and back-end web apps
-
Run the project (F5)
-
Open the browser and navigate to
https://localhost:7227/
You can learn more about the web app by reading the Pattern Simulations documentation.