You are on page 1of 24

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

Empty
Sandbox (changes go
Repository here)

App App image C:\MyApp C:\MyApp


image C:\Windows

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

Windows containers Hyper-V containers

Container Container Container Container Container


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

Bin/lib Bin/lib
Binaries/libraries Binaries/libraries
User mode User mode
User mode

Base Base
image 1 image 2
Host OS kernel kernel kernel

Hyper-V VM Hyper-V VM

Host
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

You should consider the following when planning


for Windows containers:
• Windows container host requirements
• Virtualized container host requirements
• Supported scenarios

Host OS Windows Server Hyper-V container


container
Windows Server 2016 Full UI Server Core image Nano Server image
Windows Server 2016 Core Server Core image Nano Server image
Windows Server 2016 Nano Nano Server image Nano Server image
Server
Windows 10 Insider releases Not available Nano Server image
Lesson 2: Preparing for containers

Preparing Windows Server containers


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

• To prepare a Nano Server:


1. Create a Nano Server virtual hard disk (VHD) file for containers
2. Proceed with the following steps

• 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 to a Nano Server


Preparing Hyper-V containers

• To prepare a Nano Server:


• Create a Nano Server virtual hard disk (VHD) file for containers
• Proceed with the steps below

• 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

* Step not required if you deploy to a Nano Server


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 components
Usage scenarios
Installing and configuring Docker
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 components

Docker terminology:
• Image, container, Dockerfile, Build
Docker toolbox:
• Docker Engine, Docker Compose, Docker machine,
Docker client, Kitematic, Docker Registry, Docker Swarm
Docker solutions:
• Docker Hub, Docker Trusted Registry, Universal Control
Panel, Docker Cloud, Docker Datacenter
Usage scenarios

Some common usage scenarios for Docker include:


• Container orchestration
• DevOps
• Microservices
Installing and configuring Docker

• To install Docker to Windows Server 2016:


• Install the OneGet provider PowerShell module
• Use OneGet to install Docker
• Restart the container host

• To install Docker to Nano Server:


• Create remote PowerShell session
• Install Windows updates
• Install Docker
• Configure security settings
• Install the Docker client
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
Demonstration: Deploying containers by using Docker

In this demonstration, you will see how to:


• Install the OneGet PowerShell provider module
• Install Docker
• Download an image
• Deploy a new container
• Manage the container
Lab: Installing and configuring containers

Exercise 1: Installing Docker


• Exercise 2: Installing and configuring a container

Logon Information
Physical machine: 20740B-LON-HOST1
Virtual machines: 20740B-LON-NVHOST2
20740B-LON-DC1-B
20740B-NAT
User name: Adatum\Administrator
Password: Pa55w.rd

Estimated Time: 45 minutes


Lab Scenario

The DevOps team at A. Datum 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.
Module Review and Takeaways

• Common Issues and Troubleshooting Tips


• Review Questions

You might also like