SlideShare a Scribd company logo
1 of 9
Download to read offline
Windows Server Containers
Vishwanath Srikanth
Service Engineer 2, R&P, MPSIT
https://in.linkedin.com/in/vishsrik
Vishwanathsrikanth.wordpress.com
Physical Servers ContainersVirtual Servers
• Space/Scaling Constraints
• Higher Provisioning Time
• Over/Under Utilization
• Maintenance
Hypervisor/Hosted
Hypervisor
• Scalable, Lesser Provisioning
Time, Scale up/down easy, Less
Maintenance.
• Bare Metal - VMware, Hypervisor,
Xen
• Hosted – Virtual PC, Virtual Box
etc.1965 & Before
1965 & After
Bare Metal or Traditional OSBare Metal/Traditional OS
Hypervisor or Hosted Hypervisor
(Container Engtine)
Guest Operating System
(Optional)
Guest Operating System
Containers
2013 & Future
• 2013: Docker Introduced
Containers, followed by MS in
WS2016 (Aug-2015)
• Easily Shippable
• Complete Isolation
• Very less turn up times
• Programmable
Virtualization Trends
www.docker.com
• An Open Source framework built by Solomon Hykes and team @dotCloud to build,
manage and deploy containers on Linux.
• Written using Go (Google) Programming Language
• Standardized in collaboration with Amazon, Cisco, Google, VM Ware and Microsoft and
works consistently across all major Linux Brands. OCI – Open Container Initiative
• Docker is built using LXC, namespaces, CGroups features on Linux.
• Open Source, 2013: https://www.docker.com/contribute, 400 Million downloads so far.
• Steps to deploy a Docker container.
• Developers build application and package as Docker containers. These containers are published as images to
Docker Hub or Private Image repository or Host Machine.
• Containers are deployed on Linux Machine with Docker Engine Installed using any image repository. The images
in repositories are inherently discoverable.
• The Docker Engine on Host Machine can be invoked remotely via Docker CLI.
• Docker enabled Linux Machines are available on Azure Image Gallery. VS can be used to
perform 1-Click deployment to Docker machines.
• Docker also gels very well with Machine configuration tools like Puppet, Chef, Vagrant
and Ansible.
• Cluster Management Tools like Google Kubernetes and Mesosphere can be used to
manage containers across hosts.
• Docker 1.9 major milestone with Logging, Networking, Storage, Docker Swarm
C C C
Docker Engine
(Linux)
Docker Hub/Private Image Repository
C
Build Applications
Package using Docker CLI
Publish
Deploy
Windows Server Containers
• Docker Engine for Windows Server available on Windows
Server 2016 CTP 3 (Container Role) – Aug 2015.
• Create, Build and Manage Containers using PowerShell or
Docker (CLI) – Platform agnostic Docker Commands.
• Visual Studio tools for Docker available as an Extension to VS
2015 enables on click deployment to Docker enabled
Windows/Linux Machines.
• Docker Engine re-written for Windows Open Sourced
(libcontainer) is also open sourced – First Time Ever !!
• Docker Engine on Windows uses namespaces isolation and
resource governance for container isolation.
• Windows Server Container Preview available on Azure Today
!! (No GUI)
Use Cases for Containers  Micro services: Containerized app can be
converted to Images, multiple containers can be
deployed using image within seconds. Apt for
light-weight portable apps like micro services.
 Higher Utilization: Since a VM can be used to
host Multiple applications in isolated containers.
 Easy to Scale: Container Images can used to
scale the application to N instances within
seconds.
 Easy Procurement: Since the kernel is already
heated up, application deployment does not have
to wait for full OS boot times.
 Reusability: One can easily deploy a container
