locked
Need a way to know if Azure VM can Deploy Web applications in Azure RRS feed

  • Question

  • User1182587605 posted

    Hi,

    I am new to this topic so can anyone please tell me if there is a way to select an Azure VM which has IIS and all other software support to deploy web apps in it. Please help me <g class="gr_ gr_307 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" id="307" data-gr-id="307">in</g> this.

    Regards,

    Deepak

    Saturday, December 29, 2018 1:34 PM

All replies

  • User753101303 posted

    Hi,

    IIS is part of Windows Server. Checlk the VM gallery depending on what you need. As this is a VM you have full control on this (and you could keep an image handy if you need to reuse the same setup).

    Saturday, December 29, 2018 3:10 PM
  • User283571144 posted

    Hi acmedeepak,

    As far as I know, we could run an azure management template which to create the azure VM with the IIS and IIS console setup.

    Like below:

    You could directly run it in the github as below link:

    https://github.com/Azure/azure-quickstart-templates/tree/master/dsc-extension-iis-server-windows-vm 

    {
      "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {
        "diskType": {
          "type": "string",
          "defaultValue": "Standard_LRS",
          "allowedValues": [
            "Standard_LRS",
            "Premium_LRS"
          ],
          "metadata": {
            "description": "Type of the Storage for disks"
          }
        },
        "vmName": {
          "type": "string",
          "metadata": {
            "description": "Name of the VM"
          }
        },
        "vmSize": {
          "type": "string",
          "defaultValue": "Standard_A2",
          "metadata": {
            "description": "Size of the VM"
          }
        },
        "imageSKU": {
          "type": "string",
          "defaultValue": "2012-R2-Datacenter",
          "allowedValues": [
            "2008-R2-SP1",
            "2012-Datacenter",
            "2012-R2-Datacenter"
          ],
          "metadata": {
            "description": "Image SKU"
          }
        },
        "adminUsername": {
          "type": "string",
          "metadata": {
            "description": "Admin username"
          }
        },
        "adminPassword": {
          "type": "securestring",
          "metadata": {
            "description": "Admin password"
          }
        },
        "modulesUrl": {
          "type": "string",
          "metadata": {
            "description": "URL for the DSC configuration module. NOTE: Can be a Github url(raw) to the zip file"
          }
        },
        "configurationFunction": {
          "type": "string",
          "defaultValue": "ContosoWebsite.ps1\\ContosoWebsite",
          "metadata": {
            "description": "DSC configuration function to call"
          }
        },
        "location": {
          "type": "string",
          "defaultValue": "[resourceGroup().location]",
          "metadata": {
            "description": "Location for all resources."
          }
        }
      },
      "variables": {
        "virtualNetworkName": "dscVNET",
        "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
        "vnetAddressPrefix": "10.0.0.0/16",
        "subnet1Name": "dscSubnet-1",
        "subnet1Prefix": "10.0.0.0/24",
        "subnet1Ref": "[concat(variables('vnetID'),'/subnets/', variables('subnet1Name'))]",
        "publicIPAddressType": "Dynamic",
        "publicIPAddressName": "dscPubIP",
        "nicName": "dscNIC",
        "imagePublisher": "MicrosoftWindowsServer",
        "imageOffer": "WindowsServer",
        "vmExtensionName": "dscExtension"
      },
      "resources": [
        {
          "apiVersion": "2015-05-01-preview",
          "type": "Microsoft.Network/publicIPAddresses",
          "name": "[variables('publicIPAddressName')]",
          "location": "[parameters('location')]",
          "properties": {
            "publicIPAllocationMethod": "[variables('publicIPAddressType')]"
          }
        },
        {
          "apiVersion": "2015-05-01-preview",
          "type": "Microsoft.Network/virtualNetworks",
          "name": "[variables('virtualNetworkName')]",
          "location": "[parameters('location')]",
          "properties": {
            "addressSpace": {
              "addressPrefixes": [
                "[variables('vnetAddressPrefix')]"
              ]
            },
            "subnets": [
              {
                "name": "[variables('subnet1Name')]",
                "properties": {
                  "addressPrefix": "[variables('subnet1Prefix')]"
                }
              }
            ]
          }
        },
        {
          "apiVersion": "2015-05-01-preview",
          "type": "Microsoft.Network/networkInterfaces",
          "name": "[variables('nicName')]",
          "location": "[parameters('location')]",
          "dependsOn": [
            "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
            "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
          ],
          "properties": {
            "ipConfigurations": [
              {
                "name": "ipconfig1",
                "properties": {
                  "privateIPAllocationMethod": "Dynamic",
                  "publicIPAddress": {
                    "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
                  },
                  "subnet": {
                    "id": "[variables('subnet1Ref')]"
                  }
                }
              }
            ]
          }
        },
        {
          "apiVersion": "2017-03-30",
          "type": "Microsoft.Compute/virtualMachines",
          "name": "[parameters('vmName')]",
          "location": "[parameters('location')]",
          "dependsOn": [
            "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
          ],
          "properties": {
            "hardwareProfile": {
              "vmSize": "[parameters('vmSize')]"
            },
            "osProfile": {
              "computerName": "[parameters('vmName')]",
              "adminUsername": "[parameters('adminUsername')]",
              "adminPassword": "[parameters('adminPassword')]"
            },
            "storageProfile": {
              "imageReference": {
                "publisher": "[variables('imagePublisher')]",
                "offer": "[variables('imageOffer')]",
                "sku": "[parameters('imageSKU')]",
                "version": "latest"
              },
              "osDisk": {
                "name": "[concat(parameters('vmName'), '_OSDisk')]",
                "caching": "ReadWrite",
                "createOption": "FromImage",
                "managedDisk": {
                  "storageAccountType": "[parameters('diskType')]"
                }
              }
            },
            "networkProfile": {
              "networkInterfaces": [
                {
                  "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
                }
              ]
            }
          }
        },
        {
          "type": "Microsoft.Compute/virtualMachines/extensions",
          "name": "[concat(parameters('vmName'),'/', variables('vmExtensionName'))]",
          "apiVersion": "2015-05-01-preview",
          "location": "[parameters('location')]",
          "dependsOn": [
            "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
          ],
          "properties": {
            "publisher": "Microsoft.Powershell",
            "type": "DSC",
            "typeHandlerVersion": "2.19",
            "autoUpgradeMinorVersion": true,
            "settings": {
              "ModulesUrl": "[parameters('modulesUrl')]",
              "ConfigurationFunction": "[parameters('configurationFunction')]",
              "Properties": {
                "MachineName": "[parameters('vmName')]"
              }
            },
            "protectedSettings": null
          }
        }
      ]
    }

    Best Regards,

    Brando

    Monday, December 31, 2018 6:10 AM