17
Nano Server and Windows Containers RICHARD SIDDAWAY

WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Embed Size (px)

Citation preview

Page 1: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Nano Server and Windows ContainersRICHARD SIDDAWAY

Page 2: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

About the Presenter

PowerShell.org Director PowerShell MVP – 9 years Author Blogger Speaker Honorary Scripting Guy 25 year+ IT survivor

Page 3: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

“Warning: Danger Will Robinson

The content of this presentation is subject to change as we’re dealing with Windows Server 2016 CTP5. There could be changes in subsequent builds of Windows Server 2016

Page 4: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

GUI? We don’t need no stinkin’ GUI

Demos on Nano ServerWhich film is misquoted?

Page 5: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Nano server:

New to windows with Server 2016 Bare minimum server No local logon Manage remotely

PowerShell Server Management Tools

64 bit applications ONLY Setup and start up @ warp factor 20 Fewer updates

Page 6: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Nano server roles:

Hyper-V Clustering File server DNS server IIS DSC server

Push and pull modes NOT Pull server in TP5 Still work in progress

Container Host

Page 7: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Containers are:

New to windows with Server 2016 (TP3 and later) Lightweight virtualisation Mobile – easily moved across environments Appear as isolated and independent OS to application Windows server containers or Hyper-V containers Containers share host operating system Manage through PowerShell or Docker

Page 8: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Windows or Hyper-V containers

Windows Containers Share Windows Kernel Memory shared through host OS trusts applications Applications trust each other Faster start up BIT LESS ISOLATION

Hyper-V Containers Own Windows Kernel Memory assigned directly Applications untrusted Applications don’t trust Slightly slower start up MORE ISOLATION

Page 9: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Host and Container combinations

Host Operating System Windows Server Container Hyper-V ContainerWindows Server 2016 Full UI Core OS Image Nano OS ImageWindows Server 2016 Core Core OS Image Nano OS ImageWindows Server 2016 Nano Nano OS Image Nano OS Image

If patch host then MUST patch Container OS images as welli.e. versions MUST match exactly

Page 10: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Container concepts

Page 11: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Container networking

NAT Mode Internal VM switch External address on host + port = Internal address of container Many containers on single external address Multiple containers hosting applications with same port requirements

Transparent Mode External VM switch Containers get IP address from DHCP or assign statically Mac spoofing on container host

Page 12: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Container networking

L2 Bridge External VM switch Traffic between containers on same host & subnet directly bridged External traffic through switch MAC addresses re-written on traffic ingress/egress

L2 Tunnel mode MS Cloud Stack only Similar to L2 bridge All traffic through virtual switch

Page 13: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Container shared folders

Enable data sharing between host and container Data on host <-> data on container

Many containers can share a host’s folder Configure by container Shared folder can be read only

Good mechanism for software delivery

Page 14: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Process

Add containers feature to VM or Hyper-V server Add OS ContainerImage

Install-PackageProvider ContainerImage -Force Find-ContainerImage Install-ContainerImage -Name WindowsServerCore

OR Save-ContainerImage -Name WindowsServerCore -Destination C:\

ContainerOSImages\WindowsServerCore.wim Install-ContainerOSImage -WimPath C:\ContainerOSImages\

WindowsServerCore.wim

Page 15: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Warning: Be careful with providers TWO image providers existPS> ContainerImage\Find-ContainerImage | ft -a

Name Version Source Summary

---- ------- ------ -------

NanoServer 10.0.14300.1010 ContainerImageGallery Container OS Image of Windows Server 2016 Technical Preview 5 : Nano Server I...

WindowsServerCore 10.0.14300.1000 ContainerImageGallery Container OS Image of Windows Server 2016 Technical Preview 5 : Windows Serve...

PS> ContainerProvider\Find-ContainerImage | ft -a

Name Version Source Description

---- ------- ------ -----------

NanoServer 10.0.10586.0 Container OS Image of Windows Server 2016 Technical Preview 4 : Nano Server Installation

WindowsServerCore 10.0.10586.0 Container OS Image of Windows Server 2016 Technical Preview : Windows Server Core Installation

Page 16: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Process

Create container network Create Container Create shared folder Add NAT mapping (if needed) Configure container e.g. add IIS and web site

Page 17: WinOps Conf 2016 - Richard Siddaway - DevOps With Nano Server and Windows Containers

Using containers for application deployment

Create base container Install application Create ContainerImage

VERSIONING Duplicate container if required

Export ContainerImage Copy ContainerImage to target Import ContainerImage Create container