install custom applications (Redis, MySQL etc.)
from Docker Host, customize the configuration
and image it out and use many times.
Getting Started
• Create a HOST Machine
• Create a “Windows Server Container Preview”
machine from Azure Image Gallery. (Recommended)
• Create a “Windows Server 2016 CTP3” login and
enable Container Role.
• Preparing Dev Machine
• Download Docker Tools for VS 2015 from here.
• Quick Start Guides:
https://msdn.microsoft.com/virtualization/windowscontai
ners/containers_welcome
Pre-built
Windows
Server Core
Image
Create
Container
Customize
Container
Create
Customized
Image
Create N
Containers
using
Customized
Image
Creating NGINX container for web hosting
## Get VM Switch Name
Get-VMSwitch
## Create Container
$containername = "webcontainer"
$container = New-Container -Name $containername -
ContainerImageName WindowsServerCore -SwitchName "Virtual
Switch"
Start-Container -Name $containername
# Create container from custom image
$webservercontainer = New-Container -Name nginxwebserver -
ContainerImageName nginxwindows -SwitchName "Virtual Switch"
Start-Container $webservercontainer
Enter-PSSession -ContainerId $webservercontainer.ContainerId -
RunAsAdministrator
## Use Container
cd c:nginx-1.9.3
start nginx
## Configure Container
Enter-PSSession -ContainerId (Get-Container -Name
$containername).ContainerId -RunAsAdministrator
wget -uri 'http://nginx.org/download/nginx-1.9.3.zip' -OutFile
"c:nginx-1.9.3.zip"
Expand-Archive -Path C:nginx-1.9.3.zip -DestinationPath c: -
Force
Exit
## Build Image
Stop-Container -Name $containername
$webserverimage = New-ContainerImage -Container (Get-Container -
Name $containername) -Publisher srikanth -Name nginxwindows -
Version 1.0
Get-ContainerImage
Creating IIS Container for Web Hosting
## Create Container
$containername = "iiscontainer"
$container = New-Container -Name $containername -
ContainerImageName WindowsServerCore -SwitchName
"Virtual Switch"
Start-Container -Name $containername
New-Container -Name iiscontainer -ContainerImageName
iiswebserverimage -SwitchName "Virtual Switch"
Invoke-Command -ContainerName iiscontainer {ipconfig}
if (!(Get-NetNatStaticMapping | where {$_.ExternalPort -eq 80})) {
Add-NetNatStaticMapping -NatName "ContainerNat" -Protocol TCP -
ExternalIPAddress 0.0.0.0 -InternalIPAddress 172.16.0.2 -InternalPort
80 -ExternalPort 80
}
## Configure Container
Enter-PSSession -ContainerId (Get-Container -Name
$containername).ContainerId -RunAsAdministrator
Install-WindowsFeature web-server
Exit
##prep image
Stop-Container -Name $containername
$webserverimage = New-ContainerImage -Container (Get-Container -
Name $containername) -Publisher srikanth -Name iiswebserverimage -
Version 1.0
Get-ContainerImage
Limitations
 Docker Containers created on Linux cannot be ported to windows.
 Docker Containers cannot be managed using PS library for Windows.
 ASP.NET 4.5 and below does not run on WSC yet, only option is ASP.NET 5.0.
 Not all Docker commands work today.
 If the OS needs patchingupgrade, the changesupgrade might ripple into containers as well
• Do not share kernel with other containers
• More Isolation thus better Security with Hyper-V Containers
• They can be managed using Docker CLI/PowerShell.
• Not available on Azure today, needs on premise container host.
• MS working on Nano servers 1/20th size of previous servers specially designed for
containers/Micro Services
Hyper-V Containers

More Related Content

What's hot

Docker Fundamentals
Docker FundamentalsDocker Fundamentals
Docker FundamentalsMien Dinh
 
Docker introduction
Docker introductionDocker introduction
Docker introductionAnssi Soinu
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Herofazalraja
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerChris Taylor
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerLuong Vo
 
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
 
Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginnersJuneyoung Oh
 
Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...
Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...
Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...Edureka!
 
