AZURE CONTAINER INSTANCES

Similar documents
Windows Azure Services - At Different Levels

Developing Microsoft Azure Solutions

[MS20533]: Implementing Microsoft Azure Infrastructure Solutions

Course Outline. Module 1: Microsoft Azure for AWS Experts Course Overview

Developing Microsoft Azure Solutions (70-532) Syllabus

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

#techsummitch

[MS10992]: Integrating On-Premises Core Infrastructure with Microsoft Azure

Implementing Microsoft Azure Infrastructure Solutions (20533)

Developing Microsoft Azure Solutions (70-532) Syllabus

Developing Microsoft Azure Solutions

20532D - Version: 1. Developing Microsoft Azure Solutions

70-532: Developing Microsoft Azure Solutions

Microsoft Azure Stack Hybrid Cloud. The Modern System Architecture

Ingress Kubernetes Tutorial

IBM Bluemix compute capabilities IBM Corporation

How to go serverless with AWS Lambda

Microsoft Azure for AWS Experts

BraindumpsQA. IT Exam Study materials / Braindumps

Developing Microsoft Azure Solutions (70-532) Syllabus

<Placeholder cover we will adjust> Microsoft Azure Stack Licensing Guide (end customers)

ITBraindumps. Latest IT Braindumps study guide

Designing MQ deployments for the cloud generation

70-532: Developing Microsoft Azure Solutions

Kuberiter White Paper. Kubernetes. Cloud Provider Comparison Chart. Lawrence Manickam Kuberiter Inc

Windows Azure Question-Answer Part II- Azure Web Apps. KRUNAL TRIVEDI MCT, MCT INDIA REGIONAL LEAD TRAINER, WRITER, SPEAKER

Important DevOps Technologies (3+2+3days) for Deployment

Hyperledger Fabric Single Member Blockchain in Azure Marketplace Christine Avanessians Senior Program Manager

1. Click on "IaaS" to advance to the Windows Azure Scenario. 2. Click to configure the "CloudNet" Virtual Network

Running MarkLogic in Containers (Both Docker and Kubernetes)

40390: Microsoft Azure for AWS Experts

Roadmap: Operating Pentaho at Scale. Jens Bleuel Senior Product Manager, Pentaho

Course Overview This five-day course will provide participants with the key knowledge required to deploy and configure Microsoft Azure Stack.

How to Keep UP Through Digital Transformation with Next-Generation App Development

2012 Microsoft Corporation. All rights reserved. Microsoft, Active Directory, Excel, Lync, Outlook, SharePoint, Silverlight, SQL Server, Windows,

YOUR APPLICATION S JOURNEY TO THE CLOUD. What s the best way to get cloud native capabilities for your existing applications?

Azure Development Course

MarkLogic Server. MarkLogic Server on Microsoft Azure Guide. MarkLogic 9 January, 2018

Course AZ-100T01-A: Manage Subscriptions and Resources

Public Cloud - Azure workshop

Actual4Dumps. Provide you with the latest actual exam dumps, and help you succeed

Michael Wells Microsoft Specialist, Dell EMC. SQL DBaaS on Microsoft Azure Stack

Note: Currently (December 3, 2017), the new managed Kubernetes service on Azure (AKS) does not yet support Windows agents.

Identifying Workloads for the Cloud

Techno Expert Solutions

Mesosphere and the Enterprise: Run Your Applications on Apache Mesos. Steve Wong Open Source Engineer {code} by Dell

Microsoft. AZ-100 EXAM Azure Infrastructure and Deployment. m/ Product: Demo. For More Information:

MQ High Availability and Disaster Recovery Implementation scenarios

Course Outline. Lesson 2, Azure Portals, describes the two current portals that are available for managing Azure subscriptions and services.

Developing Microsoft Azure Solutions: Course Agenda

Servers & Developers. Julian Nadeau Production Engineer

Real-life technical decision points in using cloud & container technology:

<Placeholder cover we will adjust> Microsoft Azure Stack Licensing Guide (Hosters and service providers)

Architecting Microsoft Azure Solutions (proposed exam 535)

BraindumpsQA. IT Exam Study materials / Braindumps

WHITE PAPER. RedHat OpenShift Container Platform. Benefits: Abstract. 1.1 Introduction

Kubernetes 101: Pods, Nodes, Containers, andclusters

Using DC/OS for Continuous Delivery

20532D: Developing Microsoft Azure Solutions

Deploying and Operating Cloud Native.NET apps

Exam : Implementing Microsoft Azure Infrastructure Solutions

Deccansoft Software Services

Building Kubernetes cloud: real world deployment examples, challenges and approaches. Alena Prokharchyk, Rancher Labs

We are ready to serve Latest IT Trends, Are you ready to learn? New Batches Info

Geant4 on Azure using Docker containers

VMware vcloud Architecture Toolkit Hybrid VMware vcloud Use Case

Microsoft Azure Course Content

Deccansoft Software Services

Azure Data Factory. Data Integration in the Cloud

