Getting Started with Containers: Azure Container Services Explained

By Tim Archer| May 24, 2018

Lately, I’ve found you can’t have a conversation about deploying a new application without talking about containers. Businesses of all size are eager to understand what containers are, what services are offered, and how to best leverage the latest container innovations for their specific development needs.

Why Are Containers So Popular?

Containers are the answer for how to get software to run reliably when moved from one computing environment to another, regardless of whether the target environment is a private data center, public cloud, or even a developer’s personal laptop. With this comes a number of benefits:

  • Portability: Applications end up being very portable as the container host environment is consistent
  • Speed & Predictability: Deployments are both fast and predictable as your container holds the entire runtime environment and configuration
  • Lightweight: Containers promote a strategy of breaking larger applications into smaller components and microservices
  • Scalability: Containers can be scaled quickly, and can be started and stopped very quickly as well
  • Uniting Developers and IT Operations Teams: Containerized applications fit nicely into a Dev Ops environment

Essentially, this all translates to easier development, testing, deployment and management of all your applications. It’s safe to say containers are here to stay, so how does one get started?

Getting Started with Containers

As containers explode onto the application development scene, we’re seeing cloud service providers like Azure quickly turning into a container-driven public cloud. Today, there are multiple services offered within Azure related to containers. But which services should you be using?

To help you understand how to best embrace the latest in container innovation, let’s take a closer look at each of the four primary Azure container services:

Azure Container Registry

The first service you'll want is an Azure Container Registry. At its core, this is a flexible service that provides a private Docker registry to store your container images enabling fast retrieval for your deployments. It also supports geo-replication of your images, which is important for DR and HA requirements. Lastly, it uses the open source Docker CLI tools that your Dev Ops team is likely already familiar with.

Regardless of the service you choose for deploying your containers, you should set this service up first.

Azure Container Instance

Azure Container Instances are perhaps the easiest way to get started with containers. They allow you to create and manage Docker containers in Azure without having to provision virtual machines or adopt a higher-level (and more complex) orchestration service.

To set one up, you can simply go into the Azure Portal and create one in less than 5 minutes by selecting how much RAM and how many cores you want, and then point it at your container registry. However, with this simplicity, you don’t get features such as automated horizontal scaling of your images, nor a load balancer in front of them.

Azure Web App for Containers

The Azure Web App for Containers Service is about as simplistic as Azure Container Instances gets in that you still don’t have to worry about setting up an orchestration service. You still set up an app service plan just like the other PaaS web app offerings, however, instead of deploying your application code to the web app, you point your web app at an image in your container registry.

Startup times and deployments are fast, and your app can also auto-scale, adding as many instances as necessary if your average CPU load is high. Your traffic is automatically load balanced to your instances and Azure will manage removing instances as the load decreases.

Unlike Azure Container Instances, you cannot just arbitrarily specify how much CPU or RAM you want each instance to have. Rather, you have to choose one of the predefined options permitted by the underlying App Service Plan.

One key requirement with Web App for Containers is that it has to be a web app, which means something has to be handling traffic in your container on port 80. If not, then Azure will not consider your app running and will try to restart it.

Azure Container Service

If you've fully bought into containers, this is probably the service you want for your production environment. Be warned though, it is the most complex and hardest to get started.

Azure Container Service (ACS) provides a way to simplify the creation, configuration, and management of a cluster of virtual machines that are preconfigured to run containerized applications. Using an optimized configuration of popular open-source scheduling and orchestration tools, ACS enables you to use your existing skills or draw upon a large and growing body of community expertise to deploy and manage container-based applications on Microsoft Azure.

ACS supports your choice of Kubernetes, DC/OS (powered by Apache Mesos), or Docker Swarm for orchestration.

Hopefully, this blog gives you more insight into the Azure container related offerings. If you are looking to containerize your applications, contact us to understand how we can help you make that a reality.

Leveraging opportunities in the cloud