Easy Docker on Microsoft Azure
Easy Docker on Microsoft AzureEasy Docker on Microsoft Azure
Easy Docker on Microsoft AzureDocker, Inc.
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
Docker and kubernetes_introduction
Docker and kubernetes_introductionDocker and kubernetes_introduction
Docker and kubernetes_introductionJason Hu
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )Imo Inyang
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
Docker and containers : Disrupting the virtual machine(VM)
Docker and containers : Disrupting the virtual machine(VM)Docker and containers : Disrupting the virtual machine(VM)
Docker and containers : Disrupting the virtual machine(VM)Rama Krishna B
 
Step by step installation domino on docker
Step by step installation domino on dockerStep by step installation domino on docker
Step by step installation domino on dockerRoberto Boccadoro
 
Docker Basic Presentation
Docker Basic PresentationDocker Basic Presentation
Docker Basic PresentationAman Chhabra
 
(APP303) Lightning Fast Deploys with Docker Containers and AWS | AWS re:Inven...
(APP303) Lightning Fast Deploys with Docker Containers and AWS | AWS re:Inven...(APP303) Lightning Fast Deploys with Docker Containers and AWS | AWS re:Inven...
(APP303) Lightning Fast Deploys with Docker Containers and AWS | AWS re:Inven...Amazon Web Services
 

What's hot (20)

Docker Fundamentals
Docker FundamentalsDocker Fundamentals
Docker Fundamentals
 
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 introduction
Docker introductionDocker introduction
Docker introduction
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and Docker
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
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
 
Virtual Container - Docker
Virtual Container - Docker Virtual Container - Docker
Virtual Container - Docker
 
Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginners
 
Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...
Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...
Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...
 
Easy Docker on Microsoft Azure
Easy Docker on Microsoft AzureEasy Docker on Microsoft Azure
Easy Docker on Microsoft Azure
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker and kubernetes_introduction
Docker and kubernetes_introductionDocker and kubernetes_introduction
Docker and kubernetes_introduction
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker and containers : Disrupting the virtual machine(VM)
Docker and containers : Disrupting the virtual machine(VM)Docker and containers : Disrupting the virtual machine(VM)
Docker and containers : Disrupting the virtual machine(VM)
 
Step by step installation domino on docker
Step by step installation domino on dockerStep by step installation domino on docker
Step by step installation domino on docker
 
Docker Basic Presentation
Docker Basic PresentationDocker Basic Presentation
Docker Basic Presentation
 
(APP303) Lightning Fast Deploys with Docker Containers and AWS | AWS re:Inven...
(APP303) Lightning Fast Deploys with Docker Containers and AWS | AWS re:Inven...(APP303) Lightning Fast Deploys with Docker Containers and AWS | AWS re:Inven...
(APP303) Lightning Fast Deploys with Docker Containers and AWS | AWS re:Inven...
 

Viewers also liked

[Hội thảo 24/10] Kinh doanh ít vốn trên Facebook và các thủ thuật
[Hội thảo 24/10] Kinh doanh ít vốn trên Facebook và các thủ thuật[Hội thảo 24/10] Kinh doanh ít vốn trên Facebook và các thủ thuật
[Hội thảo 24/10] Kinh doanh ít vốn trên Facebook và các thủ thuậtHaravan Official
 
Enterprise - A Customer Or A Partner
Enterprise -  A Customer Or A PartnerEnterprise -  A Customer Or A Partner
Enterprise - A Customer Or A PartnerComarch
 
Care Analytics tablet based assessments for patient satisfaction
Care Analytics tablet based assessments for patient satisfactionCare Analytics tablet based assessments for patient satisfaction
Care Analytics tablet based assessments for patient satisfactionCare Analytics
 
[Workshop 7/11] Tăng tỉ lệ chuyển đổi đơn hàng thành traffic
[Workshop 7/11]   Tăng tỉ lệ chuyển đổi đơn hàng thành traffic[Workshop 7/11]   Tăng tỉ lệ chuyển đổi đơn hàng thành traffic
[Workshop 7/11] Tăng tỉ lệ chuyển đổi đơn hàng thành trafficHaravan Official
 
