Reader small image

You're reading from  Azure Architecture Explained

Product typeBook
Published inSep 2023
PublisherPackt
ISBN-139781837634811
Edition1st Edition
Right arrow
Authors (2):
David Rendón
David Rendón
author image
David Rendón

David Rendón, Microsoft MVP and Microsoft Certified Trainer, is a highly regarded expert in the Azure cloud platform. With over 15 years of experience as an IT professional, he has been deeply committed to Microsoft technologies, especially Azure, since 2010. With a proven track record of leading and driving strategic success, David has over seven years of management experience, technical leadership, and collaboration skills. David delivers private technical training classes worldwide, covering EMEA, South America, and the US, and he is a frequent speaker at renowned IT events such as Microsoft Ignite, Global Azure, and local user group gatherings in the US, Europe, and Latin America.
Read more about David Rendón

Brett Hargreaves
Brett Hargreaves
author image
Brett Hargreaves

Brett Hargreaves is a principal Azure consultant for Iridium Consulting, who has worked with some of the world's biggest companies, helping them design and build cutting-edge solutions. With a career spanning infrastructure, development, consulting, and architecture, he's been involved in projects covering the entire solution stack using Microsoft technologies. He loves passing on his knowledge to others through books, blogging, and his online training courses.
Read more about Brett Hargreaves

View More author details
Right arrow

Working with Containers in Azure

This chapter will bring together what you have learned in previous chapters of the book as we will discuss how to leverage core Azure services to architect your solutions.

This chapter will cover the main reasons containers are relevant for organizations and help you understand the different services available in Azure to work with containers. Then, we will dive deep into how to work with the various services in Azure related to containers and their components.

By the end of this chapter, you will better understand the multiple Azure offerings for containers and their differences. Chances are, you already manage infrastructure in your organization, such as virtual machines and their components.

We’ll be covering the following main topics:

  • Understanding cloud-native applications
  • Understanding the difference between virtual machines and containers
  • Azure Container Instances
  • Working with Azure containers
  • Creating...

Understanding cloud-native applications

The landscape of our lives and work has undergone a significant transformation. Leading industries are actively transitioning their interactions with users, shoppers, patients, and voters from physical to digital platforms. The modernization of their applications has become an imperative shared by organizations across various sectors.

In many instances, the drive to modernize our applications is born out of a competitive necessity, ensuring that businesses remain relevant and avoid being left behind amid the relentless forces of the market. Additionally, industry regulations and the need to incorporate the latest security technologies serve as compelling drivers for modernization. Furthermore, organizations are recognizing that embracing application modernization provides an excellent opportunity to shed excessive capital expenditure and reduce costs by leveraging resources in a more agile manner.

The benefits of building cloud-native applications...

Understanding the difference between virtual machines and containers

Virtual machines host a variety of workloads, from SSH servers and monitoring to identity management, and have been the way to run programs and deploy applications for the last decades instead of using physical computers. One of the top benefits of using virtual machines in previous years was providing isolation from the host operating system.

This was useful in establishing security boundaries to host applications on the same server or cluster.

While each virtual machine runs its own operating system, it requires additional computing resources, such as CPU, memory, and storage. Also, as organizations expanded their on-premises footprint based on virtual machines, the complexity of managing them at scale not only became an operational issue but also meant a very costly expense.

The advent of cloud computing impacted how applications are designed. Organizations tried to adopt microservices, a single-tiered...

Azure Container Instances

Azure Container Instances, or ACI, as we will refer to it from now on, allows organizations to run containers on Azure simply and launch them in seconds to access applications quickly.

The ACI service is billed on a per-second basis. Instead of managing the underlying virtual machine, you can specify the values for the computing power you need to run your container and define the values for CPU cores and memory.

ACI enables exposing your container groups directly to the internet with an IP address and a fully qualified domain name (FQDN). When you create a container instance, you can specify a custom DNS name label so your application is reachable, as shown in the following figure:

Figure 7.3 – Azure Container Instances

Figure 7.3 – Azure Container Instances

By using the ACI service, you don’t need to manage virtual machines; ACI is a great solution where you can operate isolated containers and build applications, automation, and build jobs.

...

Working with Azure Container Instances

In this exercise, we will perform the following tasks:

  1. Create an Azure Container Registry instance.
  2. Push a container image to Azure Container Registry.
  3. Create an Azure Container Instance.
  4. Deploy ACI for WebApp.

Let’s begin!

Creating the Azure Container Registry instance

First, we will create an instance of Azure Container Registry (ACR), a managed registry service based on Docker Registry 2.0. Think of ACR as your private repository that allows you to share container images with your team.

You can leverage ACR to manage and build container images in Azure. You can pull images from ACR and target other Azure services, such as AKS, App Service, Batch, and Service Fabric.

Consider using ACR Tasks, a suite of ACR features, to automate the container image builds, updates to a container’s base image, or timers. ACR Tasks support various scenarios to build and maintain your container images:

    ...

Creating Azure Container Apps

Another option organizations can leverage for building and deploying containerized applications is Azure Container Apps. This fully managed serverless container service runs on top of Kubernetes infrastructure.

Azure Container Apps is a powerful service that takes care of the underlying cloud infrastructure, allowing you to focus solely on your applications. With event-driven scalability, you can even scale down to zero instances, eliminating costs when not in use. However, when high demand arises, you can effortlessly scale up to thousands of instances to handle the increased workload.

The primary purpose of Azure Container Apps is to facilitate how you build and deploy containerized applications and have the benefits of PaaS for scaling without managing Kubernetes nodes. In this approach, a developer can deploy containers as individual container applications using the Azure portal, CLI, or infrastructure as code, and there’s no management...

Summary

Hopefully, you have a better understanding of Azure containers and can identify when to use Azure containers versus Azure virtual machines, as well as identify the features and usage cases of ACI and how to implement Azure container groups.

This chapter also reviewed the features and benefits of ACR and how you can leverage ACR Tasks to automate builds and deployments. ACI is a great offer for any scenario operating in isolated containers.

We also reviewed Azure Container Apps, its components, and how you can use this service to run microservices on a serverless platform.

In the next chapter, we will discuss how Azure networking services can help organizations optimize their network infrastructure, making it more efficient, reliable, and secure, and ultimately supporting business growth and innovation.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Azure Architecture Explained
Published in: Sep 2023Publisher: PacktISBN-13: 9781837634811
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime

Authors (2)

author image
David Rendón

David Rendón, Microsoft MVP and Microsoft Certified Trainer, is a highly regarded expert in the Azure cloud platform. With over 15 years of experience as an IT professional, he has been deeply committed to Microsoft technologies, especially Azure, since 2010. With a proven track record of leading and driving strategic success, David has over seven years of management experience, technical leadership, and collaboration skills. David delivers private technical training classes worldwide, covering EMEA, South America, and the US, and he is a frequent speaker at renowned IT events such as Microsoft Ignite, Global Azure, and local user group gatherings in the US, Europe, and Latin America.
Read more about David Rendón

author image
Brett Hargreaves

Brett Hargreaves is a principal Azure consultant for Iridium Consulting, who has worked with some of the world's biggest companies, helping them design and build cutting-edge solutions. With a career spanning infrastructure, development, consulting, and architecture, he's been involved in projects covering the entire solution stack using Microsoft technologies. He loves passing on his knowledge to others through books, blogging, and his online training courses.
Read more about Brett Hargreaves