Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi-module WVD deployment with some prereqs #1010

Merged
merged 7 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions docs/examples/101/wvd-backplane/main.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//Define WVD deployment parameters
param hostpoolName string = 'myFirstHostpool'
param hostpoolFriendlyName string = 'My Bicep created Host pool'
param appgroupName string = 'myFirstAppGroup'
param appgroupNameFriendlyName string = 'My Bicep created AppGroup'
param workspaceName string = 'myFirstWortkspace'
param workspaceNameFriendlyName string = 'My Bicep created Workspace'
param applicationgrouptype string = 'Desktop'
param preferredAppGroupType string = 'Desktop'
param wvdbackplanelocation string = 'eastus'
param hostPoolType string = 'pooled'
param loadBalancerType string = 'BreadthFirst'

//Create WVD Hostpool
resource hp 'Microsoft.DesktopVirtualization/hostpools@2019-12-10-preview' = {
name: hostpoolName
location: wvdbackplanelocation
properties: {
friendlyName: hostpoolFriendlyName
hostPoolType: hostPoolType
loadBalancerType: loadBalancerType
preferredAppGroupType: preferredAppGroupType
}
}

//Create WVD AppGroup
resource ag 'Microsoft.DesktopVirtualization/applicationgroups@2019-12-10-preview' = {
name: appgroupName
location: wvdbackplanelocation
properties: {
friendlyName: appgroupNameFriendlyName
applicationGroupType: applicationgrouptype
hostPoolArmPath: hp.id
}
}

