Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Module 6

Deploying and managing Windows


and Hyper-V containers
Module Overview

• Overview of containers in Windows Server 2016


• Preparing for containers
• Installing, configuring, and managing containers
by using Docker
Lesson 1: Overview of containers in Windows
Server 2016

• Overview of Windows Server containers


• Overview of Hyper-V containers
• Usage scenarios
• Installation requirements
Overview of Windows Server containers

Repository Empty (changes


Sandbox
go here)

App image C:\MyApp


App image C:\MyApp
C:\Windows

Container Container
app image Container app view
C:\Windows
image
Overview of Hyper-V containers

Windows containers Hyper-V containers

Container Container Container Container Container Container Container


app 1 app 2 app 3 app 4 app 5 app 6 app 7

Binaries/libraries Binaries/libraries Bin/lib Bin/lib


User mode User mode
User mode

Base image 1 Base image 2


kernel kernel
Host OS kernel

Hyper-V VM Hyper-V VM
Host
Overview of Hyper-V containers
Usage scenarios

Some common usage scenarios for Windows


containers include:
• Windows Server containers for:
• Hosting stateless apps
• Rapid test deployment

• Hyper-V containers for:


• Multiple tenants
• Single tenants
• Independent lifecycle management
Installation requirements

Consider the following when planning for Windows


containers:
• Windows Server container host requirements
• Virtualized container host requirements
• Supported scenarios
Host OS Windows Server Hyper-V container
container
Windows Server Server Core Nano Server image
2016 Full UI image
Windows Server Server Core Nano Server image
2016 Core image
Windows 10 Not available Nano Server image
Insider releases
Lesson 2: Preparing for containers

• Preparing Windows Server containers


• Preparing Hyper-V containers
• Deploying package providers
Preparing Windows Server containers

Use the following steps to prepare your Windows Server


host for containers:
1. Install the container feature*
2. Create a virtual switch
3. Configure NAT settings
4. Configure MAC address spoofing

* This step is not required if you deploy using Docker


Enterprise Edition for Windows Server 2016
Preparing Hyper-V containers

Use the following steps to prepare your Windows


Server host for containers:
1. Install the container feature*
2. Enable the Hyper-V role*
3. Enable nested virtualization
4. Configure virtual processors
5. Create a virtual switch
6. Configure NAT settings
7. Configure MAC address spoofing

* This step is not required if you deploy using Docker Enterprise


Edition for Windows Server 2016
Deploying package providers

PackageManagement PackageManagement
End User Package Sources
Core Providers

PowerShellGet PowerShell Gallery


Discovery

ContainerImage NuGet Gallery

PackageManagement Windows Container


Install / Uninstall DockerMsftProvider
PowerShell cmdlets OS Image Gallery
Windows Package for
NuGet
Nano Server Gallery
Inventory
... ...
Lesson 3: Installing, configuring, and managing
containers by using Docker

• What is Docker?
• Docker support in Windows Server 2016
• Docker Enterprise Edition for Windows Server 2016
• Docker components
• Usage scenarios
• Demonstration: Deploying Docker Enterprise Edition
and using Docker to pull an image
• Overview of management with Docker
• Overview of Docker Hub
• Docker with Azure
• Demonstration: Deploying containers by using
Docker
What is Docker?

App 1 App 2 App 3

Bins/libs Bins/libs Bins/libs

Docker Engine

OS
Infrastructure
Docker support in Windows Server 2016

The Docker Engine for Windows Server requires


Windows Server 2016, and it includes the following
key points:
• No cross-platform containerization
• Two ways to manage containers in the Windows OS:
• Docker tool set
• Windows PowerShell
Docker Enterprise Edition for Windows Server 2016

• Available for Windows Server 2016 at no cost


• Lightweight containers start up fast
• Eliminate conflicts of dissimilar versions of IIS/.NET
• Takes advantage of new base images like Windows
Server Core and Nano Server
• Consistent user experience; use the same commands
as Docker for Linux
• Containerized Windows apps in same cluster as Linux
• Adds isolation properties with Hyper-V containers
selected at runtime
Docker components

• Docker terminology:
• Image
• Layered file systems
• Container
• Operating environment, and the image
• Dockerfile
• Commands to run to build the Docker Image
• Build
• Constructing the Docker image from the Dockerfile
Docker components

• Docker toolbox
• Docker Engine
• Allows containers to be built and to run
• Docker Compose
• Multiple-container apps
• Docker machine
• Installs the Docker Engine and client
• Docker client
• Docker Command-line environment
• Kitematic
• GUI
• Docker Registry
• Controls where your images are being stored and distributed
• Docker Swarm
• Use the Docker Engine CLI to create a cluster of Docker Engines
Docker components

• Docker solutions
• DockerHub
• Public repository used for Docker container images
• Docker Trusted Registry
• Store and manage your own images
• Universal Control Panel
• Manage Docker Apps
• Docker Cloud
• Deploy Docker Apps in your cloud
• Docker Datacenter
• Build, Test, Deploy, Manage Apps on-premises or in the cloud
Usage scenarios

Some common usage scenarios for Docker include:


• Container orchestration
• DevOps
• Microservices
Overview of management with Docker

• With Docker, you can:


• Create containers
• Remove containers
• Manage containers
• Browse the Docker Hub to access and download prebuilt
images

• In most organizations, the most common Docker


management tasks include:
• Automating the creation of container images by using
Dockerfile on a Windows OS
• Managing containers by using Docker
• Using docker run
Overview of Docker Hub
Docker with Azure
Lab: Installing and configuring containers

• Exercise 1: Installing Docker Enterprise Edition for


Windows Server 2016
• Exercise 2: Installing and configuring an IIS
container
Logon Information
Physical machine: 20740C-LON-HOST1
Virtual machines: 20740C-LON-NVHOST2
20740C-LON-DC1-B
20740C-NAT
User name: Adatum\Administrator
Password: Pa55w.rd
Estimated Time: 45 minutes
Lab Scenario

The DevOps team at Adatum Corporation wants


to explore containers to see if the technology
can help reduce deployment times for new
applications and to simplify moving applications
to the cloud. The team has decided to evaluate
Windows Server containers and to look at IIS in
a container.
Lab Review

• What does the -d do in the following command?


docker run -d -p 80:80
microsoft/iis:windowsservercore cmd
• If you downloaded the Windows Server Core and
the IIS images using the following construct:
docker pull Microsoft/iis:windowsservercore
what would happen?
Module Review and Takeaways

• Review Questions
• Common Issues and Troubleshooting Tips

You might also like