Kontejneri u Azureu uz pomoć Kubernetesa što i kako? Tomislav Tipurić Partner Technology Strategist Microsoft

An Introduction to Kubernetes

Advanced Continuous Delivery Strategies for Containerized Applications Using DC/OS

Azure DevOps. Randy Pagels Intelligent Cloud Technical Specialist Great Lakes Region

20537A: Configuring and Operating a Hybrid Cloud with Microsoft Azure Stack

Data Centers and Cloud Computing. Slides courtesy of Tim Wood

Container Orchestration on Amazon Web Services. Arun

Applications orientées événements et traitement sans serveur ( serverless ) Catherine Ezvan Senior Certified IT Specialist IBM Cloud

Think Small to Scale Big

INDIGO PAAS TUTORIAL. ! Marica Antonacci RIA INFN-Bari

Docker DCA EXAM. m/ Product: Demo. For More Information: Docker Certified Associate

AZRIL203 Introduction to Azure Active Directory

Course Outline. Developing Microsoft Azure Solutions Course 20532C: 4 days Instructor Led

Containerizing GPU Applications with Docker for Scaling to the Cloud

Azure Day Application Development. Randy Pagels Sr. Developer Technology Specialist US DX Developer Tools - Central Region

Data Centers and Cloud Computing. Data Centers

Automating Elasticity. March 2018

Github/Git Primer. Tyler Hague

Configuring and Operating a Hybrid Cloud with Microsoft Azure Stack

Container-Native Storage

How to Configure Azure Route Tables (UDR) using Azure Portal and ARM

Developing Microsoft Azure Solutions

Azure Web Apps: start simple, code smart, go live!

Case Study: Aurea Software Goes Beyond the Limits of Amazon EBS to Run 200 Kubernetes Stateful Pods Per Host

Orchestrator ver

Simplified CICD with Jenkins and Git on the ZeroStack Platform

How to Put Your AF Server into a Container

Development and Operations: Continuous Delivery in Practice

Developing Enterprise Cloud Solutions with Azure

Application Container Cloud

An Overview of the Architecture of Juno: CHPC s New JupyterHub Service By Luan Truong, CHPC, University of Utah

Transcription:

AZURE CONTAINER INSTANCES -Krunal Trivedi ABSTRACT In this article, I am going to explain what are Azure Container Instances, how you can use them for hosting, when you can use them and what are its features. Along with that, I am going to provide a quick demo of how to create Azure Container Instances. Krunal Trivedi

Hosting Azure Containers: Why use Azure Container Instances? With the Docker containers you can run them locally on your development machine, but when you are ready to deploy the containers to the cloud, you are going to need a server for them to run on and Azure offers several different options for hosting the containers. 1) You could create a virtual machine in Azure and install Docker on it. Then when you want to run a container, you can simple run Docker commands to that VM and ask it to create an instance of your container image. And you could also run multiple containers on a single VM, but there is a backlash to it. You have not a virtual machine that you need to maintain and keep paying for even if it s running any containers or not. 2) Second option is to use a container orchestrator. Here you have a cluster of virtual machines usually called nodes, each of which is able to run containers and then you have an orchestrator that decides which of your nodes in your cluster should actually run the containers. By doing that, you can tell it which containers form your application and often for the purposes of resilience and scale you can ask it to run multiple instances of some of your containers and also spread them out across the cluster. The most famous orchestrators which all of you must have heard is Kubernetes and Azure makes this very easy to use with the Azure Kubernetes Service. AKS gives you a managed instance of Kubernetes that you don t need to install on your own. With this service, you have to pay for all of the nodes in your cluster and you need to pay whether they are actually running any containers or not. 3) You can also host your containers in Azure App Services if you want to host your web apps as containers. 4) Azure Batch to host containers is used if you need to work through a queue of batch jobs. 5) Azure Service Fabric is there to help you build highly distributed and scalable applications. In fact, Azure Service Fabric is an orchestrator that is designed by Microsoft itself. Krunal Trivedi

So, these are five different ways that you can get your containers running in Azure. Then how do the Azure Container Instances come into the picture? One thing that all the above five mentioned options have in common is that they assume that you have already deployed the container hosting infrastructure to Azure even before you actually run your containers. For instance, I have some container that I want to get running in Azure. Suppose I don t a VM running Docker or a Kubernetes cluster then I will have to create one of those first and then I will have to deploy my container and that is going to take some time before I am ready to run my container. Just in case even I already have a Docker VM or a Kubernetes cluster, there are chances that it has already something running on it, some that it was originally created for. So, I would not want to re-use my existing Docker VM. Imagine having a serverless way to run your containers in Azure. You can just go and tell Azure that here is my container image, run it. Then Azure would go and spin up a new container instance on a VM that it (Azure itself) controls. This is exactly what Azure Container Instances allow you to do. You really don t have to manage Docker servers or Kubernetes clusters. You just need to specify the container which you want to run and Azure will provide the compute that actually runs it, all behind the curtains. And yes, one of the greatest benefits of using this is that you only pay while your container is running. Azure Container Instances has per-second billing model. Suppose you only need some container running for 7 minutes, you create it, let it run for 7 minutes and then stop it. That is all you have to pay for. You also don t have to worry about shutting down the virtual machine that was the running the container when you are finished with it. Krunal Trivedi

