Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Containerized Delivery in a world of DevOps

Containerized Delivery in a world of DevOps

Let's see how you can create, deploy and configure your containerized applications on Microsoft Azure using Azure Container service and Azure Service Fabric. We will create container images, and manage multiple containers using tools like Docker. We will look into deployment options
for containerized applications into different orchestrators that are available in Azure i.e. DC/OS, Docker swarm and Kubernetes. Finally, Microsoft's own orchestrator Azure Service Fabric will be on stage.

Daron Yondem

October 26, 2017
Tweet

More Decks by Daron Yondem

Other Decks in Programming

Transcript

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

    View Slide

  2. 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.

    View Slide

  3. View Slide

  4. 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.

    View Slide

  5. View Slide

  6. View Slide

  7. View Slide

  8. 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

    View Slide

  9. 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.

    View Slide

  10. View Slide

  11. Demo
    Getting started!

    View Slide

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

    View Slide

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

    View Slide

  14. View Slide

  15. 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"]

    View Slide

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

    View Slide

  17. 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

    View Slide

  18. Demo
    Your own Container Registry

    View Slide

  19. 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/:

    View Slide

  20. 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

    View Slide

  21. Demo
    Ochestration 101 with Docker Compose

    View Slide

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

    View Slide

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

    View Slide

  24. 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.

    View Slide

  25. View Slide

  26. 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

    View Slide

  27. View Slide

  28. 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

    View Slide

  29. View Slide

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

    View Slide

  31. View Slide

  32. Demo
    Azure Container Instances

    View Slide

  33. View Slide

  34. View Slide

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

    View Slide

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

    View Slide