Legacy Application Modernization with Microsoft Azure

In today’s fast-paced digital landscape, businesses face constant pressure to innovate and stay competitive. Legacy applications, while valuable, often hinder this progress due to their outdated infrastructure and high maintenance costs. However, there’s a solution that allows businesses of all sizes to revitalize their legacy applications while reducing IT\SDLC expenses with – Microsoft Azure Cloud.

Microsoft Azure, a robust cloud platform, offers a pathway to migrate and modernize legacy applications effectively. In this blog, we’ll explore three common scenarios in which you can leverage Azure to breathe new life into your aging applications.

Three Key Scenarios for Transforming your Outdated Systems:

Scenario 1: Cloud Infrastructure-based Applications (Lift & Shift)

In this scenario, enterprises migrate their existing on-premises applications to Microsoft Azure’s Infrastructure as a Service (IaaS) platform. The core components of the applications remain unchanged, but they find a new home on virtual machines (VMs) in the cloud. This approach, often referred to as “Lift & Shift,” is the ideal choice for businesses looking for a quick migration strategy [Migrate First Modernize Later].

Benefits:

  • Speedy migration with minimal disruptions.
  • Reduced infrastructure management overhead.
  • A stepping stone for future modernization efforts.

Scenario 2: Cloud Optimized Applications

Enterprises can achieve additional benefits without undergoing a significant code overhaul. Azure enables applications to leverage modern cloud technologies such as containers or other cloud-managed services like database as service, App Services etc. These containers can be deployed on either App Service for containers or Kubernetes. There by further optimize the applications with better monitoring integrations, cache as a service, and continuous integration/continuous deployment (CI/CD) pipelines.

Benefits:

  • Enhanced scalability and agility.
  • Integration with managed cloud services.
  • Reduced complexity and improved performance.

Scenario 3: Cloud-Native Applications

Driven by evolving business needs, this scenario targets the modernization of mission-critical applications. Here, Azure’s Platform as a Service (PaaS) offerings come into play, facilitating the migration of applications to cloud-native platforms. This approach often involves developing new code, especially when transitioning to cloud-native or microservice-based models.

Benefits:

  • Harness the full potential of cloud-native capabilities.
  • Achieve unparalleled scalability and agility.
  • Streamline development and deployment processes.

Key Business Benefits of Azure Migration:

1. Platform Benefits:

Microsoft Azure provides a comprehensive cloud stack, covering frontend, backend, data, intelligence, Ops, SecOps, and DevOps. It offers a powerful and flexible foundation for both existing and new applications.

2. Security:

Azure prioritizes security with built-in services and intelligent threat management. It ensures the safety of your workloads and data.

3. Fully Managed:

Azure’s built-in auto-scaling, CI/CD, load balancing, and failover capabilities eliminate the need for complex configurations, saving time and resources.

4. Superior Tooling:

Azure offers advanced monitoring, telemetry, and debugging tools, along with seamless integration with popular development platforms like Visual Studio, GitHub, BitBucket, and Azure DevOps.

5. Familiarity:

For businesses using ASP.NET apps, Azure is enterprise-ready and supports your existing knowledge and skills, making the transition smoother.

Conclusion:

Modernizing legacy applications is not just about staying up-to-date; it’s about unlocking new possibilities, reducing costs, and ensuring long-term sustainability. Microsoft Azure’s robust features and flexible migration options empower businesses to transform their legacy systems into agile, high-performance assets that drive innovation and competitiveness in today’s digital landscape.

Are you looking to modernize yours for applications? Our team can help transform your applications to become more agile and efficient. Contact us.

APP MODERNIZATION
APP MODERNIZATION

Azure Arc enabled Kubernetes for Hybrid Cloud Management — Manage Everything and Anywhere

Azure Arc-enabled Kubernetes extends Azure’s management capabilities to Kubernetes clusters running anywhere, whether in public clouds or on-premises data centers. This integration allows customers to leverage Azure features such as Azure Policy, GitOps, Azure Monitor, Microsoft Defender, Azure RBAC, and Azure Machine Learning.

