SlideShare a Scribd company logo
1 of 30
Dockerization of Azure Platform
Niraj Bhatt
Cloud Expert & Founder CLT Azure Group
@nirajrules
http://nirajrules.wordpress.com
What is Docker?
“Docker is an open platform (also the company) which provides ability
to package and run an application in a loosely isolated environment
called a container.”
What are Containers?
A container image is a lightweight, stand-
alone, executable package of a piece of
software that includes everything needed
to run it: code, runtime, system tools,
system libraries, settings.
Multiple containers can run on the same
machine and share the OS kernel with
other containers, each running as isolated
processes in user space.
Containers take up less space than VMs
(copy-on-write COW strategy), and start
almost instantly.
Containers - Driving Factors…
Scale
Responsiveness
Operational Overheads
Consistency
Higher Density (better ROI)
Building Blocks of Containers
Building Block Linux Windows
OS Virtualization (including
process, mount, network,
user, ipc, etc.)
Namespaces Namespaces
Hardware Thresholds Control Groups Job Objects
Union File System OverlayFS, AUFS, ZFS
Virtual Disk with Symbolic
links
To directly use virtualization facilities provided by the Linux kernel
Docker has created a custom libcontainer library
Docker Architecture
Docker uses a client-server architecture
Docker client talks to the Docker daemon, which does the heavy lifting of building,
running, and distributing your Docker containers
https://hub.docker.com/_/registry/
Docker on Windows
Docker CLI Docker Daemon (Windows
Containers)
MobyLinuxVM Daemon
(Linux Containers)
S
W
I
T
C
H
https://docs.docker.com/docker-for-windows/install/
docker image pull alpine
docker container run -it alpine
docker image pull microsoft/aspnetcore:2.0-nanoserver-1709
docker container run -it microsoft/aspnetcore:2.0-nanoserver-1709 cmd
LCOW – Linux Containers on Windows
• LCOW > 17.11 release with experimental
features turned on
• Docker daemon runs as a Windows process
(same as when running Docker Windows
containers), and every time you start a
Linux container Docker launches a minimal
Hyper-V hypervisor running a VM with a
Linux kernel
• Both Linux and Windows containers can
now run side by side
docker container run -it --platform=linux alpine
Docker Image Layers
• Layer is a set of files and objects
• Multiple layers are connected via a manifest to form a image
• docker image inspect microsoft/aspnetcore
• Images layers are stored in C:ProgramDataDockerwindowsfilter
• In Linux, the path is /var/lib/docker/’storage driver’
• ‘Storage Driver’ details can be retrieved using command ‘docker system info’
• Layers are completely unaware of each other; it’s the UFS storage driver
that provides consolidated image view
Let’s Build an App, But first…
• .NET Core CLI commands
• dotnet build - command builds the project and its dependencies into a set of
binaries.If the project has third-party dependencies, such as libraries from NuGet,
they're resolved from the NuGet cache but aren't available with the project's built
output.
• dotnet publish - Packs the application and its dependencies into a folder for
deployment to a hosting system.
• dotnet run - Command provides a convenient option to run your application from the
source code with one command. If you're trying to run a framework-dependent
application DLL instead, you must use dotnet without a command.
DockerFile
• Set of instructions to create an image
• Format <INSTRUCTION> <value>
• Instructions are typed in CAPITALS while values in lower case
• Instructions are either adding content or meta data; content instructions generate new layers
• E.g. FROM microsoft/aspnetcore-build:2.0-nanoserver-1709
WORKDIR /src
COPY *.sln ./
COPY NETCoreWithDocker/NETCoreWithDocker.csproj NETCoreWithDocker/
RUN dotnet restore
COPY . .
WORKDIR /src/NETCoreWithDocker
RUN dotnet build -c Release -o /app
docker image build –t netcorewithdocker:v1 .
Multi-Stage Builds - Keeping prod images lean
FROM microsoft/aspnetcore:2.0-nanoserver-1709 AS base
WORKDIR /app
EXPOSE 80
FROM microsoft/aspnetcore-build:2.0-nanoserver-1709 AS build
WORKDIR /src
COPY *.sln ./
COPY NETCoreWithDocker/NETCoreWithDocker.csproj NETCoreWithDocker/
RUN dotnet restore
COPY . .
WORKDIR /src/NETCoreWithDocker
RUN dotnet build -c Release -o /app
FROM build AS publish
RUN dotnet publish -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "NETCoreWithDocker.dll"]>
Set Base Image and expose port 80
With Build image compile .NET Core App
Create Publish bundling dependencies and compiled binaries
Copy the published output to base image and set ENTRYPOINT
Docker Compose
version: '3'
services:
netcorewithdocker:
image: netcorewithdocker
build:
context: .
dockerfile: NETCoreWithDockerDockerfile
Tool for defining and running multi-container Docker applications
Docker-compose version
Name of Service (Container)
Build from current folder (context)
if image is not found
docker-compose up –d
docker-compose ps
docker-compose down
docker container inspect --format "{{.NetworkSettings.Networks.nat.IPAddress}}" containerId_or_containername
Get Container
IP Address
Demo
Docker on Windows with Visual Studio
CI / CD with Docker
https://success.docker.com/article/dev-pipeline
Docker Trusted Registry (DTR) lets you run and manage your own Docker image storage service,
securely on your own infrastructure behind your company firewall.
For testing you can use – Docker Hub (https://hub.docker.com/) or Azure Container Registry
docker login -u dockerId
docker image tag netcorewithdocker dockerId/your_repo
docker image push dockerId/your_repo
Azure PaaS Compute Services
Traditional PaaS Compute Services on Azure
Azure App Service
Web Workloads
Azure Batch
Scheduled Job Workloads
Service Fabric
Microservices Workloads
If not containers, how does Azure scale and isolate?
All Azure Web Apps (as well as Mobile App/Services, WebJobs and Functions) run in
a secure environment called a sandbox. Each app runs inside its own sandbox,
isolating its execution from other instances on the same machine as well as
providing an additional degree of security and privacy which would otherwise not
be available. The sandbox mechanism aims to ensure that each app running on a
machine will have a minimum guaranteed level of service; furthermore, the runtime
limits enforced by the sandbox protects apps from being adversely affected by
other resource-intensive apps which may be running on the same machine.
https://stackoverflow.com/questions/43186498/azure-app-services-isolation-and-security/43186718
Containerized Azure Services...
Web App (App Service)
• Service for hosting web
applications, REST APIs, and mobile
back ends
• App Service plan defines a set of
compute resources for a web apps
to run.
• These compute resources are
analogous to the server farm in
conventional web hosting.
Web App for Containers
• Web App for Containers will deploy your containerized application and
provision required infrastructure
• You just need to attach your container image in Docker Hub, Azure
Container Registry, or your private registry (DTR)
• GA for Linux environments on Sept 6, 2017
• https://azure.microsoft.com/en-us/blog/webapp-for-containers-overview/
• Windows Containers support is in private preview
• WebHooks are used for configuring CI / CD
Demo
Azure Web App For Containers
microsoft/azure-appservices-go-quickstart - /hello
Azure Batch
• Azure Batch creates and manages a
pool of compute nodes (virtual
machines), installs the applications you
want to run, and schedules jobs to run
on the nodes.
• No cluster or job scheduler software to
install, manage, or scale.
• Batch APIs and tools are available to
configure, manage, and monitor your
jobs.
Batch Shipyard
• Batch Shipyard is a tool to help provision and execute container-
based batch processing on Azure Batch compute pools
• You run your containers with easy-to-understand configuration files
shipyard.cmd pool / jobs Config
(folder)
credentials.yaml (azure batch and storage creds)
config.yaml (docker images)
jobs.yaml (job with task desc)
pool.yaml (Infra Nodes)
http://batch-shipyard.readthedocs.io/en/latest/05-batch-
shipyard-from-scratch-step-by-step/
Demo Batch Shipyard
Create Pool - batch-shipyard-3.5.0b1-cli-win-amd64.exe pool add --configdir config
Add Job to the Pool - batch-shipyard-3.5.0b1-cli-win-amd64.exe jobs add --configdir
config --tail stdout.txt
Service Fabric
• Distributed systems platform that
makes it easy to package, deploy, and
manage scalable and reliable
microservices
• It provides a sophisticated, lightweight
runtime to build distributed, scalable,
stateless, and stateful microservices
running in containers
• Also provides comprehensive
application management capabilities
to provision, deploy, monitor,
upgrade/patch, and delete deployed
applications
Service Fabric with Containers
No Changes to app; you can use an existing docker images to deploy them to service fabric cluster
Traditional SF Deployment
Container based SF Deployment
<ContainerHost>
<ImageName>nrcontainerregistry.azurecr.io/netcore</ImageName>
</ContainerHost>
Demo
Service Fabric with Containers
Summary
• Containers offer substantial value over traditional virtualization
including scale, density, responsiveness, consistency and operations
• Microsoft is adopting containers, specifically docker, as it’s new PaaS
runtime – across web apps, batch processing and microservices
• Vital for developers and IT pros to develop container mindset for
deploying their applications
Thank you!
Questions???

More Related Content

What's hot

ASP.NET Core and Docker
ASP.NET Core and DockerASP.NET Core and Docker
ASP.NET Core and DockerChuck Megivern
 
Dockers and containers basics
Dockers and containers basicsDockers and containers basics
Dockers and containers basicsSourabh Saxena
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)Gourav Varma
 
Dockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekDockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekwiTTyMinds1
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
Virtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management servicesVirtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management servicesabhishek chawla
 
HPC Cloud Burst Using Docker
HPC Cloud Burst Using DockerHPC Cloud Burst Using Docker
HPC Cloud Burst Using DockerIRJET Journal
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystempsconnolly
 
Docker OpenStack Cloud Foundry
Docker OpenStack Cloud FoundryDocker OpenStack Cloud Foundry
Docker OpenStack Cloud FoundryAnimesh Singh
 
Docker container a-brief_introduction_2016-01-30
Docker container a-brief_introduction_2016-01-30Docker container a-brief_introduction_2016-01-30
Docker container a-brief_introduction_2016-01-30Khelender Sasan
 
The ABC of Docker: The Absolute Best Compendium of Docker
The ABC of Docker: The Absolute Best Compendium of DockerThe ABC of Docker: The Absolute Best Compendium of Docker
The ABC of Docker: The Absolute Best Compendium of DockerAniekan Akpaffiong
 
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...Edureka!
 
Discussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machinesDiscussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machinesSteven Grzbielok
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paasrajdeep
 
Containers #101 Meetup: Containers and OpenStack
Containers #101 Meetup: Containers and OpenStackContainers #101 Meetup: Containers and OpenStack
Containers #101 Meetup: Containers and OpenStackCodefresh
 

