You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 11, 2023. It is now read-only.
* advanced networking arm templates
* use correct file name
* review comments
* fix deployment errors
* making sure that 3389 port is enabled on vm
* doc updates
* create uniquestring
* remove quotes
* read me updates and clean up
This directory contains scripts and ARM templates to deploy resources which would show how to securely debug your projects using Azure Dev Spaces in a secured virtual network.
3
+
4
+
## Overview
5
+
These ARM templates deploy a virtual network with an Azure firewall. The virtual network and Azure firewall ensure the traffic into and out of the virtual network is secured and monitored by the firewall. The AKS cluster is deployed into a private virutal network into the `aks-subnet`. An Azure Dev Spaces controller with `private` endpoint is also created on this AKS cluster and the controller's endpoint is only available in the same virtual network as the AKS cluster. To use Azure Dev Spaces to start debugging your projects, the ARM templates deploy a Windows 10 virtual machine in the `vm-subnet` subnet, which is also in the same virtual network as the AKS cluster.
6
+
The Azure Dev Spaces routing capabilities as well as the endpoints of your services are only available within the virtual network.
7
+
8
+
To learn more about the network architecture of Azure Dev Spaces and configuring its endpoint types see [Configure networking for Azure Dev Spaces in different network topologies.](https://aka.ms/azds-networking)
9
+
10
+
## Prerequisites
11
+
1. This scripts requires `az cli` & `kubectl` to set up the resources.
12
+
2. Ensure that the subscription has `Microsoft.ContainerInstance` & `Microsoft.Storage` resource providers are registered. This is required as the
13
+
templates uses arm's deploymentScripts resource.
14
+
15
+
## Deploying the ARM template
16
+
This folder contains following files which would help in deploying resources:
17
+
*`devspaces-vnet-template.json` is the ARM template
18
+
*`devspaces-vnet-parameters.json` defines the parameter values for the ARM template
19
+
*`deploy.sh` is a script you can use to automate the deployment of the ARM template
20
+
21
+
When using the `deploy.sh` script to deploy the ARM template, the script prompts you for the necessary values. For example:
22
+
```
23
+
$ chmod +x ./deploy.sh
24
+
$ ./deploy.sh
25
+
This script will deploy resouces which will enable you to work securely in a private virtual network.
26
+
Enter the Resource Group name:
27
+
< Enter a resource group name >
28
+
Enter the managed identity name:
29
+
< Enter a name for managed identity >
30
+
Enter a password for connecting to vm:
31
+
< Enter password for the windows VM that is used as a development machine to debug your projects >
32
+
```
33
+
After the deployment is done, the script outputs the required details to connect to the VM for debugging. For example:
34
+
```
35
+
Use '< password >' password to connect to the '< ipaddress >' windows VM created in the Resource group '< resource group name >' to securely debug your projects with Azure Dev Spaces.
36
+
```
37
+
38
+
**Important:** The resources deployed using these templates should be used only as a starting point to secure your virtual network.
39
+
40
+
## Connecting to the virtual network for secure development
41
+
Use the virtual machine created by the ARM template on the virtual network to start developing on your AKS cluster with Azure Dev Spaces. You can use the IP address and the password you set when deploying the ARM template to connect to the virtual machine. For more details on developing with Azure Dev Spaces, see the [Azure Dev Spaces quickstart.](https://aka.ms/azds-quickstart-netcore)
# clean up the mi created for deploying the resources
60
+
az role assignment delete --role 'Contributor' -g $resourceGroupName --assignee $miPrincipalId
61
+
az identity delete -g $resourceGroupName -n $idName
62
+
rm -rf ./kubeconfig
63
+
64
+
echo"Use '$password' password to connect to the '$ip' windows VM created in the Resource group '$resourceGroupName' to securely debug your projects with Azure Dev Spaces."
65
+
echo"Please follow the documentation here https://aka.ms/azds-networking to try out different endpoint scenarios."
0 commit comments