//Create WVD Workspace
resource ws 'Microsoft.DesktopVirtualization/workspaces@2019-12-10-preview' = {
name: workspaceName
location: wvdbackplanelocation
properties: {
friendlyName: workspaceNameFriendlyName
applicationGroupReferences: [
ag.id
]
}
}
94 changes: 94 additions & 0 deletions docs/examples/101/wvd-backplane/main.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"hostpoolName": {
"type": "string",
"defaultValue": "myFirstHostpool"
},
"hostpoolFriendlyName": {
"type": "string",
"defaultValue": "My Bicep created Host pool"
},
"appgroupName": {
"type": "string",
"defaultValue": "myFirstAppGroup"
},
"appgroupNameFriendlyName": {
"type": "string",
"defaultValue": "My Bicep created AppGroup"
},
"workspaceName": {
"type": "string",
"defaultValue": "myFirstWortkspace"
},
"workspaceNameFriendlyName": {
"type": "string",
"defaultValue": "My Bicep created Workspace"
},
"applicationgrouptype": {
"type": "string",
"defaultValue": "Desktop"
},
"preferredAppGroupType": {
"type": "string",
"defaultValue": "Desktop"
},
"wvdbackplanelocation": {
"type": "string",
"defaultValue": "eastus"
},
"hostPoolType": {
"type": "string",
"defaultValue": "pooled"
},
"loadBalancerType": {
"type": "string",
"defaultValue": "BreadthFirst"
}
},
"functions": [],
"resources": [
{
"type": "Microsoft.DesktopVirtualization/hostPools",
"apiVersion": "2019-12-10-preview",
"name": "[parameters('hostpoolName')]",
"location": "[parameters('wvdbackplanelocation')]",
"properties": {
"friendlyName": "[parameters('hostpoolFriendlyName')]",
"hostPoolType": "[parameters('hostPoolType')]",
"loadBalancerType": "[parameters('loadBalancerType')]",
"preferredAppGroupType": "[parameters('preferredAppGroupType')]"
}
},
{
"type": "Microsoft.DesktopVirtualization/applicationGroups",
"apiVersion": "2019-12-10-preview",
"name": "[parameters('appgroupName')]",
"location": "[parameters('wvdbackplanelocation')]",
"properties": {
"friendlyName": "[parameters('appgroupNameFriendlyName')]",
"applicationGroupType": "[parameters('applicationgrouptype')]",
"hostPoolArmPath": "[resourceId('Microsoft.DesktopVirtualization/hostPools', parameters('hostpoolName'))]"
},
"dependsOn": [
"[resourceId('Microsoft.DesktopVirtualization/hostPools', parameters('hostpoolName'))]"
]
},
{
"type": "Microsoft.DesktopVirtualization/workspaces",
"apiVersion": "2019-12-10-preview",
"name": "[parameters('workspaceName')]",
"location": "[parameters('wvdbackplanelocation')]",
"properties": {
"friendlyName": "[parameters('workspaceNameFriendlyName')]",
"applicationGroupReferences": [
"[resourceId('Microsoft.DesktopVirtualization/applicationGroups', parameters('appgroupName'))]"
]
},
"dependsOn": [
"[resourceId('Microsoft.DesktopVirtualization/applicationGroups', parameters('appgroupName'))]"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
targetScope = 'subscription'

//Define WVD deployment parameters
param resourceGroupPrefrix string = 'NINJA-WE-P-RG-WVD-BICEP-WVD-'
param hostpoolName string = 'myBicepHostpool'
param hostpoolFriendlyName string = 'My Bicep deployed Hostpool'
param appgroupName string = 'myBicepAppGroup'
param appgroupNameFriendlyName string = 'My Bicep deployed Appgroup'
param workspaceName string = 'myBicepWorkspace'
param workspaceNameFriendlyName string = 'My Bicep deployed Workspace'
param preferredAppGroupType string = 'Desktop'
param wvdbackplanelocation string = 'eastus'
param hostPoolType string = 'pooled'
param loadBalancerType string = 'BreadthFirst'
param logAnalyticsWorkspaceName string = 'myNinjaBicepLAWorkspace'

//Define Networking deployment parameters
param vnetName string = 'bicep-vnet'
param vnetaddressPrefix string = '10.0.0.0/15'
param subnetPrefix string = '10.0.1.0/24'
param vnetLocation string = 'westeurope'
param subnetName string = 'bicep-subnet'

//Define Azure Files deployment parameters
param storageaccountlocation string = 'westeurope'
param storageaccountName string = 'bicepsa'
param storageaccountkind string = 'FileStorage'
param storgeaccountglobalRedundancy string = 'Premium_LRS'
param fileshareFolderName string = 'profilecontainers'

//Create Resource Groups
resource rgwvd 'Microsoft.Resources/resourceGroups@2020-06-01' = {
name: '${resourceGroupPrefrix}BACKPLANE'
location: 'westeurope'
}
resource rgnetw 'Microsoft.Resources/resourceGroups@2020-06-01' = {
name: '${resourceGroupPrefrix}NETWORK'
location: 'westeurope'
}
resource rgfs 'Microsoft.Resources/resourceGroups@2020-06-01' = {
name: '${resourceGroupPrefrix}FILESERVICES'
location: 'westeurope'
}
resource rdmon 'Microsoft.Resources/resourceGroups@2020-06-01' = {
name: '${resourceGroupPrefrix}MONITOR'
location: 'westeurope'
}

//Create WVD backplane objects and configure Log Analytics Diagnostics Settings
module wvdbackplane './wvd-backplane-module.bicep' = {
name: 'wvdbackplane'
scope: resourceGroup(rgwvd.name)
params: {
hostpoolName: hostpoolName
hostpoolFriendlyName: hostpoolFriendlyName
appgroupName: appgroupName
appgroupNameFriendlyName: appgroupNameFriendlyName
workspaceName: workspaceName
workspaceNameFriendlyName: workspaceNameFriendlyName
preferredAppGroupType: preferredAppGroupType
applicationgrouptype: preferredAppGroupType
wvdbackplanelocation: wvdbackplanelocation
hostPoolType: hostPoolType
loadBalancerType: loadBalancerType
logAnalyticsWorkspaceName: logAnalyticsWorkspaceName
logAnalyticsResourceGroup: rdmon.name
wvdBackplaneResourceGroup: rgwvd.name
}
}

//Create WVD Netwerk and Subnet
module wvdnetwork './wvd-network-module.bicep' = {
name: 'wvdnetwork'
scope: resourceGroup(rgnetw.name)
params: {
vnetName: vnetName
vnetaddressPrefix: vnetaddressPrefix
subnetPrefix: subnetPrefix
vnetLocation: vnetLocation
subnetName: subnetName
}
}

//Create WVD Azure File Services and FileShare`
module wvdFileServices './wvd-fileservices-module.bicep' = {
name: 'wvdFileServices'
scope: resourceGroup(rgfs.name)
params: {
storageaccountlocation: storageaccountlocation
storageaccountName: storageaccountName
storageaccountkind: storageaccountkind
storgeaccountglobalRedundancy: storgeaccountglobalRedundancy
fileshareFolderName: fileshareFolderName
}
}
Loading