Building Your First WOW!! Symbian Application
Building Your First WOW!! Symbian ApplicationBuilding Your First WOW!! Symbian Application
Building Your First WOW!! Symbian ApplicationComarch
 
Acta de constitución
Acta de constituciónActa de constitución
Acta de constituciónjhonny chile
 
The Hitchhiker’s Guide to StackOverflow
The Hitchhiker’s Guide to StackOverflowThe Hitchhiker’s Guide to StackOverflow
The Hitchhiker’s Guide to StackOverflowSafeDK
 
Customer is king....or are they
Customer is king....or are theyCustomer is king....or are they
Customer is king....or are theyetimes2.com
 
Las comunidades virtuales
Las comunidades virtualesLas comunidades virtuales
Las comunidades virtualesmariametzeri
 
Hoạch định ngân sách Marketing 2016
Hoạch định ngân sách Marketing 2016Hoạch định ngân sách Marketing 2016
Hoạch định ngân sách Marketing 2016camnangmarketing
 
Làm thế nào để hợp nhất quản lý kinh doanh từ online đến offline
Làm thế nào để hợp nhất quản lý kinh doanh từ online đến offlineLàm thế nào để hợp nhất quản lý kinh doanh từ online đến offline
Làm thế nào để hợp nhất quản lý kinh doanh từ online đến offlineHaravan Official
 

Viewers also liked (18)

[Hội thảo 24/10] Kinh doanh ít vốn trên Facebook và các thủ thuật
[Hội thảo 24/10] Kinh doanh ít vốn trên Facebook và các thủ thuật[Hội thảo 24/10] Kinh doanh ít vốn trên Facebook và các thủ thuật
[Hội thảo 24/10] Kinh doanh ít vốn trên Facebook và các thủ thuật
 
Nexus of Forces
Nexus of ForcesNexus of Forces
Nexus of Forces
 
Enterprise - A Customer Or A Partner
Enterprise -  A Customer Or A PartnerEnterprise -  A Customer Or A Partner
Enterprise - A Customer Or A Partner
 
Presentation1
Presentation1Presentation1
Presentation1
 
AMM.813-814.1170
AMM.813-814.1170AMM.813-814.1170
AMM.813-814.1170
 
Care Analytics tablet based assessments for patient satisfaction
Care Analytics tablet based assessments for patient satisfactionCare Analytics tablet based assessments for patient satisfaction
Care Analytics tablet based assessments for patient satisfaction
 
[Workshop 7/11] Tăng tỉ lệ chuyển đổi đơn hàng thành traffic
[Workshop 7/11]   Tăng tỉ lệ chuyển đổi đơn hàng thành traffic[Workshop 7/11]   Tăng tỉ lệ chuyển đổi đơn hàng thành traffic
[Workshop 7/11] Tăng tỉ lệ chuyển đổi đơn hàng thành traffic
 
Building Your First WOW!! Symbian Application
Building Your First WOW!! Symbian ApplicationBuilding Your First WOW!! Symbian Application
Building Your First WOW!! Symbian Application
 
Acta de constitución
Acta de constituciónActa de constitución
Acta de constitución
 
Wiki Con ..
Wiki Con ..Wiki Con ..
Wiki Con ..
 
Project
ProjectProject
Project
 
The Hitchhiker’s Guide to StackOverflow
The Hitchhiker’s Guide to StackOverflowThe Hitchhiker’s Guide to StackOverflow
The Hitchhiker’s Guide to StackOverflow
 
Customer is king....or are they
Customer is king....or are theyCustomer is king....or are they
Customer is king....or are they
 
Las comunidades virtuales
Las comunidades virtualesLas comunidades virtuales
Las comunidades virtuales
 
Hoạch định ngân sách Marketing 2016
Hoạch định ngân sách Marketing 2016Hoạch định ngân sách Marketing 2016
Hoạch định ngân sách Marketing 2016
 
