Windows Containers: What they are and how they work

happy-new-year-622149_640

I thought a brand New Year warranted a post on some brand new technology that I predict will have a huge impact on us this year.

The It Industry is a maze of Three Letter Acronyms (TLA’s) and Buzzwords they seem to proliferate at an ever-increasing rate. One of the latest ‘fads’, ‘trends’ or buzzwords that has gained a great deal of momentum over the last 12 months is the wonderful world of containers.

Hopefully, if you currently don’t know what they are or why we should be diving in feet first into this new(ish) technology then after reading this post you should have a clearer idea. Why not get testing the Microsoft implementation with Windows Server Technical preview 4 (TP4) (get it here) or on your Windows 10 client Hyper-V using PowerShell by followinf the steps here.

There are also a bunch of free MVA courses here and to finally quench your thirst for knowledge, Channel 9 has a containers channel here.

So having prepped you for the journey into Containers why not take a quick look at an intro video on Channel 9.

Microsoft has been in partnership with Docker for some time,integrating their container technology into Microsoft Azure and Windows Server 2016. With TP4 Microsoft have also introduced both Windows Containers and Hyper-V Containers, both of which carry out the same function of providing a platform for lightweight portable application to be hosted, sclaed and reworked in seconds with differing levels of isolation.

At its most fundamental level container tehcnology is a way of packing many identical, similar or completely different applications in isolation on the same host (or ported to the cloud)

I know, we can already do that with Hyper-V and other hypervisors. BUT this technology only requires one base operating system to be in use onthe container host, all the containers use links to that operating system. A container host can be a physical host or a virtual machine. The container analogy is similar to the way a differencing disk contains only changes to the parent installation, the base OS image is never changed.

Microsoft Container technology now provides two base images nanoserver and Windows Server Core. There are also two types of container which provide the same functionality but different levels of container isolation as shown below.

image

A Hyper-V container will be run in a very lightweight virtual machine, ensuring that the isolation is total. This will allow Microsoft Container technology to support a full public multi-tenancy solution.

The clever part of the solution is that its quite easy to create, amend, copy and recreate container images and then deploy them as containers running modern appplications, web browsers etc. on your server.

Normally my posts include a whole bunch of how-to steps and advice but all of these are already listed in a step by step way on https://aka.ms/windowscontainers so I will limit myself to your first step.

From either a Windows 10 machine that runs Hyer-V client or from a Windows Server running Hyper-V fire up your best friend (PowerShell) in an administrative window. Then enter this one command.

 wget -uri https://aka.ms/tp4/Install-ContainerHost -OutFile C:\Install-ContainerHost.ps1

This creates a new script which will then set your system up as a container host, so run this comand straight afterwards.

New-ContainerHost.ps1 –VmName Tp4ContainerHost -WindowsImage ServerDatacenterCore –Hyperv

Once the script completes you will have a running container host ready to start experiementing.

Be warned htough, this script takes a long time to runas it downloads the base OS images.

Happy Containerising!

The post Windows Containers: What they are and how they work appeared first on Blogg(Ed).