What's hot (20)

ASP.NET Core and Docker
ASP.NET Core and DockerASP.NET Core and Docker
ASP.NET Core and Docker
 
Docker Container Introduction
Docker Container IntroductionDocker Container Introduction
Docker Container Introduction
 
Dockers and containers basics
Dockers and containers basicsDockers and containers basics
Dockers and containers basics
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Docker In Brief
Docker In BriefDocker In Brief
Docker In Brief
 
Dockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekDockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to Geek
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker
DockerDocker
Docker
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Virtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management servicesVirtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management services
 
HPC Cloud Burst Using Docker
HPC Cloud Burst Using DockerHPC Cloud Burst Using Docker
HPC Cloud Burst Using Docker
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
 
Docker OpenStack Cloud Foundry
Docker OpenStack Cloud FoundryDocker OpenStack Cloud Foundry
Docker OpenStack Cloud Foundry
 
Docker container a-brief_introduction_2016-01-30
Docker container a-brief_introduction_2016-01-30Docker container a-brief_introduction_2016-01-30
Docker container a-brief_introduction_2016-01-30
 
The ABC of Docker: The Absolute Best Compendium of Docker
The ABC of Docker: The Absolute Best Compendium of DockerThe ABC of Docker: The Absolute Best Compendium of Docker
The ABC of Docker: The Absolute Best Compendium of Docker
 
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
 
Discussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machinesDiscussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machines
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paas
 
Containers #101 Meetup: Containers and OpenStack
Containers #101 Meetup: Containers and OpenStackContainers #101 Meetup: Containers and OpenStack
Containers #101 Meetup: Containers and OpenStack
 

Similar to Dockerization of Azure Platform

Weave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapWeave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapPatrick Chanezon
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deploymentjavaonfly
 
Docker Application to Scientific Computing
Docker Application to Scientific ComputingDocker Application to Scientific Computing
Docker Application to Scientific ComputingPeter Bryzgalov
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetesBen Hall
 
Container on azure
Container on azureContainer on azure
Container on azureVishwas N
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Arun prasath
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetesDongwon Kim
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and MicroserviceSamuel Chow
 
Introduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUGIntroduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUGAjeet Singh Raina
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Patrick Chanezon
 
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud ServicesGIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud ServicesPatrick Chanezon
 
Los contenedores en el mundo Microsoft #ReConnect2016
Los contenedores en el mundo Microsoft #ReConnect2016Los contenedores en el mundo Microsoft #ReConnect2016
Los contenedores en el mundo Microsoft #ReConnect2016Roberto Sanz Ciriano
 

Similar to Dockerization of Azure Platform (20)

Weave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapWeave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 Recap
 
What is Docker?
What is Docker?What is Docker?
What is Docker?
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
 
Docker slides
Docker slidesDocker slides
Docker slides
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Docker
DockerDocker
Docker
 
Docker Application to Scientific Computing
Docker Application to Scientific ComputingDocker Application to Scientific Computing
Docker Application to Scientific Computing
 
Docker
DockerDocker
Docker
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
Container on azure
Container on azureContainer on azure
Container on azure
 
Docker intro
Docker introDocker intro
Docker intro
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Axigen on docker
Axigen on dockerAxigen on docker
Axigen on docker
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and Microservice
 
Introduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUGIntroduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUG
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
 
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud ServicesGIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
 
Los contenedores en el mundo Microsoft #ReConnect2016
Los contenedores en el mundo Microsoft #ReConnect2016Los contenedores en el mundo Microsoft #ReConnect2016
Los contenedores en el mundo Microsoft #ReConnect2016
 

Recently uploaded

MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 