Key features of Azure Arc-enabled Kubernetes include:

  1. Centralized Management: Attach and configure Kubernetes clusters from diverse environments in Azure, facilitating a unified management experience.
  2. Governance and Configuration: Apply governance policies and configurations across all clusters to ensure compliance and consistency.
  3. Integrated DevOps: Streamline DevOps practices with integrated tools that enhance collaboration and deployment efficiency.
  4. Inventory and Organization: Organize clusters through inventory, grouping, and tagging for better visibility and management.
  5. Modern Application Deployment: Enable the deployment of modern applications at scale across any environment.

In this blog, we will follow a step by step approach and learn how to:

1. Connect Kubernetes clusters running outside of Azure

2. GitOps – to define applications and cluster configuration in source control

3. Azure Policy for Kubernetes

4. Azure Monitor for containers

 

1. Connect Kubernetes clusters

Prerequisites

  • Azure account with an active subscription.
  • Identity – User or service principal
  • Latest Azure CLI
  • Extensions – connectedk8s and k8sconfiguration
  • An up-and-running Kubernetes cluster
  • Resource providers – Microsoft.Kubernetes, Microsoft.KubernetesConfiguration, Microsoft.ExtendedLocation

Create a Resource Group

Create a Resource Group using below command in Azure portal choose your desired location. Azure Arc for Kubernetes supports most of the azure regions. Use this page Azure products by region to know the supported regions.

* az group create –name AzureArcRes -l EastUS -o table

For example: az group create –name AzureArcK8sTest –location EastUS –output table

Connect to the cluster with admin access and attach it with Azure Arc

We use az connectedk8s connect cli extension to attach our Kubernetes clusters to Azure Arc.

This command verify the connectivity to our Kubernetes clusters via kube-config (“~/.kube/config”) file and deploy Azure Arc agents to the cluster into the “azure-arc” namespace and installs Helm v3 to the .azure folder.

For this demonstration we connect and attach AWS – Elastic Kubernetes service and Google cloud – Kubernetes engine. Below, we step through the commands used to connect and attach to each cluster.

 

AWS – EKS

* aws eks –region <Region> update-kubeconfig –name <ClusterName>

* kubectl get nodes

AWS – EKS 2

* az connectedk8s connect –name <ClusterName> –resource-group AzureArcRes

az connectedk8s connect

GCLOUD- GKE

GCloud – GKE

* gcloud container clusters get-credentials <ClusterName> –zone <ZONE> –project <ProjectID>

* kubectl get no

* az connectedk8s connect –name <ClusterName> –resource-group AzureArcRes

az connectedk8s connect

Verify Connected Clusters

* az connectedk8s list -g AzureArcRes -o table

Verify Connected Clusters

Azure Arc

 

2. Using GitOps to define applications & clusters

We use the connected GKE cluster for our example to deploy a simple application.

Create a configuration to deploy an application to kubernetes cluster.
We use “k8sconfiguration” extension to link our connected cluster to an example git repository provided by SNP.

* export KUBECONFIG=~/.kube/gke-config

* az k8sconfiguration create \

–name app-config \

–cluster-name <ClusterName> –resource-group <YOUR_RG_NAME>\

–operator-instance-name app-config –operator-namespace cluster-config \

–repository-url https://github.com/gousiya573-snp/SourceCode/tree/master/Application \

–scope cluster –cluster-type connectedClusters

Check to see that the namespaces, deployments, and resources have been created:

* kubectl get ns –show-labels

We can see that cluster-config namespace have been created.

Azure Arc enabled Kubernetes

* kubectl get po,svc

The flux operator has been deployed to cluster-config namespace, as directed by our sourceControlConfig and application deployed successfully, we can see the pods are Running and Service LoadBalancer IP also created.

Azure Arc enabled Kubernetes

Access the EXTERNAL-IP to see the output page:

Azure Arc enabled Kubernetes

Please Note:

Supported repository-url Parameters for Public & Private repos:

* Public GitHub Repo   –  http://github.com/username/repo  (or) git://github.com/username/repo

* Private GitHub Repo –  https://github.com/username/repo (or) git@github.com:username/repo

* For the Private Repos – flux generates a SSH key and logs the public key as shown below:

Azure Arc enabled Kubernetes

