Skip to content

Deployment

Tore Nestenius edited this page Nov 18, 2024 · 6 revisions

Cloud Debugger Deployment Documentation

Overview

The Cloud Debugger is an ASP.NET Core 9-based application designed for deployment across multiple Azure services. It offers flexibility and support for a variety of hosting options:

  • Azure App Services
    • Windows
    • Linux
    • Linux Containers
  • Azure Container Instances
  • Azure Container Apps

image

Requirements

Before deploying the Cloud Debugger, ensure that the following prerequisites are met:

  • Docker: Docker must be up and running to build the container images.
  • Azure Login: You must be logged into Azure using PowerShell. Use the command Connect-AzAccount to authenticate.

Deployment Scripts

The AzureDeploymentScripts folder contains PowerShell scripts for deploying the Cloud Debugger to various Azure services. These scripts automate the deployment process, eliminating the need for manual configuration in Azure.

Deployment Script Descriptions

Below is a summary of each script included in the deployment package:

  • _Settings.ps1
    Contains deployment settings such as names and resource groups. You need to update these values according to your environment.

  • DeleteAllResources.ps1
    Deletes the entire resource group and all associated resources. Use this script with caution.

  • GetUrlToAllDeployments.ps1
    Retrieves the URLs of all deployed services and creates shortcuts in the current folder for easy access.

Build and Deployment Scripts

The following scripts facilitate building and deploying the Cloud Debugger to different Azure services:

  • BuildAndDeployAll.ps1
    Deploys the application to all supported services by invoking all the scripts below.

  • BuildAndPushDockerImage.ps1
    Builds the Docker container image locally and pushes it to the Azure Container Registry (ACR).

  • BuildDeploy-Linux-AppService.ps1
    Builds and deploys the application to an Azure App Service running on Linux.

  • BuildDeploy-Windows-AppService.ps1
    Builds and deploys the application to an Azure App Service running on Windows.

  • BuildDeploy-Container-Linux-AppService.ps1
    Builds and deploys the application to an Azure App Service using a Linux Container.

  • BuildDeploy-Container-Linux-ContainerInstance.ps1
    Builds and deploys the application to Azure Container Instances.

  • BuildDeploy-Container-Linux-ContainerApps.ps1
    Builds and deploys the application to Azure Container Apps.

Usage Instructions

  1. Update Deployment Settings:
    Modify the _Settings.ps1 script to reflect your environment's settings, such as resource group name, application name, and other configurations.

  2. Deploy to All Services:
    Run the BuildAndDeployAll.ps1 script to deploy the application to all supported Azure services.

  3. Deploy to Specific Service:
    Use the individual deployment scripts (e.g., BuildDeploy-Linux-AppService.ps1) to deploy to a specific Azure service.

  4. Retrieve Deployment URLs:
    Run GetUrlToAllDeployments.ps1 to get a list of URLs for all deployments.

  5. Delete All Resources:
    The DeleteAllResources.ps1 script will delete all the created resources, a good way to clean up Azure after using the tool.

Running Locally

The Cloud Debugger is also highly useful when run locally, directly from your development environment such as Visual Studio 2022. You can explore and utilize many of its tools without deploying to Azure, making it a valuable asset for testing and debugging in a local environment.

Simply run the application in Visual Studio, and you’ll have access to a wide range of features such as request logging, identity tools, Blob Storage, Event Hub, and diagnostics.

Troubleshooting

If you encounter issues during deployment, verify that:

  • You are logged into Azure using the correct account.
  • Docker is running and accessible.
  • If Docker is in Suspended mode, the Container build might fail.
  • All environment variables in _Settings.ps1 are correctly configured.
Clone this wiki locally