Làm thế nào để hợp nhất quản lý kinh doanh từ online đến offline
Làm thế nào để hợp nhất quản lý kinh doanh từ online đến offlineLàm thế nào để hợp nhất quản lý kinh doanh từ online đến offline
Làm thế nào để hợp nhất quản lý kinh doanh từ online đến offline
 
Stellantrieb de/en
Stellantrieb de/enStellantrieb de/en
Stellantrieb de/en
 
Leading Successfully Across Cultures
Leading Successfully Across CulturesLeading Successfully Across Cultures
Leading Successfully Across Cultures
 

Similar to Windows Server Containers

Windows server containers
Windows server containersWindows server containers
Windows server containersSri Kanth
 
Windows server containers
Windows server containersWindows server containers
Windows server containersSri Kanth
 
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...Ido Flatow
 
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep DiveDocker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep DiveDocker, Inc.
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deploymentjavaonfly
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosMike Martin
 
Container and Cloud Native Application: What is VMware doing in this space? -...
Container and Cloud Native Application: What is VMware doing in this space? -...Container and Cloud Native Application: What is VMware doing in this space? -...
Container and Cloud Native Application: What is VMware doing in this space? -...gguglie
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerAditya Konarde
 
ContainerDays NYC 2016: "Containers in Azure: Understanding the Microsoft Con...
ContainerDays NYC 2016: "Containers in Azure: Understanding the Microsoft Con...ContainerDays NYC 2016: "Containers in Azure: Understanding the Microsoft Con...
ContainerDays NYC 2016: "Containers in Azure: Understanding the Microsoft Con...DynamicInfraDays
 
An Introduction To Docker
An Introduction To DockerAn Introduction To Docker
An Introduction To DockerJames fraser
 
Introduction to Containers & Diving a little deeper into the benefits of Con...
 Introduction to Containers & Diving a little deeper into the benefits of Con... Introduction to Containers & Diving a little deeper into the benefits of Con...
Introduction to Containers & Diving a little deeper into the benefits of Con...Synergetics Learning and Cloud Consulting
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetesDr Ganesh Iyer
 
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호Amazon Web Services Korea
 
Modernizing existing .NET applications with Windows Containers and Azure cloud
Modernizing existing .NET applications with Windows Containers and Azure cloudModernizing existing .NET applications with Windows Containers and Azure cloud
Modernizing existing .NET applications with Windows Containers and Azure cloudMicrosoft Tech Community
 
vSphere Integrated Containers 101 and End-User Workflow
vSphere Integrated Containers 101 and End-User WorkflowvSphere Integrated Containers 101 and End-User Workflow
vSphere Integrated Containers 101 and End-User WorkflowSimone Morellato
 
Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Primend
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12dotCloud
 
Application Deployment on Openstack
Application Deployment on OpenstackApplication Deployment on Openstack
Application Deployment on OpenstackDocker, Inc.
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemVan Phuc
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and MicroserviceSamuel Chow
 

Similar to Windows Server Containers (20)

Windows server containers
Windows server containersWindows server containers
Windows server containers
 
Windows server containers
Windows server containersWindows server containers
Windows server containers
 
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
 
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep DiveDocker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err Microcosmos
 
Container and Cloud Native Application: What is VMware doing in this space? -...
Container and Cloud Native Application: What is VMware doing in this space? -...Container and Cloud Native Application: What is VMware doing in this space? -...
Container and Cloud Native Application: What is VMware doing in this space? -...
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
ContainerDays NYC 2016: "Containers in Azure: Understanding the Microsoft Con...
ContainerDays NYC 2016: "Containers in Azure: Understanding the Microsoft Con...ContainerDays NYC 2016: "Containers in Azure: Understanding the Microsoft Con...
ContainerDays NYC 2016: "Containers in Azure: Understanding the Microsoft Con...
 
An Introduction To Docker
An Introduction To DockerAn Introduction To Docker
An Introduction To Docker
 
