nav-arm-templates/getnavext.json

1060 строки
50 KiB
JSON
Исходник Обычный вид История

2018-11-30 01:37:06 +03:00
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"type": "string",
"defaultValue": "",
"minLength": 3,
"metadata": {
"Description": "Select the name of the deployment"
}
},
"TimezoneId": {
"type": "string",
"defaultValue": "GMT Standard Time",
"allowedValues": [ "Dateline Standard Time","UTC-11","Aleutian Standard Time","Hawaiian Standard Time","Marquesas Standard Time","Alaskan Standard Time","UTC-09","Pacific Standard Time (Mexico)","UTC-08","Pacific Standard Time","US Mountain Standard Time","Mountain Standard Time (Mexico)","Mountain Standard Time","Central America Standard Time","Central Standard Time","Easter Island Standard Time","Central Standard Time (Mexico)","Canada Central Standard Time","SA Pacific Standard Time","Eastern Standard Time (Mexico)","Eastern Standard Time","Haiti Standard Time","Cuba Standard Time","US Eastern Standard Time","Turks And Caicos Standard Time","Paraguay Standard Time","Atlantic Standard Time","Venezuela Standard Time","Central Brazilian Standard Time","SA Western Standard Time","Pacific SA Standard Time","Newfoundland Standard Time","Tocantins Standard Time","E. South America Standard Time","SA Eastern Standard Time","Argentina Standard Time","Greenland Standard Time","Montevideo Standard Time","Magallanes Standard Time","Saint Pierre Standard Time","Bahia Standard Time","UTC-02","Mid-Atlantic Standard Time","Azores Standard Time","Cape Verde Standard Time","UTC","Morocco Standard Time","GMT Standard Time","Greenwich Standard Time","W. Europe Standard Time","Central Europe Standard Time","Romance Standard Time","Central European Standard Time","W. Central Africa Standard Time","Jordan Standard Time","GTB Standard Time","Middle East Standard Time","Egypt Standard Time","E. Europe Standard Time","Syria Standard Time","West Bank Standard Time","South Africa Standard Time","FLE Standard Time","Israel Standard Time","Kaliningrad Standard Time","Sudan Standard Time","Libya Standard Time","Namibia Standard Time","Arabic Standard Time","Turkey Standard Time","Arab Standard Time","Belarus Standard Time","Russian Standard Time","E. Africa Standard Time","Iran Standard Time","Arabian Standard Time","Astrakhan Standard Time","Azerbaijan Standard Time","Russia Time Zone 3","Mauritius Standard Time","Saratov Standard Time","Georgian Standard Time","Caucasus Standard Time","Afghanistan Standard Time","West Asia Standard Time","Ekaterinburg Standard Time","Pakistan Standard Time","India Standard Time","Sri Lanka Standard Time","Nepal Standard Time","Central Asia Standard Time","Bangladesh Standard Time","Omsk Standard Time","Myanmar Standard Time","SE Asia Standard Time","Altai Standard Time","W. Mongolia Standard Time","North Asia Standard Time","N. Central Asia Standard Time","Tomsk Standard Time","China Standard Time","North Asia East Standard Time","Singapore Standard Time","W. Australia Standard Time","Taipei Standard Time","Ulaanbaatar Standard Time","North Korea Standard Time","Aus Central W. Standard Time","Transbaikal Standard Time","Tokyo Standard Time","Korea Standard Time","Yakutsk Standard Time","Cen. Australia Standard Time","AUS Central Standard Time","E. Australia Standard Time","AUS Eastern Standard Time","West Pacific Standard Time","Tasmania Standard Time","Vladivostok Standard Time","Lord Howe Standard Time","Bougainville Standard Time","Russia Time Zone 10","Magadan Standard Time","Norfolk Standard Time","Sakhalin Standard Time","Central Pacific Standard Time","Russia Time Zone 11","New Zealand Standard Time","UTC+12","Fiji Standard Time","Kamchatka Standard Time","Chatham Islands Standard Time","UTC+13","Tonga Standard Time","Samoa Standard Time","Line Islands Standard Time" ],
"metadata": {
"Description": "Timezone of VM."
}
},
"AcceptEula": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"minLength": 3,
"metadata": {
"Description": "In order to deploy the VM, you need to accept the EULA, which can be found here: https://go.microsoft.com/fwlink/?linkid=861843"
}
},
"RemoteDesktopAccess": {
"type": "string",
"defaultValue": "",
"minLength": 1,
"metadata": {
"Description": "Specify * (star) to allow all remote desktop access, specify - (minus) to deny all remote desktop access or provide an address range using CIDR notation, e.g. 10.0.0.0/24; an IP address; or a list of address ranges or IP addresses"
}
},
"WinRMAccess": {
"type": "string",
"defaultValue": "-",
"minLength": 1,
"metadata": {
"Description": "Specify * (star) to allow all WinRM access, specify - (minus) to deny all WinRM access or provide an address range using CIDR notation, e.g. 10.0.0.0/24; an IP address; or a list of address ranges or IP addresses"
}
},
2018-11-30 01:37:06 +03:00
"OperatingSystem": {
"type": "string",
"defaultValue": "Windows Server 2019 with Containers",
"allowedValues": [
"Windows Server 2016",
"Windows Server 2019",
"Windows Server 2019 with Containers"
],
"metadata": {
"Description": "Select the Operating System of the VM"
}
},
"vmSize": {
"type": "string",
"defaultValue": "Standard_D4_v3",
"allowedValues": [
"Standard_D2_v2",
"Standard_D3_v2",
"Standard_D4_v2",
"Standard_D5_v2",
"Standard_DS2_v2",
"Standard_DS3_v2",
"Standard_DS4_v2",
"Standard_DS5_v2",
"Standard_D2_v3",
"Standard_D4_v3",
"Standard_D8_v3",
"Standard_D16_v3",
"Standard_D2s_v3",
"Standard_D4s_v3",
"Standard_D8s_v3",
"Standard_D16s_v3"
],
"metadata": {
"Description": "Select the VM size of the deployment"
}
},
2020-02-19 09:48:08 +03:00
"Isolation": {
"type": "string",
"defaultValue": "Default",
"allowedValues": [ "Default", "Process", "Hyperv" ],
"metadata": {
"Description": "What isolation do you want to use for the main container. Default will allow NavContainerHelper to decide."
}
},
2018-11-30 01:37:06 +03:00
"StorageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Premium_LRS"
],
"metadata": {
"Description": "Select the preferred storage account type. Standard_LRS is HDD, Premium_LRS is SSD."
}
},
"vmAdminUsername": {
"type": "string",
"defaultValue": "vmadmin",
"minLength": 1,
"metadata": {
"Description": "Specify administrator user name for connecting to the VM"
}
},
"navAdminUsername": {
"type": "string",
"defaultValue": "admin",
"minLength": 1,
"metadata": {
"Description": "Specify administrator user name for NAV"
}
},
"azureSqlAdminUsername": {
"type": "string",
"defaultValue": "sqladmin",
"metadata": {
"Description": "Specify SQL Administrator user name (only used if you select Azure SQL as your SQL Server)"
}
},
"adminPassword": {
"type": "securestring",
"defaultValue": "",
"metadata": {
"Description": "Specify administrator password for VM, NAV and SQL (if applicable)"
}
},
"navDockerImage": {
"type": "string",
2019-07-16 11:58:12 +03:00
"defaultValue": "mcr.microsoft.com/dynamicsnav:w1",
2018-11-30 01:37:06 +03:00
"metadata": {
"Description": "Select the NAV Docker Image to deploy. See https://hub.docker.com/r/microsoft/dynamics-nav/ for a list of public images."
}
},
"registryUsername": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Specify username for private Docker Registry (leave blank for public Docker hub == microsoft/dynamics-nav:<tag>)"
}
},
"registryPassword": {
"type": "securestring",
"defaultValue": "",
"metadata": {
"Description": "Specify password for private Docker Registry (leave blank for public Docker hub == microsoft/dynamics-nav:<tag>)"
}
},
"LicenseFileUri": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Optional: Specify a secure Url of your NAV Partner License File for NAV. If you do not specify a license file Url here, you will have to upload the license manually later."
}
},
"SQLServerType": {
"type": "string",
"defaultValue": "SQLExpress",
2019-10-30 10:09:39 +03:00
"allowedValues": [ "SQLExpress", "SQLDeveloper", "AzureSQL" ],
2018-11-30 01:37:06 +03:00
"metadata": {
2019-10-30 10:09:39 +03:00
"Description": "Select SQL Server to use. SQLExpress will be running in the Container on the Virtual Machine (part of the Docker Image), SQLDeveloper will be installed on the host, AzureSQL will be deployed in the Resource group. Note that Azure SQL will add additional cost and you will need to specify App and Tenant Bacpac Uris as Azure Storage Shared Access Signature Urls."
2018-11-30 01:37:06 +03:00
}
},
"AppBacpacUri": {
"type": "string",
"defaultValue": "",
"metadata": {
2019-12-23 12:16:05 +03:00
"Description": "Optional: Specify a secure Url of the app bacpac (or single tenant bacpac) you want to use for the Docker image. If you do not specify an app bacpac (or database backup), you will be using the database in the Docker image."
2018-11-30 01:37:06 +03:00
}
},
"TenantBacpacUri": {
"type": "string",
"defaultValue": "",
"metadata": {
2019-12-23 12:16:05 +03:00
"Description": "Optional: Specify a secure Url of the tenant bacpac (or empty if single tenant) you want to use for the Docker image."
}
},
"DatabaseBakUri": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Optional: Specify a secure Url of a database backup to use for the Docker image. If you do not specify a database backup (or an app bacpac), you will be using the database in the Docker image."
2018-11-30 01:37:06 +03:00
}
},
"IncludeAppUris": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Optional: Specify a list of secure Urls of apps to be published and installed."
}
},
"EnableSymbolLoading": {
"type": "string",
"defaultValue": "Yes",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "EnableSymbolLoading to support hybrid development"
}
},
2019-07-16 15:01:41 +03:00
"IncludeCSIDE": {
"type": "string",
"defaultValue": "Yes",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Include CSIDE for C/AL development"
}
},
2019-07-17 01:04:25 +03:00
"IncludeAL": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Prepare Container for System App and BaseApp AL development."
}
},
2018-11-30 01:37:06 +03:00
"ClickOnce": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Include ClickOnce deployed Windows Client"
}
},
"EnableTaskScheduler": {
"type": "string",
"defaultValue": "Yes",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Enable Task Scheduler in Container"
}
},
"Multitenant": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Should NAV be setup for multi tenancy"
}
},
"Office365UserName": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Enter Office 365 Administrator Email (leave empty to skip Office 365 integration)"
}
},
"Office365Password": {
"type": "securestring",
"defaultValue": "",
"metadata": {
"Description": "Enter Office 365 Administrator Password (leave empty if no Office 365 integration)"
}
},
"CreateAadUsers": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Create users from the Aad (users in Office 365) as SUPER (only when using Office 365 integration)"
}
},
"CertificatePfxUrl": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Optional: Specify a secure Url of your Certificate Pfx File. If you do not specify a certificate, you will get a Self Signed Certificate."
}
},
"CertificatePfxPassword": {
"type": "securestring",
"defaultValue": "",
"metadata": {
"Description": "Optional: Password for Certificate Pfx File. If you do not specify a certificate password, you will get a Self Signed Certificate."
}
},
"PublicDnsName": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Public DNS Name (CNAME record pointing to your VM). A # in the name will be replaced by the VM number. If you do not specify a public DNS name, you will get a Self Signed Certificate."
}
},
2019-10-17 17:45:17 +03:00
"BeforeContainerSetupScriptUrl": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Optional: Specify a Url to a PowerShell script that should be executed on the VM before the Container is setup."
}
},
2018-11-30 01:37:06 +03:00
"FinalSetupScriptUrl": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Optional: Specify a Url to a PowerShell script that should be executed on the VM to do the final setup of the VM."
}
},
"BingMapsKey": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Bing Maps Key for Bing Maps Integration App installation (leave empty to skip Bing Maps Integration)"
}
},
"RequestToken": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Request Token for http request service allowing predefined commands to be invoked through a simple http request"
}
},
2019-07-17 10:03:35 +03:00
"CreateStorageQueue": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Create storage queue and listen to messages in the queue for predefined commands to be invoked"
}
},
2018-11-30 01:37:06 +03:00
"RunWindowsUpdate": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
"Description": "Run Windows Update after Deployment (might take significant time)"
}
},
"ContactEMailForLetsEncrypt": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Specify an email address of the person accepting subscriber agreement for LetsEncrypt (https://letsencrypt.org/repository/) in order to use Lets Encrypt to generate a secure SSL certificate, which is valid for 3 months."
}
},
"AutoShutdown": {
"type": "string",
"defaultValue": "Disabled",
"allowedValues": [ "Enabled", "Disabled" ],
"metadata": {
"Description": "Specifies whether you want to enable autoshutdown of the VM."
}
},
"AutoShutdownTime": {
"type": "string",
"defaultValue": "20:00",
"metadata": {
"Description": "Time of day on which the VM will be auto-shutdown (if enabled)."
}
2019-05-20 13:58:53 +03:00
},
"AddTraefik": {
"type": "string",
"defaultValue": "No",
"allowedValues": [ "Yes", "No" ],
"metadata": {
2019-05-23 23:28:07 +03:00
"Description": "Add traefik.io as reverse proxy. When using traefik, you will find the landing page on http://publicdnsname:8180."
2019-05-20 13:58:53 +03:00
}
2018-11-30 01:37:06 +03:00
}
},
"variables": {
2019-07-28 08:20:29 +03:00
"nchbranch": "",
2018-11-30 01:37:06 +03:00
"vmName": "[trim(parameters('vmName'))]",
"TimezoneId": "[parameters('TimezoneId')]",
"AcceptEula": "[parameters('AcceptEula')]",
"vmSize": "[parameters('vmSize')]",
"RemoteDesktopAccess": "[parameters('RemoteDesktopAccess')]",
"WinRmAccess": "[parameters('WinRmAccess')]",
2020-02-19 09:48:08 +03:00
"Isolation": "[parameters('Isolation')]",
2018-11-30 01:37:06 +03:00
"vmAdminUsername": "[trim(parameters('vmAdminUsername'))]",
"navAdminUsername": "[trim(parameters('navAdminUsername'))]",
"azureSqlAdminUsername": "[trim(parameters('azureSqlAdminUsername'))]",
"adminPassword": "[parameters('adminPassword')]",
"navDockerImage": "[trim(parameters('navDockerImage'))]",
"registryUsername": "[parameters('registryUsername')]",
"registryPassword": "[parameters('registryPassword')]",
"LicenseFileUri": "[parameters('LicenseFileUri')]",
"SQLServerType": "[parameters('SQLServerType')]",
"AppBacpacUri": "[parameters('AppBacpacUri')]",
"TenantBacpacUri": "[parameters('TenantBacpacUri')]",
2019-12-23 12:16:05 +03:00
"DatabaseBakUri": "[parameters('DatabaseBakUri')]",
2018-11-30 01:37:06 +03:00
"IncludeAppUris": "[parameters('IncludeAppUris')]",
"CertificatePfxUrl": "[parameters('CertificatePfxUrl')]",
"CertificatePfxPassword": "[parameters('CertificatePfxPassword')]",
"PublicDnsName": "[parameters('PublicDnsName')]",
"Multitenant": "[parameters('Multitenant')]",
"AssignPremiumPlan": "No",
"CreateTestUsers": "No",
"CreateAadUsers": "[parameters('CreateAadUsers')]",
"EnableSymbolLoading": "[parameters('EnableSymbolLoading')]",
2019-07-16 15:01:41 +03:00
"IncludeCSIDE": "[parameters('IncludeCSIDE')]",
2019-07-17 01:04:25 +03:00
"IncludeAL": "[parameters('IncludeAL')]",
2018-11-30 01:37:06 +03:00
"ClickOnce": "[parameters('ClickOnce')]",
"EnableTaskScheduler": "[parameters('EnableTaskScheduler')]",
"Office365UserName": "[parameters('Office365UserName')]",
"Office365Password": "[parameters('Office365Password')]",
"BingMapsKey": "[parameters('BingMapsKey')]",
"RequestToken": "[parameters('RequestToken')]",
2019-07-17 10:03:35 +03:00
"CreateStorageQueue": "[parameters('CreateStorageQueue')]",
2019-10-17 17:45:17 +03:00
"BeforeContainerSetupScriptUrl": "[parameters('BeforeContainerSetupScriptUrl')]",
2018-11-30 01:37:06 +03:00
"FinalSetupScriptUrl": "[parameters('FinalSetupScriptUrl')]",
"RunWindowsUpdate": "[parameters('RunWindowsUpdate')]",
"ContactEMailForLetsEncrypt": "[parameters('ContactEMailForLetsEncrypt')]",
"AutoShutdown": "[parameters('AutoShutdown')]",
"AutoShutdownTime": "[parameters('AutoShutdownTime')]",
2019-05-20 13:58:53 +03:00
"AddTraefik": "[parameters('AddTraefik')]",
2018-11-30 01:37:06 +03:00
"style": "demo",
"OperatingSystem": "[parameters('OperatingSystem')]",
"imagePublisher": "[if(equals(variables('OperatingSystem'),'Windows 10'),'MicrosoftWindowsDesktop','MicrosoftWindowsServer')]",
"imageOffer": "[if(equals(variables('OperatingSystem'),'Windows 10'),'Windows-10','WindowsServer')]",
"imageSku": "[if(equals(variables('OperatingSystem'),'Windows 10'),'rs5-pro',if(equals(variables('OperatingSystem'),'Windows Server 2016'),'2016-Datacenter',if(equals(variables('OperatingSystem'),'Windows Server 2019'),'2019-Datacenter','2019-Datacenter-with-containers')))]",
"storageAccountType": "[parameters('StorageAccountType')]",
"OSDiskName": "[concat(variables('vmName'),'_osdisk')]",
2018-11-30 01:37:06 +03:00
"publicIPAddressName": "[concat(variables('vmName'), '_pip')]",
"storageAccountName": "[concat('storage', uniqueString(resourceGroup().id))]",
2019-07-22 05:36:22 +03:00
"storagequeueAccountName": "[concat('queue', uniqueString(resourceGroup().id))]",
"networkSecurityGroupName": "[concat('networksecuritygroup',if(equals(parameters('AddTraefik'),'Yes'),'_traefik',''))]",
2018-11-30 01:37:06 +03:00
"dnsName": "[tolower(variables('vmName'))]",
"addressPrefix": "10.0.0.0/16",
"subnetName": "Subnet",
"subnetPrefix": "10.0.0.0/24",
"virtualNetworkName": "virtualnetwork",
"server1Name": "[tolower(variables('vmName'))]",
"nic1Name": "[concat(variables('vmName'),'_nic')]",
"delimiters": [ ",", ";" ],
"rdpAddresses": "[if(equals(variables('RemoteDesktopAccess'),'-'),'',variables('RemoteDesktopAccess'))]",
"rdpSourceAddressPrefix": "[split(variables('rdpAddresses'),variables('delimiters'))]",
"noOfRdpAddresses": "[length(variables('rdpSourceAddressPrefix'))]",
"winRmAddresses": "[if(equals(variables('WinRmAccess'),'-'),'',variables('WinRmAccess'))]",
"winRmSourceAddressPrefix": "[split(variables('winRmAddresses'),variables('delimiters'))]",
"noOfWinRmAddresses": "[length(variables('winRmSourceAddressPrefix'))]",
2018-11-30 01:37:06 +03:00
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
"ScriptCommandToExecute": "powershell.exe -executionpolicy unrestricted -file ",
"azureSqlServer": "[concat('sql', replace(tolower(variables('vmName')),'-',''))]",
"azureSqlServerDnsName": "[concat(variables('azureSqlServer'),'.database.windows.net')]",
"SqlCollation": "Latin1_General_100_CS_AS"
},
"resources": [
{
"apiVersion": "2014-04-01-preview",
"type": "Microsoft.Sql/servers",
"name": "[variables('azureSqlServer')]",
"location": "[resourceGroup().location]",
"condition": "[equals(variables('sqlServerType'),'AzureSQL')]",
"tags": {
"displayName": "SqlServer"
},
"properties": {
"administratorLogin": "[variables('azureSqlAdminUsername')]",
"administratorLoginPassword": "[variables('adminPassword')]",
"version": "12.0"
},
"resources": [
{
"apiVersion": "2014-04-01-preview",
"type": "firewallrules",
"name": "AllowAllAzureIps",
"location": "[resourceGroup().location]",
"condition": "[equals(variables('sqlServerType'),'AzureSQL')]",
"dependsOn": [
"[variables('azureSqlServer')]"
],
"properties": {
"endIpAddress": "0.0.0.0",
"startIpAddress": "0.0.0.0"
}
},
{
"apiVersion": "2014-04-01-preview",
"type": "databases",
"name": "App",
"location": "[resourceGroup().location]",
"condition": "[and(equals(variables('sqlServerType'),'AzureSQL'),not(equals(variables('AppBacpacUri'),'')))]",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('azureSqlServer'))]"
],
"tags": {
"displayName": "App Database"
},
"properties": {
"collation": "[variables('SqlCollation')]",
"edition": "Standard",
"maxSizeBytes": "1073741824",
"requestedServiceObjectiveName": "S0"
},
"resources": [
{
"apiVersion": "2014-04-01-preview",
"type": "extensions",
"name": "Import",
"condition": "[and(equals(variables('sqlServerType'),'AzureSQL'),not(equals(variables('AppBacpacUri'),'')))]",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('azureSqlServer'), '/databases/App')]"
],
"tags": {
"displayName": "Import"
},
"properties": {
"storageKeyType": "SharedAccessKey",
"storageUri": "[split(variables('AppBacpacUri'),'?')[0]]",
2019-07-23 08:26:38 +03:00
"storageKey": "[if(contains(variables('AppBacpacUri'),'?'),concat('?',split(variables('AppBacpacUri'),'?')[1]),'?')]",
2018-11-30 01:37:06 +03:00
"administratorLogin": "[variables('azureSqlAdminUsername')]",
"administratorLoginPassword": "[variables('adminPassword')]",
"operationMode": "Import"
}
}
]
},
{
"apiVersion": "2014-04-01-preview",
"type": "databases",
"name": "Tenant",
"location": "[resourceGroup().location]",
"condition": "[and(equals(variables('sqlServerType'),'AzureSQL'),not(equals(variables('TenantBacpacUri'),'')))]",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('azureSqlServer'))]"
],
"tags": {
"displayName": "Tenant Template"
},
"properties": {
"collation": "[variables('SqlCollation')]",
"edition": "Standard",
"maxSizeBytes": "1073741824",
"requestedServiceObjectiveName": "S0"
},
"resources": [
{
"apiVersion": "2014-04-01-preview",
"type": "extensions",
"name": "Import",
"condition": "[and(equals(variables('sqlServerType'),'AzureSQL'),not(equals(variables('TenantBacpacUri'),'')))]",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('azureSqlServer'), '/databases/Tenant')]"
],
"tags": {
"displayName": "Import"
},
"properties": {
"storageKeyType": "SharedAccessKey",
"storageUri": "[split(variables('TenantBacpacUri'),'?')[0]]",
2019-07-23 08:26:38 +03:00
"storageKey": "[if(contains(variables('TenantBacpacUri'),'?'),concat('?',split(variables('TenantBacpacUri'),'?')[1]),'?')]",
2018-11-30 01:37:06 +03:00
"administratorLogin": "[variables('azureSqlAdminUsername')]",
"administratorLoginPassword": "[variables('adminPassword')]",
"operationMode": "Import"
}
}
]
}
]
},
{
2019-06-14 13:53:22 +03:00
"apiVersion": "2019-04-01",
2018-11-30 01:37:06 +03:00
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
2019-06-14 13:53:22 +03:00
"sku": {
"name": "[variables('storageAccountType')]"
},
"kind": "StorageV2",
2018-11-30 01:37:06 +03:00
"location": "[resourceGroup().location]",
"properties": {
2019-06-14 13:53:22 +03:00
"supportsHttpsTrafficOnly": true
2018-11-30 01:37:06 +03:00
}
},
2019-07-22 05:36:22 +03:00
{
"apiVersion": "2019-04-01",
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storagequeueAccountName')]",
2019-07-22 10:41:58 +03:00
"condition": "[equals(variables('CreateStorageQueue'),'Yes')]",
2019-07-22 05:36:22 +03:00
"sku": {
"name": "Standard_LRS"
},
"kind": "StorageV2",
"location": "[resourceGroup().location]",
"properties": {
"supportsHttpsTrafficOnly": true
}
},
2018-11-30 01:37:06 +03:00
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[variables('publicIPAddressName')]",
"location": "[resourceGroup().location]",
"properties": {
"publicIPAllocationMethod": "Dynamic",
"dnsSettings": {
"domainNameLabel": "[variables('dnsName')]"
}
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/networkSecurityGroups",
"name": "networkSecurityGroup",
"condition": "[equals(variables('AddTraefik'),'No')]",
2018-11-30 01:37:06 +03:00
"location": "[resourceGroup().location]",
"properties": {
"securityRules": [
{
"name": "HTTP",
"properties": {
"description": "Http access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "80",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 200,
"direction": "Inbound"
}
},
{
"name": "FILES",
"properties": {
"description": "File access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "8080",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 210,
"direction": "Inbound"
}
},
{
"name": "HTTPS",
"properties": {
"description": "Http access over Secure Socket Layer",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "443",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 220,
"direction": "Inbound"
}
},
{
"name": "Soap",
2018-11-30 01:37:06 +03:00
"properties": {
"description": "Access to Soap Web Services",
2018-11-30 01:37:06 +03:00
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "7047",
2018-11-30 01:37:06 +03:00
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 230,
"direction": "Inbound"
}
},
{
"name": "OData",
2018-11-30 01:37:06 +03:00
"properties": {
"description": "Access to OData Services",
2018-11-30 01:37:06 +03:00
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "7048",
2018-11-30 01:37:06 +03:00
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 240,
"direction": "Inbound"
}
},
{
"name": "Developer",
2018-11-30 01:37:06 +03:00
"properties": {
"description": "Access to Developer Services",
2018-11-30 01:37:06 +03:00
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "7049",
2018-11-30 01:37:06 +03:00
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 250,
"direction": "Inbound"
}
},
{
"name": "Client",
2018-11-30 01:37:06 +03:00
"properties": {
"description": "Access for Windows Client",
2018-11-30 01:37:06 +03:00
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "7046",
2018-11-30 01:37:06 +03:00
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 260,
"direction": "Inbound"
}
}
]
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/networkSecurityGroups",
"name": "networkSecurityGroup_traefik",
"condition": "[equals(variables('AddTraefik'),'Yes')]",
"location": "[resourceGroup().location]",
"properties": {
"securityRules": [
{
"name": "HTTP",
"properties": {
"description": "Http access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "80",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 200,
"direction": "Inbound"
}
},
{
"name": "FILES",
"properties": {
"description": "File access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "8080",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 210,
"direction": "Inbound"
}
},
{
"name": "HTTPS",
"properties": {
"description": "Http access over Secure Socket Layer",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "443",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 220,
"direction": "Inbound"
}
2019-05-20 13:58:53 +03:00
},
{
"name": "Log",
"properties": {
"description": "Access to status log if Traefik is used",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "8180",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 230,
2019-05-20 13:58:53 +03:00
"direction": "Inbound"
}
2018-11-30 01:37:06 +03:00
}
]
}
},
{
"apiVersion": "2015-01-01",
"type": "Microsoft.Resources/deployments",
"name": "rdp-0",
"condition": "[not(equals(variables('RemoteDesktopAccess'),'-'))]",
"dependsOn": [
"[concat('Microsoft.Network/networkSecurityGroups/',variables('networkSecurityGroupName'))]"
],
"properties": {
"mode":"Incremental",
"parameters":{},
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [],
"outputs": {}
}
}
},
{
"apiVersion": "2015-01-01",
"type": "Microsoft.Resources/deployments",
"name": "[concat('rdp-', copyIndex(1))]",
"condition": "[not(equals(variables('RemoteDesktopAccess'),'-'))]",
"dependsOn": [
"[concat('rdp-', copyIndex())]"
],
"copy": {
"name": "iterator",
"count": "[variables('noOfRdpAddresses')]"
2018-11-30 01:37:06 +03:00
},
"properties": {
"mode": "Incremental",
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [
{
"apiVersion": "2016-09-01",
"name": "[concat(variables('networkSecurityGroupName'),'/Rdp',copyIndex())]",
"type": "Microsoft.Network/networkSecurityGroups/securityRules",
"location":"[resourceGroup().location]",
"properties":{
"description": "Remote Desktop Access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "3389",
"sourceAddressPrefix": "[variables('rdpSourceAddressPrefix')[copyIndex()]]",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": "[add(copyIndex(),100)]",
"direction": "Inbound"
}
}
],
"outputs": {}
}
}
},
{
"apiVersion": "2015-01-01",
"type": "Microsoft.Resources/deployments",
"name": "winrm-0",
"condition": "[not(equals(variables('WinRmAccess'),'-'))]",
"dependsOn": [
"[concat('Microsoft.Network/networkSecurityGroups/',variables('networkSecurityGroupName'))]"
],
"properties": {
"mode":"Incremental",
"parameters":{},
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [],
"outputs": {}
}
}
},
{
"apiVersion": "2015-01-01",
"type": "Microsoft.Resources/deployments",
"name": "[concat('winrm-', copyIndex(1))]",
"condition": "[not(equals(variables('WinRmAccess'),'-'))]",
"dependsOn": [
"[concat('winrm-', copyIndex())]"
],
"copy": {
"name": "iterator",
"count": "[variables('noOfWinRmAddresses')]"
},
"properties": {
"mode": "Incremental",
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [
{
"apiVersion": "2016-09-01",
"name": "[concat(variables('networkSecurityGroupName'),'/WinRm',copyIndex())]",
"type": "Microsoft.Network/networkSecurityGroups/securityRules",
"location":"[resourceGroup().location]",
"properties":{
"description": "WinRm Access",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "5986",
"sourceAddressPrefix": "[variables('winRmSourceAddressPrefix')[copyIndex()]]",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": "[add(copyIndex(),300)]",
"direction": "Inbound"
}
}
],
"outputs": {}
}
}
},
2018-11-30 01:37:06 +03:00
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/virtualNetworks",
"name": "[variables('virtualNetworkName')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/networkSecurityGroups/',variables('networkSecurityGroupName'))]"
],
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('addressPrefix')]"
]
},
"subnets": [
{
"name": "[variables('subnetName')]",
"properties": {
"addressPrefix": "[variables('subnetPrefix')]",
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
}
}
}
]
}
},
{
2019-06-14 13:53:22 +03:00
"apiVersion": "2018-11-01",
2018-11-30 01:37:06 +03:00
"type": "Microsoft.Network/networkInterfaces",
"name": "[variables('nic1Name')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
2019-06-14 13:53:22 +03:00
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
"[concat('Microsoft.Network/networkSecurityGroups/',variables('networkSecurityGroupName'))]"
2018-11-30 01:37:06 +03:00
],
"properties": {
2019-06-14 13:53:22 +03:00
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
},
2018-11-30 01:37:06 +03:00
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
},
"subnet": {
"id": "[variables('subnetRef')]"
}
}
}
]
}
},
{
2019-04-11 02:44:13 +03:00
"apiVersion": "2018-10-01",
2018-11-30 01:37:06 +03:00
"type": "Microsoft.Compute/virtualMachines",
"name": "[variables('server1Name')]",
"location": "[resourceGroup().location]",
"condition": "[equals(variables('acceptEula'),'Yes')]",
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
"[concat('Microsoft.Network/networkInterfaces/', variables('nic1Name'))]"
],
"properties": {
"hardwareProfile": {
"vmSize": "[variables('vmSize')]"
},
"osProfile": {
"computerName": "[variables('server1Name')]",
"adminUsername": "[variables('vmAdminUsername')]",
"adminPassword": "[variables('adminPassword')]",
"windowsConfiguration": {
"provisionVMAgent": true,
"timeZone": "[variables('TimezoneId')]"
}
},
"storageProfile": {
"imageReference": {
"publisher": "[variables('imagePublisher')]",
"offer": "[variables('imageOffer')]",
"sku": "[variables('imageSku')]",
"version": "latest"
},
"osDisk": {
"createOption": "FromImage",
"osType": "Windows",
"name": "[variables('OSDiskName')]",
2018-11-30 01:37:06 +03:00
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "[variables('storageAccountType')]"
},
"diskSizeGB": 128
2018-11-30 01:37:06 +03:00
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nic1Name'))]"
}
]
}
},
"resources": [
{
"apiVersion": "2017-04-26-preview",
"type": "microsoft.devtestlab/schedules",
"name": "[concat('shutdown-computevm-',variables('server1Name'))]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/',variables('server1Name'))]"
],
"properties": {
"status": "[variables('AutoShutdown')]",
"taskType": "ComputeVmShutdownTask",
"dailyRecurrence": {
"time": "[variables('AutoShutdownTime')]"
},
"timeZoneId": "[variables('TimezoneId')]",
"notificationSettings": {
"status": "Disabled",
"timeInMinutes": 15
},
"targetResourceId": "[resourceId('Microsoft.Compute/virtualMachines',variables('server1Name'))]"
}
}
]
},
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('server1Name'),'/vmextension1')]",
"location": "[resourceGroup().location]",
"condition": "[equals(variables('acceptEula'),'Yes')]",
"tags": {
"displayName": "PowerShellScript2"
},
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('server1Name'))]"
],
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.9",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[uri(deployment().properties.templateLink.uri, 'initialize.ps1')]"
],
2020-02-19 09:48:08 +03:00
"commandToExecute": "[concat(variables('ScriptCommandToExecute'),'initialize.ps1',' -TemplateLink \"',deployment().properties.templateLink.uri,'\" -hostName \"',reference(variables('publicIPAddressName')).dnsSettings.fqdn,'\" -storageConnectionString \"',if(equals(variables('CreateStorageQueue'),'Yes'),Concat('DefaultEndpointsProtocol=https;AccountName=',variables('storagequeueAccountName'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storagequeueAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value),''),'\" -RemoteDesktopAccess \"',variables('rdpAddresses'),'\" -WinRmAccess \"',variables('winRmAddresses'),'\" -Isolation \"',variables('Isolation'),'\" -VMAdminUsername \"',variables('vmAdminUsername'),'\" -NAVAdminUsername \"',variables('navAdminUsername'),'\" -AzureSQLAdminUsername \"',variables('azureSqlAdminUsername'),'\" -AdminPassword \"',replace(variables('adminPassword'),'\"','\\\"'),'\" -navDockerImage \"',variables('navDockerImage'),'\" -registryUsername \"',variables('registryUsername'),'\" -registryPassword \"',replace(variables('registryPassword'),'\"','\\\"'),'\" -LicenseFileUri \"',variables('licenseFileUri'),'\" -SQLServerType \"',variables('SQLServerType'),'\" -AzureSqlServer \"',if(equals(variables('SQLServerType'),'AzureSQL'),variables('azureSqlServerDnsName'),''),'\" -AppBacpacUri \"',variables('AppBacpacUri'),'\" -TenantBacpacUri \"',variables('TenantBacpacUri'),'\" -DatabaseBakUri \"',variables('DatabaseBakUri'),'\" -IncludeAppUris \"',variables('IncludeAppUris'),'\" -CertificatePfxUrl \"',variables('CertificatePfxUrl'),'\" -CertificatePfxPassword \"',replace(variables('CertificatePfxPassword'),'\"','\\\"'),'\" -PublicDnsName \"',variables('PublicDnsName'),'\" -Multitenant \"',variables('Multitenant'),'\" -AssignPremiumPlan \"',variables('AssignPremiumPlan'),'\" -CreateTestUsers \"',variables('CreateTestUsers'),'\" -CreateAadUsers \"',variables('CreateAadUsers'),'\" -EnableSymbolLoading \"',variables('EnableSymbolLoading'),'\" -IncludeCSIDE \"',variables('IncludeCSIDE'),'\" -IncludeAL \"',variables('IncludeAL'),'\" -ClickOnce \"',variables('ClickOnce'),'\" -EnableTaskScheduler \"',variables('EnableTaskScheduler'),'\" -Office365UserName \"',variables('Office365UserName'),'\" -Office365Password \"',replace(variables('Office365Password'),'\"','\\\"'),'\" -BingMapsKey \"',variables('BingMapsKey'),'\" -RequestToken \"',variables('RequestToken'),'\" -CreateStorageQueue \"',variables('CreateStorageQueue'),'\" -beforeContainerSetupScriptUrl \"',variables('beforeContainerSetupScriptUrl'),'\" -finalSetupScriptUrl \"',variables('finalSetupScriptUrl'),'\" -RunWindowsUpdate \"',variables('RunWindowsUpdate'),'\" -ContactEMailForLetsEncrypt \"',variables('ContactEMailForLetsEncrypt'),'\" -style \"',variables('style'),'\" -nchbranch \"',variables('nchbranch'),'\" -AddTraefik \"',variables('AddTraefik'),'\"')]"
2018-11-30 01:37:06 +03:00
},
"protectedSettings": {}
}
}
],
"outputs": {
"landingPage": {
"value": "[concat('http://',reference(variables('publicIPAddressName')).dnsSettings.fqdn)]",
"type": "string"
}
}
}