In this blog post, we are going to cover a case study to Deploy a Container Instance in Azure using the Azure portal which we will be discussing in detail in our Microsoft Azure Solution Architect FREE Class (In this FREE class we will talk about Microsoft Azure Solution Architect Certifications i.e. [AZ-303] & [AZ-304])
In this blog post, We’ll cover :
- Overview of Docker Container and it’s instances
- Steps to Create an Azure Docker Container
- Available Azure Docker Container application with FQDN
- Steps to delete Docker Container Instance
Let’s understand first why we need it?
We use Azure container instances to run serverless Docker containers in Azure with ease & quickly. You can now deploy an application to a container instance on-demand when you don’t need a full container orchestration platform like Azure Kubernetes Service.
What Is Container (Docker)?
Containers are a software package into a logical box with everything that the application needs to run. That includes a thin layer of blog operating system, application code, runtime, system tools, system libraries, and etc. Docker containers are built off Docker images. Since images are read-only, Docker adds a read-write file system over the read-only file system of the image to create a container.
Note: Read More about the Container (Docker)
Note: Read More about the Docker Images
Azure Container Registry (ACR)
Azure Container Registry permits you to create, store, and manage container images in a private registry for all types of container deployments. You can use Azure container registries with your existing container development and deployment pipelines.
Azure Container Instances (ACI)
Azure Container Instances (ACI) is Microsoft PaaS (Platform as service) solution that offers the fastest and simplest way to run a container in Azure, without having to manage any underlying infrastructure. For container orchestration in Azure (build, manage, and deploy multiple containers) use Azure Kubernetes Service (AKS). You can deploy Azure Container Instances using Azure Portal, Azure CLI, Powershell, or ARM Template.
Note: To read more about the Azure container instance (ACI), click here
Deploy a Container instance Using the Azure portal
We’ll Perform The Following Steps:
- Steps to create an Azure Docker Container
- How to make applications available with a Fully Qualified Domain Name (FQDN).
- How to Delete your deployment
- How to browse the running application?
Step 1: Create an Azure Docker Container
Step 1: Log in to the Azure portal at https://portal.azure.com
Note: If you haven’t registered for the Microsoft Azure FREE trial account yet, then please check the Step-by-Step process to Register for Microsoft Azure Cloud Trial Account.
Step 2: On the top, you will see a search bar, type Container Instances & click on the first search result.
Step 3: For the demo, we will use default settings to deploy the public Microsoft aci-helloworld image.
Quickstart images: It contains sample Linux image packages with a small web app written in Node.js that serves a static HTML page
Azure Container Registry: You can also bring your own container images stored in Azure Container Registry, Docker Hub, or other registries.
Now under Basics fill all the required fields (take reference from below picture) also make sure to choose Quickstart images in image source and microsoft/aci-helloworld (Linux) in the image, then click on Next: Networking
Note: Resource Group is the first step before any deployment, If you don’t know how to create a resource group then check Steps to Create Azure Resource Group
Step 5: Here in the Networking section give a name to the DNS name label. The name should be unique within the Azure region where you create the container instance. Now make sure to enable Networking Type into Public because your container will be publicly reachable at <dns-name-label>.<region>.azurecontainer.io. then click on Review+Create
Note: If you receive a “DNS name label not available” error message, try a different DNS name label.
Step 6: Now you can see a new window appears which show validation passed and then click on Create
Step 7: Wait for the deployment to complete and create all required resources When deployment complete you will see a completed window where you have to click on Go to resource
So now we are done with the deployment of the isolated docker container and instance configuration.
Let’s check the availability of Docker container application using FQDN
Check Availability of Container With FQDN
Step 1: Now you are inside to your Container where you have to choose Overview, after that you can see the status of your container instance is running Status Running and also FQDN field (Take reference from below image)
Step 2: Copy the FQDN URL, paste it on your browser and click on search, now you will see a Welcome to Azure Container Instance message on your browser window
Congratulations! You have successfully deployed a publicly accessible application in Azure Container Instances.
How to View Container Logs
Step 1: You can also check logs of containers, for that click on Containers, and choose logs (Take reference from below image). The logs of a container instance are helpful during troubleshooting issues with your container or the application it runs.
Delete Docker Container Instance
Step 1: Click on Overview and on the top click on Delete and give confirmation by clicking on Yes. Now it’s done you have successfully deleted your deployment
Step 2: Select Yes when the confirmation dialog appears.
This is how you create an Azure container instance from a public Microsoft image.
Related/References
- Docker Architecture | Docker Engine Components | Container Lifecycle
- Install Docker on Windows, Ubuntu and Mac | Step by Step Guide
- Create AKS Cluster: A Complete Step-by-Step Guide
- Core Cloud Services: Azure Compute Options
- Design Azure Authentication And Authorization
- Planning And Recommendation Of The Virtual Networks
Next Task For You
This demo was taken from our Azure Solution Architect FREE class where we discuss this case study in detail, just click on the Register Now button below to register for a FREE class on Microsoft Azure Solutions Architect in which we cover Azure Solution Architect Certifications in details
The post Case Study: Deploy A Container Instance In Azure Using The Azure Portal appeared first on Cloud Training Program.