888-682-5765 info@totalsol.com

Introduction 

As the workforce moves towards a more flexible computing environment, the need placed on the applications we use will grow.  One way to provide the services that our users need, in a cost-effective manner, is to move applications to the cloud.  Microsoft Azure App Service provides a ready-built system and platform for all types of applications.  Your application can be a simple demo web application. It can also be a complex enterprise toolset that has hundreds or thousands of users.  Whatever it is, Microsoft Azure should be able to support it. 

This short article will discuss what your organization should think about when moving to the cloud.  It also has some high-level details for how you would migrate your existing code to Azure App Service to effectively use cloud-based services. 

Why Migrate to the Azure App Service? 

There is more than one way to migrate to the Microsoft Azure cloud. 

One way that is familiar to many developers would be to create an Azure Virtual Machine. You can install your application in a custom environment:

  • It gets your application running quickly and is very similar to how it is done in an on-premise data center. 
  • While this is the more straightforward way to start, it can miss out on features that make being in the cloud truly effective. 

As a developer and as someone who manages an application you will need to manage the server that your application is running on.  This requires multiple skilled consultants to make sure that the machine is kept up-to-date and running efficiently.  It also requires that any changes to the infrastructure be orchestrated with multiple individuals and possible lengthy downtime for the application. 

This is where something like Azure App Service can be a game-changer for developers. 

  • Azure App Service allows the developer to create an instance of its service and deploy their code and have it running within seconds.
  • The infrastructure typically required to be built is already provisioned in a standard way. So the developer can plan on it being the same every time a deployment is made. 
  • The application can be scaled quickly and can be configured to run as cost-effectively as possible. It can also match the requirements of the application and the financial requirements of the organization. 

Planning 

After you make the decision to move your ASP.NET web application to the cloud, one of the first things that you should do is start to plan for the changes and new features that you will want to make and use during and after the migration.   

Things you should plan for: 

Setting up or getting access to an Azure Subscription 

The first step in any cloud migration is to set up the accounts necessary to deploy the services that your application will use once deployed and configured. 

If your organization already has an Azure subscription:

  • An administrator should be able to grant your user access to start setting up various Azure services. 

If your organization does not have an Azure subscription:

  • Create Azure accounts and purchase a subscription either from Microsoft directly or a partner (https://azure.microsoft.com/en-us/pricing/purchase-options/).
  • Microsoft has specific Azure subscriptions. They can be used in Dev/Test situations for reduced costs and has Visual Studio developer subscriptions that provide monthly credits towards services (https://azure.microsoft.com/en-us/pricing/dev-test/). 
  • Setting up a new Azure account doesn’t take a long time. It can take under an hour for a small organization with a valid credit card.  An account for a larger organization may need more consideration regarding domains and security setup. 

Monthly/Yearly Costs 

  • Free Azure services that you can take advantage of for Development, Test, and light production scenarios (https://azure.microsoft.com/en-us/pricing/free-services/). Most of the production-ready services will require a monthly fee. 
  • Microsoft provides a great tool called the “Pricing Calculator” (https://azure.microsoft.com/en-us/pricing/calculator/) for you to use to generate estimates of what it will cost to run your application and services. Most services run for a reasonable price, but the final cost depends on the number of services used and the level of the service provided.
  • Microsoft also provides documentation for all the services and features available for purchase through the Azure portal (https://learn.microsoft.com/en-us/azure/).  This information can be helpful to reference when trying to figure out which optional features you may need to purchase and which you may not. 

What Azure Resources will you need to purchase? 

To deploy your first Azure App Service application, you will need at least an App Service instance and an App Service plan.  Typically, this is only the beginning though.  Like on-premises applications, most cloud applications will use supporting applications and services.  You will likely need additional services such as a database and some sort of storage. 

In Azure, these come in the form of Azure SQL and Azure Storage. 

  • Azure SQL has a few different varieties depending on the level of growth and service needed.  Different options include
    • SQL servers on Azure Virtual Machines
    • Azure SQL Managed Instances
    • Azure SQL Databases. 

Depending on the version that you choose you will get different levels of availability, security, and control over your data.   

Microsoft Azure - SQL Configuration
Figure 3 – Microsoft Azure SQL Configuration

Your application may have leveraged file shares or locally connected storage when it was running on-premise but when running in Azure App Service it will need a different way to store its data as local storage isn’t really an option.  This is achievable by using Azure Storage.  Azure Storage also comes with a variety of services:

  • Azure Blob Storage
  • Azure Files
  • Azure Disk Storage, and more. 

There are more services that can and should be used to host a cloud-based application but that will depend on your level of comfort with those technologies and on your particular application and budget. 

Making the Move: Strategies

The test application 

If you are completely new to Azure or cloud computing, I would recommend that you experiment with the Azure App Service before modifying and deploying your existing on-premises web application to Azure.  There is a certain amount of experience that you can gain by doing this which can help you in your actual migration. 

  • Create a simple test application from scratch and deploy that first.
    • Set up the services and configure the various deployment options in Visual Studio or in the DevOps solution of your choice. 
    • This will force you to create various Azure services and get familiar with other concepts such as
Azure - Create Web App
Figure 4 – Create Web App

Having a test application can also help during the migration when you need to test a feature that may not be working correctly and need a clean start to eliminate possible factors that may be causing the problem.  Working through issues before a test migration in a test application will give you more confidence that you can work through issues when you get to the actual application migration. 

The “simple” application 

If you are planning to migrate multiple applications to Azure, you may have a choice of which application to move first.  I would recommend choosing a simple application first.  This will allow your team to see what it takes to successfully migrate.  Choose an application that uses fewer services and that has a smaller dataset.  This will help limit the number of things that could go wrong during and after deployment.  This option is similar to building a test application but with less freedom to make changes and with more existing dependencies. 

No changes, just deploy. 

Assuming you haven’t migrated anything to the cloud before and don’t quite know what you need to modify yet. A valid approach can be making no modifications to your application and deploying what you already have.  To set expectations, this will probably not work on the first try.  So don’t expect to have users using your application the next day.  This is a strategy to better enumerate the number of things that need modifying before you start your modifications.  It’s a quick thing that you can do to give you an early idea of the challenges ahead. 

Azure Resources
Figure 5 – Azure Resources

You may find that you are very close to a successful migration.  You can migrate many applications with minor changes.  You may even need to do this multiple times as you eliminate issues and move on to new items.  Larger applications will be more difficult to do in this manner as they have more dependencies that will mostly fail without modifications and major configuration changes.  However, you may be able to use this technique in a Dev/Test environment as you build up the required dependencies and need to test your progress. 

Migration Tools 

Microsoft offers tools and documentation that you can leverage when evaluating existing applications for migration. 

Migration Assessment from Total Solutions 

If you would like assistance with your application migration Total Solutions would be happy to help guide your team. We can assess your application and even assist in the migration process.  Contact us at info@totalsol.com for more information. 

Summary 

These are a few strategies that can help you get started with your migration to Azure App Service.  While you may prefer one over the other or have a few of your own I suggest utilizing more than one strategy when migrating to Azure App Service to make it as successful as possible.  The cloud makes it easy to get started so pick your strategies and start building.