Linux on Microsoft Azure?

Mechanics Team
9 min readApr 19, 2024

--

Run Linux workloads on Azure for reliability, security, and innovation. Build your entire app in Azure, using Linux and open source services. Choose from a wide range of Linux distributions, leverage cost-saving benefits with Azure Hybrid Benefit, and get seamless integration with distros like SUSE, Ubuntu, and Red Hat.

Join Azure expert, Matt McSpirit as he shares why you should run your Linux workloads on Azure, and how to ensure security of sensitive data with AI-driven threat detection, Defender for Cloud, and Confidential Computing.

Run Linux workloads on Azure.

Maximize ROI and performance, enhance security, and accelerate innovation. Check out Microsoft’s commitment to the open source community.

Develop and innovate quickly.

Utilize GitHub tools seamlessly with Azure’s open platform for agile, robust app development.

See security advantages of running your Linux workloads on Azure.

Protect sensitive data with AI-powered threat detection, Defender for Cloud, and Confidential Computing. Check it out.

Watch our video here.

QUICK LINKS:

00:00 — Run Linux workloads on Azure
00:26 — Open source distribution
02:44 — Build apps in Azure using open source technologies
03:40 — Limitless scaling and reliability
05:40 — Deploy, manage, and extend Linux workloads on Azure
06:53 — Red Hat integration
07:40 — Open source options for compute
08:32 — Extend and modernize app experiences
09:02 — Security advantages for Linux workloads
09:47 — Wrap Up

Link References:

Get started with Linux on Azure at https://azure.com/linux

Unfamiliar with Microsoft Mechanics?

As Microsoft’s official video series for IT, you can watch and share valuable content and demos of current and upcoming tech from the people who build it at Microsoft.

Keep getting this insider knowledge, join us on social:

Video transcript:

-Does it make sense to run your Linux workloads on Azure, and how serious is Microsoft about Linux and open source software? Well, today, I’ll answer those questions and more. First, Microsoft itself relies on Linux for some of its most popular cloud services.

-For example, Azure OpenAI Service, Azure Kubernetes Service , the App Service, Cosmos DB, Azure Database for PostgreSQL and more all run on Linux.

-And it may also surprise you to know that Microsoft is one of the largest contributors to the open source community and has been for more than a decade. In fact, many of the Linux and OSS features and components across the platform stack that you use every day, have been built by and are maintained by people at Microsoft.

-From Linux kernel releases for reliability and security, to Systemd, which is used to manage the Linux boot experience, KVM, or Kernel-based Virtual Machine, an open source virtualization technology built into Linux since 2007, and related to that, the QEMU machine emulator for full system and user mode emulation. At the data layer, the Data Plane Development Kit, or DPDK, provides libraries and network drivers for faster packet processing and for networking there’s the Common Internet File System, or CIFS, network file-sharing protocol.

-Then, moving up the stack, there’s GNOME with its improvements to the graphical user interface, as well as Mesa3D, used for gaming and 3D implementations like OpenGL, Vulkan, and others. It also may surprise you that Microsoft contributes to and maintains its own distro. The Azure Linux OS is an open source distribution that is used broadly across a number of Microsoft services from Microsoft 365 to the Xbox services, Minecraft’s global creativity platform and the Windows Subsystem for Linux.

-Then there’s also Linux-based open source semantic kernel SDK, developed and contributed by Microsoft, that lets you easily build agents that can call your existing code. And you can use it with models from Open AI, Hugging Face and more. Additionally, Microsoft contributes to Kubernetes, which provides the foundation for container orchestration and is key to cloud-native app architectures.

-And of course, Microsoft runs GitHub, the largest hosting platform for open source projects with more than 100 million developers. These are just a few notable examples of Microsoft’s role as a dedicated and active community member helping to drive the open source Linux platform forward. Now Azure itself, is designed to be an open platform, freeing you up to use the tools and technologies of your choice. In fact, the vast majority of compute workloads, virtual machines and containers run Linux. It’s on more than 60% of all active customer compute cores.

-And today, there’s really nothing to hold you back from building your entire app in Azure, using open source technologies, and I’ll prove it to you using only Linux and open source services. This is actually the machine of one of our Microsoft engineers and Microsoft has thousands of employees that use Linux as their primary OS. It’s a workplace-provisioned Linux machine running Ubuntu.

-And when I sign into Intune, you can see it’s a fully enrolled device and as part of the Microsoft corporate network, it’s met the device and security requirements for Microsoft IT. We’ve started building a generative AI app using Azure OpenAI service and we’re prompting it to write a Python script to create safe passwords with a minimum length and special characters.

-So we can see it’s working pretty well, and so the next thing we want to do is to make sure that the app scales. So, first, we’ll run a load test for the app to simulate 50 simultaneous users. This will help us see how well it performs with the current assigned compute using containers running Linux.

-And a test like this normally takes a few minutes to run, so we’ll speed things up a bit. And you can see that as users and requests jump up, the response time is also increasing and we’re getting errors based on the allocated compute. There aren’t enough pods to handle the heavy load. And we can jump into the open source Grafana dashboard, which is an Azure-managed service, and we’ll see that the CPU throttling is maxed out at 100%, so let’s fix that.

