Do you want to create enterprise-class web applications for your business? With Azure Web App Services, you can. The service is a fully managed platform that automatically takes care of the servers, OS patching, and load balancing. It runs on either Windows or Linux VMs.
Azure Web App supports several languages, such as NET, Java, Node.js, PHP, and Python on Windows or .NET Core, Node.js, PHP, or Ruby on Linux. The service supports Continuous Integration/Continuous Deployment (CI/CD) using GitHub, and Visual Studio Team Services, just to mention a few.
If you are studying for the 70-533 exam (Implementing Microsoft Azure Infrastructure Solutions), then this article will help to understand the basic concept of Azure Web App.
Creating the Azure Web App and App Service plan
In this section, we will create the Azure Web App, which is a single blade on Microsoft Azure, and during that process, we will create the App Service Plan, which requires some planning and understanding before committing to a design. We will focus on the design portion in the following section.
The first step is to create the Web App. Logged on the Azure Console, click on the App Services item on the left side. In the new blade, a list of any existing Web App will be listed. Click on Add button. A new blade Web + Mobile will be displayed with several options to start with, including Web App, App Service Environment (ASE), and so forth.
In the Web App blade, we will have a summary of the features of the services that we are about to create. Click on Create.
In the first blade, define a name for the App Name. That name will be used on the initial URL. We need to define a resource group and a platform, but before clicking on Create, click on App Service Plan/Location.
In the Service Plan, we are going to create a new one, and label it accordingly. It is in the App Service Plan that we define the pricing tier and, based on the tier, some features are enabled that are available to the Azure Web App running on the plan. The following table describes the features and capabilities available on each tier.
|Auto Scale (instances)||-||3||10||20|
|Slots available (staging)||-||-||-||5||20|
There is also an Isolated tier. In this tier, we have way more features and capabilities than the premium tier, and the VMs and the virtual network are isolated for optimal performance.
Select the appropriate tier, and keep in mind that we can always change later on based on the Web App performance. Click on Select, OK and then when returning to the original blade, click on Create to start the creation of a Web App.
When the provisioning is complete, click on the Web App that will be listed. In the Overview item, we will have a lot of information about the new App Service including the URL, pricing tier, FTP information, and graphical data about several components, such as Data In, and HTTP 5xx errors.
If we use the URL provided, we will receive a page that is configured automatically as part of the Web App creation.
Designing your App Service plan
We covered the process to create an App Service plan in the previous section. Under the covers when we create an App Service plan we are defining a set of compute resources where we will run our Web App and those resources will be shared among all Web Apps that we are planning to deploy. Keep in mind that enabling diagnostics, backups, and running WebJobs will generate CPU/memory utilization and that will use the same resources.
When we configure an App Service Plan we are defining the region, number of VM instances, the size of the VMs, and the pricing tier (which will influence the storage available, load balancer, number of instances supported on the auto scale, and so forth.
In some scenarios, when an application requires a lot of resources, a creation of a separate App Service Plan may be required. The beauty of this feature is that the administrator can scale them up and down at any time.
The administrator can change any Web App to a different App Service plan within the same region and resource group. When planning to move a Web App to a different region, a clone of the current App Service plan is required (at this time there are some restrictions when cloning an App Service plan).
Configuring FTP access
Azure App allows several methods to update the web applications, and the more elegant and professional methods include Team Foundation Server, Visual Studio Team Services, Git, and GitHub.
However, we can use simpler methods such as FTP, Local Git, even OneDrive, and Dropbox. To configure FTP, we just need to define the password for the account and save it when complete.
To test the FTP access, we can use any FTP client and connect on the FTP address (which is informed on the Overview item), using the following format <Web App Name>\<FTP/Deployment username>. For this article, we created a simple HTML file we named as index.html. Using the FTP client we place the file in /site/wwwroot folder.
The result can be validated by typing in the URL on any browser and the new content will be displayed.
Using Web App we can maintain enterprise-class web applications without maintaining servers. The solution has built-in features to support DevOps scenarios to allow easy integration and flows from the changes to test and then production.
In the next article, we will cover the steps to protect a Web App, configure autoscale feature, custom domain, and backup.