{"id":2651,"date":"2015-06-03T00:08:35","date_gmt":"2015-06-02T22:08:35","guid":{"rendered":"https:\/\/blog.redbaronofazure.com\/?p=2651"},"modified":"2015-10-29T12:37:57","modified_gmt":"2015-10-29T11:37:57","slug":"azure-websites-meets-the-enterprise","status":"publish","type":"post","link":"https:\/\/blog.redbaronofazure.com\/?p=2651","title":{"rendered":"Azure WebSites meets the Enterprise"},"content":{"rendered":"<p>Ever since it&#8217;s launch, Azure Websites have rightfully gained popularity due to it being truely a PaaS solution that doesn&#8217;t pull down the pants on devs that doesn&#8217;t know too much about infrastructure. I must admit that when I\u00a0started to approach\u00a0WebSites, my feeling about it was a bit so-and-so, but I was wrong and I&#8217;ve changed my mind drastically. It&#8217;s simply a\u00a0very productive environment, especially compared to PaaS Cloud Services. Nowadays, It&#8217;s my first choice for hosting whatever I do and I only revert to IaaS VMs if I really have to.<\/p>\n<p>However, WebSites\u00a0had one issue that made\u00a0it not break through in the enterprise space directly. It couldn&#8217;t be part of an Azure Virtual Network. Okay, you had the Point-to-Site VPN capability, but that was as effective\u00a0as Hertz or Avis giving you the keys to a plastic pedal car when you atleast needed a BMW. In April\/May, during Microsoft&#8217;s event mania month, the possibility of letting Azure WebSites (and I&#8217;ll switch to the new name &#8211;\u00a0WebApps &#8211; now) be all-in in an\u00a0Virtual Network and\u00a0leverage any Site-to-Site VPN connectivity to\u00a0you local on-premises datacenter emerged. Welcome to &#8211; Azure WebApps meets the Enterprise.<\/p>\n<p><strong>Azure App Service Environment<\/strong><\/p>\n<p>WebApps is at the far end of the PaaS abstraction level and has always meant that you don&#8217;t touch the VM that is hosting your app. The App Service Plans (prev Web Hosting Plans) had the Free and Shared\u00a0options that ran your app in a truely shared and multi-tenant environment. If you needed to do some basic stuff, like uploading a SSL cert for https to work, or adding host names for a CNAME DNS to work, you had to move to the Basic or Standard plans that were a little more dedicated. The Standard plan was required if you wanted to add the P2S VPN Virtual Network capability, for instance. With an\u00a0SSL cert uploaded you could almost get a\u00a0reliable ip address of your website, although that isn&#8217;t really promised or documented.<\/p>\n<p>The App Service Environment\u00a0takes the plans to a whole new step beyond the Standard plan. It provisions an environment of VMs with the WebApp\/WebSite functionality that is just dedicated for you, and you alone. I&#8217;m not going to repeat what\u00a0others have written, so check the references at end for introduction blogs. I will, however, tell you how it works from a WebApps\/VNet perspective.<\/p>\n<p>First, think of ASE as something that just holds your WebApps (WebSites). It&#8217;s like if you previously needed to create a new Standard Hosting Plan before you could use it, ie you had to click New in the portal, or, run a powershell script like Add-AzureWebsiteHostingPlan -Name yada-yada -Type &#8220;Standard&#8221;. That is what the ASE is.<\/p>\n<p><strong>ASE Front end and Worker Pools<\/strong><\/p>\n<p>This can be a bit tricky\u00a0at first glance, but the Worker Pools are where you app(s) are\u00a0hosted. Since an ASE can host as many of your\u00a0WebApps as you like to squeeze in, and since they may have\u00a0different scaling requirements, the ASE comes with three different Worker Pools that you can scale independantly. It&#8217;s the IaaS equivalent of letting the web servers run on A1\/D1 VMs and the database server running on something more powerful, so to speak.<\/p>\n<p>Currently, you have three Worker Pools and you can decide for each of them what VM size they should have. You don&#8217;t have to use all three pools and if this is just a test ASE, you probably will only use one of them and\u00a0scale the other two down to zero VMs.<\/p>\n<p>The Front End pool is nothing you provision stuff to. It&#8217;s just a pool of VMs taking the first hit at terminating SSL, etc. Forget it&#8217;s even there when you start learning\u00a0ASE.<\/p>\n<p><strong>My Virtual Network<\/strong><\/p>\n<p>In my example, I will use a Virtual Network that looks like below. The app7 subnet will be dedicated to the ASE environment and it is advisable to let an ASE have an entire subnet of its own. Don&#8217;t co-hab IaaS VMs in it. In the infra6 subnet I will provision an IIS VM and in the dcnet7 there will be an AD\/DNS server. (Yes, the\u00a0use of the\u00a0suffixes\u00a06 and 7 are inconsequent).<\/p>\n<p><a href=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/vnet-config.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2631\" src=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/vnet-config.png\" alt=\"vnet-config\" width=\"613\" height=\"585\" srcset=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/vnet-config.png 613w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/vnet-config-300x286.png 300w\" sizes=\"(max-width: 613px) 100vw, 613px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The IaaS VMs provisioned shows up in the VNey config page, but anything you do with ASE does not show up. Listed below are my AD\/DNS server cljungadwe6 and my IIS VM cljungwswe6. The DNS for the VNet is 10.6.3.4, ie the AD\/DNS server.<\/p>\n<p><a href=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/vnet-servers.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2641\" src=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/vnet-servers.png\" alt=\"vnet-servers\" width=\"636\" height=\"286\" srcset=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/vnet-servers.png 636w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/vnet-servers-300x135.png 300w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/a><\/p>\n<p>If you decide to give ASE a spin, make sure you get all this configured before you create the ASE, since ASE is in preview and don&#8217;t pick up changes in your VNet config\u00a0too often.<\/p>\n<p><strong>Creating the App Service Environment<\/strong><\/p>\n<p>When you create the ASE you will get that chance to point it to an existing VNet\/Subnet. You can not have multiple ASEs in one subnet, so make sure you don&#8217;t reuse your subnets. Once you press the Create button, Azure will start spinning up the number of VMs you selected for your Worker and Front End Pools. During this provisioning, the VMs will grab info from the VNet, like DNS, so that&#8217;s why it&#8217;s important that all that is in place before you press create. Also, if your app is layered and requires network segmenting, you will be needing 2 or more ASEs and you will probably need Network Security Groups (NSG) to allow\/deny network traffic between the subnets. I will not do this\u00a0in this post.<\/p>\n<p><a href=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/ase-portal.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2591\" src=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/ase-portal.png\" alt=\"ase-portal\" width=\"517\" height=\"384\" srcset=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/ase-portal.png 517w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/ase-portal-300x223.png 300w\" sizes=\"(max-width: 517px) 100vw, 517px\" \/><\/a><\/p>\n<p><strong>Deploy your WebApp<\/strong><\/p>\n<p>The ASE takes currently almost an hour to provision and you just have to wait for it to complete. When it&#8217;s done, you can deploy your webapp just like you did previously with Azure WebSites &#8211; but with one major difference! You have to create the WepApp (WebSite) inside the new portal (portal.azure.com) and attach it to the ASE.\u00a0It&#8217;s that way the WebApp understands that it&#8217;s hosting plan isn&#8217;t Free, Shared, Basic or Standard. &#8220;Attach&#8221; is probably the wrong word. What you really do is find the ASE you created under the selection of Location, so instead of selecting West Europe, etc, you select the ASE as the provisioning Location.<\/p>\n<p>I have a powershell script that takes a web deployment package zip file and deploys it to a\u00a0WebSite and that is how I deployed my little debug website below.<\/p>\n<p><a href=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/Vnet-comm-ipaddr.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2611\" src=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/Vnet-comm-ipaddr.png\" alt=\"Vnet-comm-ipaddr\" width=\"516\" height=\"465\" srcset=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/Vnet-comm-ipaddr.png 516w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/Vnet-comm-ipaddr-300x270.png 300w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/><\/a><\/p>\n<p>What this page does is just checking the environment and making a couple of web calls. The <strong>Request sent from IP<\/strong> is just the REMOTE_HOST in the request header so I can see where the browser request comes from. The <strong>Internal Server Ip addr<\/strong> is just an enumeration of the IPv4 addresses found on the web servers local NIC(s). Here you can see that the webapp inside a ASE only can find the loopback ip address.<\/p>\n<p>The <strong>Outgoing traffic from IP<\/strong> is determind by making a outgoing web request to checkip.dyndns.com and parsing the result. This is handy to determind the webapps external VIP.<\/p>\n<p>The <strong>VNet internal traffic from IP<\/strong> is determind from making a web request to the IIS VM on it&#8217;s internal VNet ip address. Since both the IIS VM and the WebApp should be in the same VNet, although in different subnets, this call should work. It also tells us that the ip address the webapp has in the VNet is 10.6.1.8\u00a0(The IIS VM checks it&#8217;s REMOTE_HOST and returns that in the http response).<\/p>\n<p>Lastly, the <strong>DNS Servers<\/strong> shows us that the DNS server the webapp is using is the one that was configured in the VNet. This means that the webapp is a member of the VNet and could use the name resolution of your enterprise.<\/p>\n<p>To prove this, I let the webapp do the internal VNet call using a name only the AD\/DNS server 10.6.3.4 would be able to resolve. The AD domain in my demo\u00a0was named <em>yabbadabbadoo.local<\/em> and the webapp was able to make a call using the name <em>cljungwswe6.yabbadabbadoo.local<\/em>. If your DNS infrastructure in your VNet is connected via a VPN gateway back to on-premises, this would mean that the code running in the webapp would be able to access resources in your local on-premises datacenter. Azure WebApps meets the enterprise.<\/p>\n<p><a href=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/Vnet-comm-nslookup.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2621\" src=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/Vnet-comm-nslookup.png\" alt=\"Vnet-comm-nslookup\" width=\"591\" height=\"470\" srcset=\"https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/Vnet-comm-nslookup.png 591w, https:\/\/blog.redbaronofazure.com\/wp-content\/uploads\/2015\/06\/Vnet-comm-nslookup-300x239.png 300w\" sizes=\"(max-width: 591px) 100vw, 591px\" \/><\/a><\/p>\n<p>One thing you still can&#8217;t do with your WebApp is making it\u00a0and intranet only website, since it&#8217;s not possible to browse to it using the VNet ip adress, like 10.6.1.8 above.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>References<\/strong><\/p>\n<p>MSDN &#8211; Introduction to ASE<br \/>\n<a href=\"https:\/\/azure.microsoft.com\/en-us\/documentation\/articles\/app-service-app-service-environment-intro\/\" target=\"_blank\">https:\/\/azure.microsoft.com\/en-us\/documentation\/articles\/app-service-app-service-environment-intro\/<\/a><\/p>\n<p>MSDN &#8211; How to Create a WebApp in ASE<br \/>\n<a href=\"https:\/\/azure.microsoft.com\/en-us\/documentation\/articles\/app-service-web-how-to-create-a-web-app-in-an-ase\/\" target=\"_blank\">https:\/\/azure.microsoft.com\/en-us\/documentation\/articles\/app-service-web-how-to-create-a-web-app-in-an-ase\/<\/a><\/p>\n<p>\/\/Build &#8211; Program Manager Yochay Kiriaty explains ASE<br \/>\n<a href=\"http:\/\/channel9.msdn.com\/Events\/Build\/2015\/2-633\" target=\"_blank\">http:\/\/channel9.msdn.com\/Events\/Build\/2015\/2-633<\/a><\/p>\n<p>Ignite &#8211; Program Manager Stefan Schakow explains ASE<br \/>\n<a href=\"https:\/\/channel9.msdn.com\/Events\/Ignite\/2015\/BRK3715\" target=\"_blank\">https:\/\/channel9.msdn.com\/Events\/Ignite\/2015\/BRK3715<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever since it&#8217;s launch, Azure Websites have rightfully gained popularity due to it being truely a PaaS solution that doesn&#8217;t pull down the pants on devs that doesn&#8217;t know too much about infrastructure. I must admit that when I\u00a0started to approach\u00a0WebSites, my feeling about it was a bit so-and-so, but I was wrong and I&#8217;ve [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[101],"tags":[251],"_links":{"self":[{"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=\/wp\/v2\/posts\/2651"}],"collection":[{"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2651"}],"version-history":[{"count":0,"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=\/wp\/v2\/posts\/2651\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.redbaronofazure.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}