Дмитрий Дурасов-«Технологии контейнеризации в windows...

41
Windows Server 2012 ||

Upload: tanya-denisyuk

Post on 13-Jan-2017

7.122 views

Category:

Science


2 download

TRANSCRIPT

Page 1: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Windows Server 2012 ||

Page 2: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

HelloSpeaker: Dzmitry Durasau

Microsoft Certified Trainer, MCSA, MCTS, MCPSolution Architect at EPAM Systems

Main areas of expertise: Cloud Infrastructures, Enterprise Windows-based IT, Virtualization and PowerShell.

Page 3: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

• Containerization in Windows Server 2016• Windows Container Under the Hood• Hello, World!

Agenda

Page 4: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Containerization inWindows Server 2016

Page 5: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Containers – no magic insideJust another isolation technologyLike many others

• Remote Desktop Session• Application Virtualization• IIS Application Pool• Citrix• Thin Clients

Page 6: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Isolation Technologies

Page 7: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Windows and Hyper-V Containers

Page 8: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Container Management Stack• PowerShe

ll• Docker

Page 9: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Compatibility• Windows Container can run only on

Windows Host• Windows Containers and Hyper-V

Containers are compatible • Docker Containers and PowerShell

Containers are not compatible

Page 10: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Containers Deployment

Operating System

Operating System

Physical System

VM

Container

Nested Virtualization in Windows Server 2016

Page 11: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Windows Server 2012 || 11

Windows Container:Under the Hood

Page 12: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Installation• Containers• Hyper-V

Page 13: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Manage Containers with PowerShell

Page 14: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Windows Container Anatomy• Container Runtime• Container Image

Container RuntimeContainer Image (based on

WIM)

Page 15: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Windows Containers Image: WIM Package

Page 16: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Install WIM ImageInstall-ContainerOSImage

Page 17: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Container OS ImageC:\ProgramData\Microsoft\Windows\Images

Page 18: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Create ContainerNew-Container -Name <ContainerName> -ContainerImageName <ImageName>

Optional:-SwitchName <SwitchName>-MemoryStartupBytes

Page 19: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Containers

Page 20: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»
Page 21: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Containers Structure

Page 22: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Start Container

Start-Container –Name <ContainerName>

Page 23: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Container Start Procedure

Page 24: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Processes

Page 25: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

CPU and RAM• 1 CPU per Container (not verified)• Startup RAM amount can be defined within

the container properties.

Page 26: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Network• Windows Containers use Hyper-V Virtual

Host Network Adapter• Because Firewall is shared between

Container and OS the FW configuration should be performed in OS

• MAC Address is the same as OS.

Page 27: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Hyper-V Containers Anatomy (Assumption #1)

Base OS Image

Container Runtime

WIM

Page 28: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Hyper-V Containers Anatomy (Assumption #2)

Base OS Image

Container Runtime

WIM

Page 29: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»
Page 30: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Hello, World!

Page 31: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Windows Container Restrictions• Windows Server Containers created with PowerShell

can not currently be managed with Docker and visa versa.

• Commands sporadically fail -- try again• Currently it is not possible to create a file share

within a Container.• ASP.NET 4.5 and 3.5 doesn't run in a container.• ASP 5.0 does work.• Windows Server Containers can be

managed/interacted with through a RDP session.

Page 32: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

https://msdn.microsoft.com/en-us/virtualization/windowscontainers/about/work_in_progress

Page 33: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

DemoCreate new containerStart containerConnect to the container via PowerShellInstall IIS RoleCheck Web site via PowerShellCheck Web site via IE from hostExport container image

Page 34: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»
Page 35: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»
Page 36: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»
Page 37: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»
Page 38: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Demo Code#Review PowerShell cmdletsGet-Command -Module Containers

#Review Container ImagesGet-ContainerImage

#Because Containers use Hyper-V Virtual Switch we need to have at least one for network communicationsGet-VMSwitch

#Note: We can communicate with Containers even without network via PowerShell

#Let's create Container object $HelloWorld$HelloWorld = New-Container -Name "HelloWorld" -ContainerImageName WindowsServerCore -SwitchName Internal_Switch

#How they look:Get-Container

#Lets get the party started!Start-Container -Container $HelloWorld

#See container stateGet-Container

#Enter to the container with PowerShellEnter-PSSession -ContainerId $HelloWorld.ContainerId -RunAsAdministrator

#Install IISInstall-WindowsFeature -Name Web-Server

#Get Web SitesGet-IISSite

#Create Container ImageNew-ContainerImage -ContainerName $HelloWorld.Name -Publisher HDConf -Version 1.0 -Name HelloWorldHDConf

#Review our new containerGet-ContainerImage

#Export ContainerExport-ContainerImage -Name HelloWorldHDConf -Path c:\test\

Page 39: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Thank you!

Page 40: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

• http://www.creationline.com/lab/11385• http://

blog.engineer-memo.com/2015/08/21/windows-server-containers

• http://blogs.msdn.com/b/msgulfcommunity/archive/2015/09/08/why-windows-server-containers-and-why-you-need-to-look-at-containers-hands-on.aspx

• https://msdn.microsoft.com/en-us/virtualization/windowscontainers/about/work_in_progress

• http://blogs.technet.com/b/rutechnews/archive/2015/09/16/24-171-windows-server-2016-techincal-preview-3-187.aspx

• https://www.techdays.ru/videos/10093.html• https://

channel9.msdn.com/Blogs/TechDays-Russia/Containers-in-Windows-Server-2016

Links and credits

Page 41: Дмитрий Дурасов-«Технологии контейнеризации в Windows Server 2016»

Questions?Email: [email protected]:https://twitter.com/azuregeek Facebook:https://www.facebook.com/dzmitry.durasau

LinkedIn:https://www.linkedin.com/in/ddurasau

Dzmitry DurasauContainers in Windows Server

2016