Azure Container Instances: Features and When to use them Sometimes we have containerized workloads that require us to permanently run containers. There could be a website or a database in a container that needs to be continuously running. However, long-running containers are not cost effective to host on Azure Container Instance because they would end up costing twice as much as just hosting in a virtual machine. Supposing if I want to perform a continuous integration build using Docker container and a build happens every time I push code to my central repository. If my build takes 10 minutes and if I commit code twice daily on weekdays, it means I am going to do 40 builds and take total of 400 minutes. So if I want to allocate a build container that has 4 GB of RAM and 2 core then 400 minutes with ACI would only cost me around 68 approximately. But if I use a virtual machine for the same, it would cost me around 3740 approximately. And in fact, the virtual machine would sit idle for most of the time. So, despite costing more for continuously running containers, ACI can actually save a lot of money compare to virtual machines. This is very common when you are developing software to run small short-lived experiments. If you want to get a test instance of something running in the cloud, with ACI, you can quickly spin up a container, do your testing and then delete it when you are done. And here, you will have to only pay for a few hours of usage. You can also use Azure Container Instances for batch jobs where you have container image that has to process the jobs in your batch like media transcoding. Apart from all this, there are chances that your workload is sometimes highly variable. Probably the incoming traffic to a website might be extremely high or you might have to upload large amounts of data overnight. One way it is possible to scale your cluster up by adding extra virtual machines. But the other way, and the better one is to use ACI to elastically handle bursts of load without you needing to provision any type of extra hardware. You can say that Azure Container Instances might not be the right fit for every type of containerized Krunal Trivedi

workload but they can be the best option there is when you need to run shortlived containers to handle occasional workloads or high bursts of additional work. Continuously Running Websites Databases Not cost effective compared to virtual machines Occasionally Running Continuous Integration Quick Experiments Load Testing and Batch Jobs Handle Spikes in Load Features of Azure Container Instances: 1) Azure Container Instances are easy to create using scripting languages such as Azure CLI. You can add and manage them using PowerShell, C# SDK or ARM templates. 2) You can configure networking features like assigning a public IP address, add a prefix for its domain name and you can also choose what ports to expose. 3) Azure Container Instances can run either Windows or Linux containers. 4) Linux containers are faster to start up because their image sizes are much smaller compared to Windows containers. Windows containers currently have a number of limitations and do not support all the exact same features that Linux containers do but hopefully that will change soon. 5) Azure Container Instances can have restart policy allowing you to state that what should happened when the container stops. 6) Azure Container Instances also allow you to mount volumes, where Azure file share is the most common use case. Other than that, you can also mount secret volumes or even git repositories as a volume. 7) At the time of creating your container instance, you can optionally specify the command line just like you could it Docker where you can override the default initial command for a container. 8) You can specify environment variables for your containers. Krunal Trivedi

9) Last but not the least, you can also access the logs that the Azure Container Instances emit. Krunal Trivedi

Creating Azure Container Instances : Creating Container Group Step By Step Demo

There are multiple ways to create an Azure Container Instance You can create them directly in the Azure Portal You can use the PowerShell cmdlets You can use Azure Resource Manager Templates You can use Azure Command Line Interface

In this demo, I will be using the Azure CLI because it is cross platform and can be used across any platform. Also in the Azure CLI, the command syntax is very simple. We are going to deploy a website running the open source Ghost blogging platform.

Login to your Azure account and switch to your preferred subscription.

Save the resource group name and location name in their respective variables.

Create a resource group by running the following command.

Next, store the container group s name in a variable.

This command creates the container group. We have specified the resource group name, the container group name, the official Ghost image of the Ghost blogging platform which we are going to pull down from Docker hub. The default port is 2368 by Ghostand we have specified that the IP address should be public and with that we have given it a DNS label name.

It would take some time for the container to be up and running so initially, it would show Pending in the provisioning state.

To check the status, you can run the following command.

You would be able to see after some time that it shows the provisioning state as succeeded. It would give a public IP address and a fully qualified domain name as well.

If you access the domain name at port 2368, you would be able to see something like this.

So you can say that this is a very fast way to get up and running with a bit of open source software. Supposing that we wanted it to run permanently, we would have found a cheaper way of hosting it, maybe by hosting the container on Azure App Service. This is just an easy way to see how things are actually done.

Next, let us see how we can access the logs of our container.

You can simple run this command to see the container logs.

It is important to note that here in our container group, we just have a single container. Although we can have multiple containers in the same container group and can access the same through Azure CLI. We are done with this part of the demo so we need to delete the resource group now. You can also just delete the container group and that would stop the container and ensure that you are not paying anymore but it is a good practice to always delete the resource group just in case you might have created some additional resources as a part of your experiment.

You can delete the resource group by running this command with the y flag that would tell that yes, you really want to delete it.