Dockerization of Azure Platform

  • 1. Dockerization of Azure Platform Niraj Bhatt Cloud Expert & Founder CLT Azure Group @nirajrules http://nirajrules.wordpress.com
  • 2. What is Docker? “Docker is an open platform (also the company) which provides ability to package and run an application in a loosely isolated environment called a container.”
  • 3. What are Containers? A container image is a lightweight, stand- alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings. Multiple containers can run on the same machine and share the OS kernel with other containers, each running as isolated processes in user space. Containers take up less space than VMs (copy-on-write COW strategy), and start almost instantly.
  • 4. Containers - Driving Factors… Scale Responsiveness Operational Overheads Consistency Higher Density (better ROI)
  • 5. Building Blocks of Containers Building Block Linux Windows OS Virtualization (including process, mount, network, user, ipc, etc.) Namespaces Namespaces Hardware Thresholds Control Groups Job Objects Union File System OverlayFS, AUFS, ZFS Virtual Disk with Symbolic links To directly use virtualization facilities provided by the Linux kernel Docker has created a custom libcontainer library
  • 6. Docker Architecture Docker uses a client-server architecture Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers https://hub.docker.com/_/registry/
  • 7. Docker on Windows Docker CLI Docker Daemon (Windows Containers) MobyLinuxVM Daemon (Linux Containers) S W I T C H https://docs.docker.com/docker-for-windows/install/ docker image pull alpine docker container run -it alpine docker image pull microsoft/aspnetcore:2.0-nanoserver-1709 docker container run -it microsoft/aspnetcore:2.0-nanoserver-1709 cmd
  • 8. LCOW – Linux Containers on Windows • LCOW > 17.11 release with experimental features turned on • Docker daemon runs as a Windows process (same as when running Docker Windows containers), and every time you start a Linux container Docker launches a minimal Hyper-V hypervisor running a VM with a Linux kernel • Both Linux and Windows containers can now run side by side docker container run -it --platform=linux alpine
  • 9. Docker Image Layers • Layer is a set of files and objects • Multiple layers are connected via a manifest to form a image • docker image inspect microsoft/aspnetcore • Images layers are stored in C:ProgramDataDockerwindowsfilter • In Linux, the path is /var/lib/docker/’storage driver’ • ‘Storage Driver’ details can be retrieved using command ‘docker system info’ • Layers are completely unaware of each other; it’s the UFS storage driver that provides consolidated image view
  • 10. Let’s Build an App, But first… • .NET Core CLI commands • dotnet build - command builds the project and its dependencies into a set of binaries.If the project has third-party dependencies, such as libraries from NuGet, they're resolved from the NuGet cache but aren't available with the project's built output. • dotnet publish - Packs the application and its dependencies into a folder for deployment to a hosting system. • dotnet run - Command provides a convenient option to run your application from the source code with one command. If you're trying to run a framework-dependent application DLL instead, you must use dotnet without a command.
  • 11. DockerFile • Set of instructions to create an image • Format <INSTRUCTION> <value> • Instructions are typed in CAPITALS while values in lower case • Instructions are either adding content or meta data; content instructions generate new layers • E.g. FROM microsoft/aspnetcore-build:2.0-nanoserver-1709 WORKDIR /src COPY *.sln ./ COPY NETCoreWithDocker/NETCoreWithDocker.csproj NETCoreWithDocker/ RUN dotnet restore COPY . . WORKDIR /src/NETCoreWithDocker RUN dotnet build -c Release -o /app docker image build –t netcorewithdocker:v1 .
  • 12. Multi-Stage Builds - Keeping prod images lean FROM microsoft/aspnetcore:2.0-nanoserver-1709 AS base WORKDIR /app EXPOSE 80 FROM microsoft/aspnetcore-build:2.0-nanoserver-1709 AS build WORKDIR /src COPY *.sln ./ COPY NETCoreWithDocker/NETCoreWithDocker.csproj NETCoreWithDocker/ RUN dotnet restore COPY . . WORKDIR /src/NETCoreWithDocker RUN dotnet build -c Release -o /app FROM build AS publish RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "NETCoreWithDocker.dll"]> Set Base Image and expose port 80 With Build image compile .NET Core App Create Publish bundling dependencies and compiled binaries Copy the published output to base image and set ENTRYPOINT
  • 13. Docker Compose version: '3' services: netcorewithdocker: image: netcorewithdocker build: context: . dockerfile: NETCoreWithDockerDockerfile Tool for defining and running multi-container Docker applications Docker-compose version Name of Service (Container) Build from current folder (context) if image is not found docker-compose up –d docker-compose ps docker-compose down docker container inspect --format "{{.NetworkSettings.Networks.nat.IPAddress}}" containerId_or_containername Get Container IP Address
  • 14. Demo Docker on Windows with Visual Studio
  • 15. CI / CD with Docker https://success.docker.com/article/dev-pipeline Docker Trusted Registry (DTR) lets you run and manage your own Docker image storage service, securely on your own infrastructure behind your company firewall. For testing you can use – Docker Hub (https://hub.docker.com/) or Azure Container Registry docker login -u dockerId docker image tag netcorewithdocker dockerId/your_repo docker image push dockerId/your_repo
  • 16. Azure PaaS Compute Services
  • 17. Traditional PaaS Compute Services on Azure Azure App Service Web Workloads Azure Batch Scheduled Job Workloads Service Fabric Microservices Workloads
  • 18. If not containers, how does Azure scale and isolate? All Azure Web Apps (as well as Mobile App/Services, WebJobs and Functions) run in a secure environment called a sandbox. Each app runs inside its own sandbox, isolating its execution from other instances on the same machine as well as providing an additional degree of security and privacy which would otherwise not be available. The sandbox mechanism aims to ensure that each app running on a machine will have a minimum guaranteed level of service; furthermore, the runtime limits enforced by the sandbox protects apps from being adversely affected by other resource-intensive apps which may be running on the same machine. https://stackoverflow.com/questions/43186498/azure-app-services-isolation-and-security/43186718
  • 20. Web App (App Service) • Service for hosting web applications, REST APIs, and mobile back ends • App Service plan defines a set of compute resources for a web apps to run. • These compute resources are analogous to the server farm in conventional web hosting.
  • 21. Web App for Containers • Web App for Containers will deploy your containerized application and provision required infrastructure • You just need to attach your container image in Docker Hub, Azure Container Registry, or your private registry (DTR) • GA for Linux environments on Sept 6, 2017 • https://azure.microsoft.com/en-us/blog/webapp-for-containers-overview/ • Windows Containers support is in private preview • WebHooks are used for configuring CI / CD
  • 22. Demo Azure Web App For Containers microsoft/azure-appservices-go-quickstart - /hello
  • 23. Azure Batch • Azure Batch creates and manages a pool of compute nodes (virtual machines), installs the applications you want to run, and schedules jobs to run on the nodes. • No cluster or job scheduler software to install, manage, or scale. • Batch APIs and tools are available to configure, manage, and monitor your jobs.
  • 24. Batch Shipyard • Batch Shipyard is a tool to help provision and execute container- based batch processing on Azure Batch compute pools • You run your containers with easy-to-understand configuration files shipyard.cmd pool / jobs Config (folder) credentials.yaml (azure batch and storage creds) config.yaml (docker images) jobs.yaml (job with task desc) pool.yaml (Infra Nodes) http://batch-shipyard.readthedocs.io/en/latest/05-batch- shipyard-from-scratch-step-by-step/
  • 25. Demo Batch Shipyard Create Pool - batch-shipyard-3.5.0b1-cli-win-amd64.exe pool add --configdir config Add Job to the Pool - batch-shipyard-3.5.0b1-cli-win-amd64.exe jobs add --configdir config --tail stdout.txt
  • 26. Service Fabric • Distributed systems platform that makes it easy to package, deploy, and manage scalable and reliable microservices • It provides a sophisticated, lightweight runtime to build distributed, scalable, stateless, and stateful microservices running in containers • Also provides comprehensive application management capabilities to provision, deploy, monitor, upgrade/patch, and delete deployed applications
  • 27. Service Fabric with Containers No Changes to app; you can use an existing docker images to deploy them to service fabric cluster Traditional SF Deployment Container based SF Deployment <ContainerHost> <ImageName>nrcontainerregistry.azurecr.io/netcore</ImageName> </ContainerHost>
  • 29. Summary • Containers offer substantial value over traditional virtualization including scale, density, responsiveness, consistency and operations • Microsoft is adopting containers, specifically docker, as it’s new PaaS runtime – across web apps, batch processing and microservices • Vital for developers and IT pros to develop container mindset for deploying their applications

Editor's Notes

  1. C:\Users\niraj\.docker – config.sh for client and related configurations C:\Users\Public\Documents\Hyper-V\Virtual hard disks – MobyLinuxVHDs C:\ProgramData\Docker\windowsfilter – Local Image Store
  2. MobyLinuxVM is based on LinuxKit - a toolkit for building custom minimal, immutable Linux distributions. Docker assigns default container names for every run - https://frightanic.com/computers/docker-default-container-names/
  3. Layers are identified by a digest, which takes the form algorithm:hex Directory for storing the layer is named after a randomly generated 'cache ID’
  4. Delete all containers in docker - FOR /f "tokens=*" %i IN ('docker ps -a -q') DO docker rm %i Delete all dangling images in docker - FOR /f "tokens=*" %i IN ('docker images -q -f "dangling=true"') DO docker rmi %i
  5. Docker Universal Control Plane (UCP) is the enterprise-grade cluster management solution from Docker. You install it on-premises or in your virtual private cloud, and it helps you manage your Docker cluster and applications through a single interface. - https://docs.docker.com/ee/ucp/