-So here, we’re using a GitHub Codespaces cloud-hosted VM as a dev environment as you can see in the lower left corner of the screen, and this was spun up directly through a GitHub code repo. It’s already got Visual Studio Code running locally. Now, we’ll highlight the resources for this app with memory and CPU.

-And we’ll use GitHub Copilot to set the CPU request to 1 CPU and set limits to 2 CPUs, and it makes the necessary changes. Now we’ll add another prompt that’s a bit longer to set up autoscaling with the right min/max number of replicas and how to scale down. And it creates the code for me automatically.

-Now we’ll add another prompt with instructions for minimum and maximum nodes in a Bicep template, and by the way, I could have used any infrastructure as code like Terraform for example. And from here, we can even use GitHub Copilot to create a multistage Docker file with the rest of what we need, before we commit changes. Now we need to perform a series of commits for all the changes that were just made and run the docker file and the Bicep template for the deployment, which I’ve skipped past to save time. So now, going back to our app, you’ll see it’s completely updated, and everything is up and running with the configuration changes.

-So, let’s re-run the load test, and again, that’s going to take a few moments to run. This time, we’ll head directly in Grafana and on the right of the CPU usage graph, you’ll see that all of our pods are distributing the load, and by changing the view to show the last five minutes, we get a better view across our containers as they handle the load test.

-So our app is no longer getting throttled by resource constraints and we’re ready to handle a lot more requests. And again, everything you just saw ran Linux and open source. So now let’s get into your options for deploying, managing, and extending your Linux workloads on Azure.

-First, almost every Linux distribution runs on Azure, so you have plenty of choice. There are hundreds of Linux offerings in the marketplace, and you can bring your own image or distribution as well. You can also see that in the community gallery there are hundreds of image options with about every flavor of Linux you can imagine.

-Azure’s service platform and its hypervisor layer is also fully-optimized for Linux to ensure peak performance and security. There are free and low cost options to get started in Azure that you can use with Linux virtual machines, containers, or other services. And if you’re part of a startup, the founders hub program can provide up to $150,000 to apply toward Azure services, including OpenAI and popular Linux distros.

-Additionally, as you create your VMs, with Azure Hybrid Benefit, you can bring your own Red Hat or SUSE Linux subscriptions to Azure and realize cost savings of up to 76% when combined with reserved instances. You can deploy, manage, and scale Linux cloud apps of any size, where you have a number of options. In fact, Microsoft has close engineering partnerships with SUSE, Ubuntu and Red Hat, three of the most popular distros. Now for Red Hat specifically, the depth of partnership, integration and support is unparalleled compared to other Cloud providers. For example if you have an issue, as you work with your support team both Azure and Red Hat’s support engineers can work together with your approval.

-And in fact, these engineers are often co-located, and their customer service systems are integrated to triage issues in the least amount of time by enabling them to collaborate efficiently on your case as they troubleshoot the problem and work towards a solution. And we also uniquely run a number of managed Red Hat services in Azure with direct integration built in.

-For enterprise workloads, you can use Ansible to automate the configuration and deployment of your Linux VMs and applications on Azure, or JBoss EAP to run Java Enterprise Edition apps on Linux VMs or containers. So now let’s move onto your open source options for compute, spanning multiple infrastructure architectures and using your preferred data backend services. Azure Container Instances lets you quickly deploy and run container apps without managing servers. And if VM or physical servers are your thing, of course you can run containers on those as well, with unified management and orchestration. Additionally, Azure Kubernetes Service, or AKS, lets you run containerized applications across multiple nodes.

-And there are also hybrid and multicloud solutions with AKS running on Azure Stack HCI, as well as Arc enabled Kubernetes which extends unified management and governance capabilities to your Kubernetes clusters wherever you need them. Then, for your data backend, you can use open source options, like PostgreSQL, MySQL, Cassandra, Redis, and others. As you’ve seen, there’s literally all the building blocks for developing, deploying and managing your Linux workloads.

-And once you are in Azure, you can extend and modernize your app experiences with some of world’s most robust AI solutions running on Azure’s supercomputer infrastructure and integrated platform. For example, for your AI workloads, you can use Azure Machine Learning to build, train, and deploy machine learning models using Linux-based compute clusters and environments.

-And use Azure AI services to augment your apps with vector search, AI vision, AI speech, AI translation, Document Intelligence read OCR at scale, and more. There are also significant security advantages for your Linux workloads. Azure processes ensure supply chain security, and all services are built with security in mind from the kernel up. Microsoft also employs more than 10,000 security specialists, with detection and response solutions powered by AI, and backed by the largest compliance portfolio in the industry.

-For example, Microsoft Defender for Cloud brings advanced threat protection, security recommendations, and real-time monitoring to your Linux and hybrid workloads. If you’re in a highly regulated industry, Microsoft is also a leader in confidential computing for protecting sensitive data while in use with Confidential Computing, partnering with AMD, Intel, and NVIDIA for hardware-based isolation with virtual machines and containers.

-So, to answer the question I posed earlier, hopefully, I’ve convinced you that it’s a no-brainer to run your Linux workloads on Azure. To get started with Linux on Azure, check out azure.com/linux. Subscribe to Microsoft Mechanics if you haven’t already, and thanks for watching.

--

--