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. 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.
  2. 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.
  3. 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
  4. 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.
  5. Docker Commands to Remember • docker run -it <name-of-the-image> <command-to-run>

    • docker ps –a • docker commit <container name> <reponame>:<tagname> • docker rm <name-of-the-stopped-container> • docker inspect <name-of-the-image> • docker build -t <reponame>:<tagname> . • docker exec -it <name-of-the-image> cmd
  6. 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"]
  7. 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
  8. More Commands to Remember • docker login -u <username> -p

    <password> • docker push <imagename> • docker pull <imagename> • az acr create -n <RegistryName> -g <ResourceGroup> -l <region> • docker tag <myimage> <registryname>-on.azurecr.io/<image>:<tag> • docker login -u <username> -p <password> http://<registryname>- on.azurecr.io • docker push <registryname>-on.azurecr.io/<image>:<tag> • docker pull <registryname>-on.azurecr.io/<image>:<tag>
  9. 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
  10. 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.
  11. 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
  12. 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
  13. Azure Container Services • Master Nodes + Agent Nodes •

    One big virtual server. • Fault tolerance.