Most organizations are defined by the way they build software. Today, every company runs different types of applications that are essential for its success but particularly important are the customer facing ones. The customers are central to every business and the new market makers. Many startups such as online health providers, e-commerce, challenger banks gain new and maintain old customers by providing new applications and services.
Over the past years the strategy for adopting cloud has evolved from cost saving to being the business engine of organizations. By using a cloud platform such as Azure we can:
- Provide quality of service on web apps – by taking advantage of guaranteed SLAs to be always available or automated scaling to handle traffic peaks
- Be more agile and productive in projects – by automating deployments to decrease the time to market, as well as by using integrated development and monitoring tools to tackle issues more effectively
- Integrate easily with different services and components of an application, as well as with existing investments and legacy systems – by using pre-built components and connectors, both in the cloud and on-premises for hybrid solutions
- Handle security and privacy without specific investments in these areas – forgetting about updates, patching, end of support or major breaking changes by staying automatically up to date, and benefiting from the numerous privacy, compliance and security certifications that Azure provides as a platform.
- Innovate by using cognitive services and conversational bots to give a more personalized experience.
Before migrating to Azure we need to determine whether the app is compatible in its current state or needs some adjustments through a custom assessment report.
To Begin, we only need to provide the URL of a website to get a full report of all the technologies used in the application and whether they are supported in App Service. You can access the Migration Assistant tool by visiting the following URL
Migrating to Azure
Once everything is ready for migration, we can bring the web application to Azure through three different paths:
- Automating the process with the App Service Migration Assistant tool for .NET and PHP apps
- Redeploying the existing code by setting up a CI/CD pipeline with App Service as the destination for deployments
- Containerizing the existing application and deploying it to App Service
Azure app service migration assistant
The App Service Migration Assistant tool provides an automatic path to migrate .NET and PHP apps to Azure. After the initial assessment, the customers need to download a tool that will perform some readiness checks. By running on the current host of the app, the tool can offer recommendations for the needed remediation steps prior to migration.
After that, the tool will follow through a step-by-step wizard for an automatic migration.
To start a assisted migration download and install the App Service migration assistant. The assistant tool has to be run the server running the web application. In our case we have an Asp Net 5 web api running on IIS.
When running the tool will show all the sites that are deployed on the current host and in this case is only one. Select the site and continues.
The migration assistant performs an assessment and an assessment report will be displayed. In our case everything looks fine so we can just continue.
Then after login we will be able to select the resource groups, app service name. The Migration Assistant tool will then move your site to the selected App Service plan while also configuring Hybrid Connections, should that option be selected.
After the migration is completed then we can look at our resources in azure. The is a method to quickly and in an assisted manner to migrate your site to azure. However most om the organization deploy their sites through a maybe more automated software delivery pipeline and we will look at those in the coming sections.
Bring your code
For customers who want to redeploy their existing codebase by themselves, Azure App Service offers flexibility on the choice of technologies to use for development and deployment.
It supports the most common programming languages and frameworks (such as all flavors of .NET, PHP, Node.js, Python, Java or Ruby), development tools (with integration with Visual Studio, VS Code, IntelliJ, or Eclipse), source code repositories (such as GitHub, Azure DevOps, Git, BitBucket) and CI/CD tools and engines (again with Azure DevOps, Kudu, Jenkins, or Maven).
For a more effective deployment experience, App Service provides several deployment slots for the same site, enabling customers to have zero downtime deployments, canary deployments etc.
To identify and resolve issues faster and effectively, Azure App Service offers integrated monitoring and logging through Azure Monitor with Application Insights – providing thus detailed information about different metrics and usage – as well as a chatbot-like experience that points to root cause of issues and possible solutions.
Most is not all of application lifecycle management tools have support for Azure. We can mix and match to create workflows with tools from Microsoft, open source or your favorite 3rd party tools. In the following example it is enough to change the CD workflow/pipeline and point out to Azure.
Bring your containers
For containerized web applications, App Service supports both Windows and Linux containers, fully integrated with container registry services for deployment – such as Docker Hub and Azure Container Registry.
Customers can enjoy the rest of the benefits of this fully managed platform when deploying their containers – with built-in DevOps, integration with dev tools, intelligent monitoring by default and multiple deployment slots.
As for bring the code is enough to change the CD. Images can be pushed to ACR. ACR is more than just a private registry. For example, you can use a multi-step task that automates :
- Build a web application image
- Run the web application container
- Build a web application test image
- Run the web application test container, which performs tests against the running application container
- Task steps defined in a YAML file specify individual build and push operations for container images or other artifacts.
As an image publisher, content trust allows you to sign the images you push to your registry. Consumers of your images (people or systems pulling images from your registry) can configure their clients to pull only signed images. When an image consumer pulls a signed image, their Docker client verifies the integrity of the image.
Azure Container Registry gives you the option to set a retention policy for stored image manifests that don't have any associated tags (untagged manifests). When a retention policy is enabled, untagged manifests in the registry are automatically deleted after a number of days you set.
Geo replication is a useful feature in the case we want to take advantage of serving content to different regions. Image can get bigger and we want to have a ACR as close as possible to the AKS.
- push in only once and the regions will make a pull.
- used traffic managers so you when pulling we will get the closest location. (Closest deployment model)