This repository demonstrates a sample bicep template deploying a Virtual Machine to azure with the Azure Diagnostics extension enabled.
The deployment process involves the following steps:
- Provision the architecture using Bicep
- Create application deployment package
- Publish application deployment package
- Local bash shell with Azure CLI or Azure Cloud Shell
- Azure Subscription. Create one for free.
- Clone or fork of this repository.
A bash script is included for quickly provisioning a fully functional environment in Azure. The script requires the following parameters:
-n: The deployment name.
-l: The region where resources will be deployed.
-c: A unique string that will ensure all resources provisioned are globally unique.
-u: The virtual machine administrator username
-p: The virtual machine administrator password
NOTE: Please refer to the Resource Name Rules to learn more about globally unique resources.
Follow the steps below to quickly deploy using the bash script:
-
Clone the repository to local machine.
git clone https://github.com/achingono/poc-vm-diagnostics-extension-windows.git
-
Switch to the cloned folder
cd poc-vm-diagnostics-extension-windows
-
Make the bash script executable
chmod +x ./deploy.sh
-
Login to Azure and ensure the correct subscription is selected
az login az account set --subscription <subscription id> az account show
-
Run the script and provide required parameters
./deploy.sh -n sharedsession -l eastus2 -c poc -u azureuser -p <secure password>
In the above command,
sharedsession
is the name of the environment, andpoc
is the variant. This generates a resource group namedrg-sharedsession-eastus2-poc
.
Clean up the deployment by deleting the single resource group that contains the entire infrastructure.
WARNING: This will delete ALL the resources inside the resource group.
-
Make the bash script executable
chmod +x ./destroy.sh
-
Login to Azure and ensure the correct subscription is selected
az login az account set --subscription <subscription id> az account show
-
Run the script and provide required parameters
./destroy.sh -n sharedsession -l eastus2 -c poc