Introduction to Containers & Diving a little deeper into the benefits of Con...
 Introduction to Containers & Diving a little deeper into the benefits of Con... Introduction to Containers & Diving a little deeper into the benefits of Con...
Introduction to Containers & Diving a little deeper into the benefits of Con...
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetes
 
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
 
Modernizing existing .NET applications with Windows Containers and Azure cloud
Modernizing existing .NET applications with Windows Containers and Azure cloudModernizing existing .NET applications with Windows Containers and Azure cloud
Modernizing existing .NET applications with Windows Containers and Azure cloud
 
vSphere Integrated Containers 101 and End-User Workflow
vSphere Integrated Containers 101 and End-User WorkflowvSphere Integrated Containers 101 and End-User Workflow
vSphere Integrated Containers 101 and End-User Workflow
 
Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
 
Application Deployment on Openstack
Application Deployment on OpenstackApplication Deployment on Openstack
Application Deployment on Openstack
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and Microservice
 

Windows Server Containers

  • 1. Windows Server Containers Vishwanath Srikanth Service Engineer 2, R&P, MPSIT https://in.linkedin.com/in/vishsrik Vishwanathsrikanth.wordpress.com
  • 2. Physical Servers ContainersVirtual Servers • Space/Scaling Constraints • Higher Provisioning Time • Over/Under Utilization • Maintenance Hypervisor/Hosted Hypervisor • Scalable, Lesser Provisioning Time, Scale up/down easy, Less Maintenance. • Bare Metal - VMware, Hypervisor, Xen • Hosted – Virtual PC, Virtual Box etc.1965 & Before 1965 & After Bare Metal or Traditional OSBare Metal/Traditional OS Hypervisor or Hosted Hypervisor (Container Engtine) Guest Operating System (Optional) Guest Operating System Containers 2013 & Future • 2013: Docker Introduced Containers, followed by MS in WS2016 (Aug-2015) • Easily Shippable • Complete Isolation • Very less turn up times • Programmable Virtualization Trends
  • 3. www.docker.com • An Open Source framework built by Solomon Hykes and team @dotCloud to build, manage and deploy containers on Linux. • Written using Go (Google) Programming Language • Standardized in collaboration with Amazon, Cisco, Google, VM Ware and Microsoft and works consistently across all major Linux Brands. OCI – Open Container Initiative • Docker is built using LXC, namespaces, CGroups features on Linux. • Open Source, 2013: https://www.docker.com/contribute, 400 Million downloads so far. • Steps to deploy a Docker container. • Developers build application and package as Docker containers. These containers are published as images to Docker Hub or Private Image repository or Host Machine. • Containers are deployed on Linux Machine with Docker Engine Installed using any image repository. The images in repositories are inherently discoverable. • The Docker Engine on Host Machine can be invoked remotely via Docker CLI. • Docker enabled Linux Machines are available on Azure Image Gallery. VS can be used to perform 1-Click deployment to Docker machines. • Docker also gels very well with Machine configuration tools like Puppet, Chef, Vagrant and Ansible. • Cluster Management Tools like Google Kubernetes and Mesosphere can be used to manage containers across hosts. • Docker 1.9 major milestone with Logging, Networking, Storage, Docker Swarm C C C Docker Engine (Linux) Docker Hub/Private Image Repository C Build Applications Package using Docker CLI Publish Deploy
  • 4. Windows Server Containers • Docker Engine for Windows Server available on Windows Server 2016 CTP 3 (Container Role) – Aug 2015. • Create, Build and Manage Containers using PowerShell or Docker (CLI) – Platform agnostic Docker Commands. • Visual Studio tools for Docker available as an Extension to VS 2015 enables on click deployment to Docker enabled Windows/Linux Machines. • Docker Engine re-written for Windows Open Sourced (libcontainer) is also open sourced – First Time Ever !! • Docker Engine on Windows uses namespaces isolation and resource governance for container isolation. • Windows Server Container Preview available on Azure Today !! (No GUI)
  • 5. Use Cases for Containers  Micro services: Containerized app can be converted to Images, multiple containers can be deployed using image within seconds. Apt for light-weight portable apps like micro services.  Higher Utilization: Since a VM can be used to host Multiple applications in isolated containers.  Easy to Scale: Container Images can used to scale the application to N instances within seconds.  Easy Procurement: Since the kernel is already heated up, application deployment does not have to wait for full OS boot times.  Reusability: One can easily deploy a container install custom applications (Redis, MySQL etc.) from Docker Host, customize the configuration and image it out and use many times.
  • 6. Getting Started • Create a HOST Machine • Create a “Windows Server Container Preview” machine from Azure Image Gallery. (Recommended) • Create a “Windows Server 2016 CTP3” login and enable Container Role. • Preparing Dev Machine • Download Docker Tools for VS 2015 from here. • Quick Start Guides: https://msdn.microsoft.com/virtualization/windowscontai ners/containers_welcome Pre-built Windows Server Core Image Create Container Customize Container Create Customized Image Create N Containers using Customized Image
  • 7. Creating NGINX container for web hosting ## Get VM Switch Name Get-VMSwitch ## Create Container $containername = "webcontainer" $container = New-Container -Name $containername - ContainerImageName WindowsServerCore -SwitchName "Virtual Switch" Start-Container -Name $containername # Create container from custom image $webservercontainer = New-Container -Name nginxwebserver - ContainerImageName nginxwindows -SwitchName "Virtual Switch" Start-Container $webservercontainer Enter-PSSession -ContainerId $webservercontainer.ContainerId - RunAsAdministrator ## Use Container cd c:nginx-1.9.3 start nginx ## Configure Container Enter-PSSession -ContainerId (Get-Container -Name $containername).ContainerId -RunAsAdministrator wget -uri 'http://nginx.org/download/nginx-1.9.3.zip' -OutFile "c:nginx-1.9.3.zip" Expand-Archive -Path C:nginx-1.9.3.zip -DestinationPath c: - Force Exit ## Build Image Stop-Container -Name $containername $webserverimage = New-ContainerImage -Container (Get-Container - Name $containername) -Publisher srikanth -Name nginxwindows - Version 1.0 Get-ContainerImage
  • 8. Creating IIS Container for Web Hosting ## Create Container $containername = "iiscontainer" $container = New-Container -Name $containername - ContainerImageName WindowsServerCore -SwitchName "Virtual Switch" Start-Container -Name $containername New-Container -Name iiscontainer -ContainerImageName iiswebserverimage -SwitchName "Virtual Switch" Invoke-Command -ContainerName iiscontainer {ipconfig} if (!(Get-NetNatStaticMapping | where {$_.ExternalPort -eq 80})) { Add-NetNatStaticMapping -NatName "ContainerNat" -Protocol TCP - ExternalIPAddress 0.0.0.0 -InternalIPAddress 172.16.0.2 -InternalPort 80 -ExternalPort 80 } ## Configure Container Enter-PSSession -ContainerId (Get-Container -Name $containername).ContainerId -RunAsAdministrator Install-WindowsFeature web-server Exit ##prep image Stop-Container -Name $containername $webserverimage = New-ContainerImage -Container (Get-Container - Name $containername) -Publisher srikanth -Name iiswebserverimage - Version 1.0 Get-ContainerImage
  • 9. Limitations  Docker Containers created on Linux cannot be ported to windows.  Docker Containers cannot be managed using PS library for Windows.  ASP.NET 4.5 and below does not run on WSC yet, only option is ASP.NET 5.0.  Not all Docker commands work today.  If the OS needs patchingupgrade, the changesupgrade might ripple into containers as well • Do not share kernel with other containers • More Isolation thus better Security with Hyper-V Containers • They can be managed using Docker CLI/PowerShell. • Not available on Azure today, needs on premise container host. • MS working on Nano servers 1/20th size of previous servers specially designed for containers/Micro Services Hyper-V Containers