Slide 1

Slide 1 text

Containerized Delivery in a World of DevOps Daron Yöndem http://daron.me | @daronyondem

Slide 2

Slide 2 text

What is Containerization? • Containers are isolated, but share OS and, where appropriate bins/libraries. • Containers share the kernel of the host operating system. • Containers rely on the host OS for the virtualized access to CPU, memory, network, registry.

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Containers vs VMs • Containers share OS, VMs share hardware. • Containers use OS Virtualization, VMs use hardware virtualization. • Containers are immutable. • Containers are OS feature. (Windows Server 2016, W10 Anniversary Update) • Containers start fast, less footprint.

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

What is Docker? • Docker brings a common interface to dealing with containers. • A set of command-line tool to work with containers • A unified way to build Container images • A unified way of maintaining images in a registry • A daemon process that manages the images & networking on a host machine • The daemon interacts with the native container infrastructure, providing abstraction to the containers. • Alternatives exist; Rocket. https://github.com/rkt/rkt

Slide 9

Slide 9 text

Attention please! • A Windows Container image will not work on Linux. A linux container image will not work on Windows. • Docker for Linux and Windows switches are for developers only, not for production. • Hyper-V Containers are there for you in case you don’t control / own what’s running in those containers.

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Demo Getting started!

Slide 12

Slide 12 text

Docker Commands to Remember • docker run -it • docker ps –a • docker commit : • docker rm • docker inspect • docker build -t : . • docker exec -it cmd

Slide 13

Slide 13 text

Sample Docker File FROM microsoft/iis WORKDIR /inetpub/wwwroot ADD index.html index.html

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

FROM microsoft/nanoserver ADD https://az880830.vo.msecnd.net/nanoserver-ga-2016/Microsoft-NanoServer-IIS-Package_base_10-0-14393-0.cab /install/Microsoft- NanoServer-IIS-Package_base_10-0-14393-0.cab ADD https://az880830.vo.msecnd.net/nanoserver-ga-2016/Microsoft-NanoServer-IIS-Package_English_10-0-14393-0.cab /install/Microsoft- NanoServer-IIS-Package_English_10-0-14393-0.cab ADD ServiceMonitor.exe /ServiceMonitor.exe RUN dism.exe /online /add-package /packagepath:c:\install\Microsoft-NanoServer-IIS-Package_base_10-0-14393-0.cab & \ dism.exe /online /add-package /packagepath:c:\install\Microsoft-NanoServer-IIS-Package_English_10-0-14393-0.cab & \ dism.exe /online /add-package /packagepath:c:\install\Microsoft-NanoServer-IIS-Package_base_10-0-14393-0.cab & \ rd /s /q c:\install & \ powershell -command {start-service was; While ((Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\WAS\Parameters\ -Name NanoSetup -ErrorAction Ignore) -ne $null) {sleep 1}} EXPOSE 80 ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"]

Slide 16

Slide 16 text

FROM microsoft/windowsservercore RUN powershell -Command Add-WindowsFeature Web-Server ADD ServiceMonitor.exe /ServiceMonitor.exe EXPOSE 80 ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"]

Slide 17

Slide 17 text

Hyper-V Containers • Hyper-V containers do not share the kernel with the host or any other container, each Hyper-V container has its own Kernel. • A greater degree of isolation and security • docker run -it --isolation hyperv microsoft/windowsservercore cmd

Slide 18

Slide 18 text

Demo Your own Container Registry

Slide 19

Slide 19 text

More Commands to Remember • docker login -u -p • docker push • docker pull • az acr create -n -g -l • docker tag -on.azurecr.io/: • docker login -u -p http://- on.azurecr.io • docker push -on.azurecr.io/: • docker pull -on.azurecr.io/:

Slide 20

Slide 20 text

Docker Compose • Orchestrate creation, use and cleanup of multiple containers with a single command. • Uses compose files to define the orchestration • YAML File defines the docker compose • Web and db containers are present • Web is reachable on port 80 • Db is reachable on post 1433 • Web depends on DB • docker-compose up

Slide 21

Slide 21 text

Demo Ochestration 101 with Docker Compose

Slide 22

Slide 22 text

Container Clusters • Docker Swarm • DC/OS • Kubernetes • Azure Service Fabric

Slide 23

Slide 23 text

Azure Container Services • Supports • Docker Swarm • DC/OS • Kubernetes

Slide 24

Slide 24 text

Docker Swarm • provides the ability to turn a group of Docker engines into a single virtual Docker engine. • uses the standard Docker API, so any tool that can communicate with the Docker daemon, is able to use Swarm as well, in a transparent manner. • out of the three described products, Docker Swarm is probably the easiest product to use, • probably also offers the least number of features.

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

DC/OS • DC/OS is a distributed operating system based on the Apache Mesos distributed systems kernel. • Multiple servers are grouped into one virtual server. • DC/OS is the world’s first and only fully open source platform enabling enterprises to easily build and run modern apps in production. DC/OS abstracts your datacenter into a single computer, pooling distributed workloads and simplifying roll out and operations

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Kubernetes • Originated with Google • Most complex • Most options and flexibility • It can manage underlying infrastructure and integrates with Azure. • You don’t just scale up number of containers you can add VMs. • Manages Azure Load Balancer. • Supports Windows Containers

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Azure Container Services • Master Nodes + Agent Nodes • One big virtual server. • Fault tolerance.

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

Demo Azure Container Instances

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

For more go to EDX! • https://www.edx.org/course/configuration-management- containerized-microsoft-devops200-4x

Slide 36

Slide 36 text

Thanks Daron Yöndem http://daron.me | @daronyondem All slides here; http://daron.me/decks