For this demonstration we connect and attach AWS – Elastic Kubernetes service and Google cloud – Kubernetes engine. Below, we step through the commands used to connect and attach to each cluster.

3. Azure Policy for Kubernetes

Use Azure Policy to enforce that each Microsoft.Kubernetes/connectedclusters resource or Git-Ops enabled Microsoft.ContainerService/managedClusters resource has specific Microsoft.KubernetesConfiguration/sourceControlConfigurations applied on it.

Assign Policy:

To create the policy navigate to Azure portal and Policy, in the Authoring section select the Definitions.
Click on Initiative definition to create the policy and search for gitops in the Available Definitions, click on Deploy GitOps to Kubernetes clusters policy to add.
Select the subscription in the Definition locations, Give the Policy assignment Name and Description.

Choose the Kubernetes in the existing Category list and scroll-down to fill the Configuration related details of an application.

Azure Arc

Select the policy definition and click on Assign option above and set the scope for the assignment. Scope can be Azure resource group level or subscription and complete the other basics steps – Assignment name, Exclusions, remediation etc.

Click on parameters and provide name for the Configuration resourceOperator instanceOperator namespace and set the Operator scope to cluster level or namespace, Operator type is Flux and provide your application github repo url (public or private) in the Repository Url field. Now, additionally pass the Operator parameters such as “–git-branch=master –git-path=manifests –git-user=your-username –git-readonly=false” finally click on Save option and see the policy with the given name is created in the Assignments.

Once the assignment is created the Policy engine will identify all connectedCluster or managedCluster resources that are located within the scope and will apply the sourceControlConfiguration on them.

Azure Arc

–git-readonly=false enables the CI/CD for the repo and creates the Auto releases for the commits.

 

Azure Arc enabled Kubernetes

 

Verify a Policy Assignment

Go to Azure portal and click on connected Cluster resources to check the Compliant Status, Compliant: config-agent was able to successfully configure the cluster and deploy flux without error.

Azure Arc enabled Kubernetes

We can see the policy assignment that we created above, and the Compliance state should be Compliant.

Azure Arc

4. Azure Monitor for Containers

It provides rich monitoring experience for the Azure Kubernetes Service (AKS) and AKS Engine clusters. This can be enabled for one or more existing deployments of Arc enabled Kubernetes clusters using az cli, azure portal and resource manager.

Create Azure Log Analytics workspace or use an existing one to configure the insights and logs. Use below command to install the extension and configure it to report to the log analytics workspace.

*az k8s-extension create –name azuremonitor-containers –cluster-name <cluster-name> –resource-group <resource-group> –cluster-type connectedClusters –extension-type Microsoft.AzureMonitor.Containers –configuration-settings logAnalyticsWorkspaceResourceID=<armResourceIdOfExistingWorkspace

It takes about 10 to 15 minutes to get the health metrics, logs, and insights for the cluster. You can check the status of extension in the Azure portal or through CLI. Extension status should show as “Installed”.

Azure Arc enabled Kubernetes

Azure Arc enabled Kubernetes

We can also scrape and analyze Prometheus metrics from our cluster.

Clean Up Resources

To delete an extension:

* az k8s-extension delete –name azuremonitor-containers –cluster-type connectedClusters –cluster-name <cluster-name> –resource-group <resource-group-name>

To delete a configuration:

*az k8sconfiguration delete –name ‘<config name>‘ -g ‘<resource group name>‘ –cluster-name ‘<cluster name>‘ –cluster-type connectedClusters

To disconnect a connected cluster:

* az connectedk8s delete –name <cluster-name> –resource-group <resource-group-name>

 

Conclusion:

This blog provides an overview of Azure Arc-enabled Kubernetes, highlighting how SNP assists its customers in setting up Kubernetes clusters with Azure Arc for scalable deployment. It emphasizes the benefits of Azure Arc in managing Kubernetes environments effectively.

SNP offers subscription services to accelerate your Kubernetes journey, enabling the installation of production-grade Kubernetes both on-premises and in Microsoft Azure. For more information or to get assistance from SNP specialists, you can reach out through the provided contact options. Contact SNP specialists here.