Microsoft Developer Conference A Container Journey
David Tesar Senior Technical Evangelist@dtzar
March, 2017 | Cairo, Egypt
Extreme Sport Christians – Monolith Architecture (on PaaS)
SQL Azure
Microsoft Azure
Azure App Services WebsiteApp Insights
Internet
.NET 4.6 front-end code with tight-couplingto out of box InstantForum product
The Monolithic Application
Pros
Simple at firstIn-process latenciesSingle codebase, deploy unitResource-efficient at small scale
Cons
Complex to understandDifficult to TestCoordination overhead as team growsDevOps Practices harder to implementPoor scaling (vertical only)All-or-nothing deploy (downtime, failures)Long build timesLonger / Harder to update
Microservices Design Pattern
A
C D EBC
BA E
F
GD
Microservices
API-Auth
API-User
API-Comms
API-Tags
Action Sports Community - Architecture
DocDB
Mobile Apps React.JS / Cordova iOS/Android/Windows
User CollectionComms CollectionAuth CollectionTags Collection
Node.JSExpressSwagger
Microsoft Azure
React.JS Website
APIGatewa
y
Internet
Microservices on top ACS+K8s
MongoContain
er
MongoContain
er
Container
ContainersHow do they differ from virtual machines?Dependencies: Each virtualized app includes the app itself, required binaries and libraries and a guest OS, which may consist of multiple GB of dataIndependent OS: Each VM can have a different OS from other VMs, along with a different OS to the host itselfFlexible: VMs can be migrated to other hosts to balance resource usage and for host maintenance without downtime
Secure: High levels of resource and security isolation for key virtualized workloads
App A
Host OSw/Container
support
Server / Hypervisor
Bins/libraries
Container
Bins/libraries
App B
Virtual Machine
Host OSw/Container
support
SemanticsWhat’s the difference between a Docker File, Image and Container?
Docker File: Defines source image and commands to execute to build a Docker ImageCreates image to build… ‘docker build’
Docker Image: Images are stored in a registry and are a immutable copy of the applicationCreates instance of image… ‘docker run’
Docker Container: This is the running instance of a Docker Image
Lists running instances… ‘docker ps’
Demo
Docker Fundamentals withAction Sports Community Front-End React.JS & API-Comms Microservice
React.JS Website
API-Comms
DevOps Practices with VSTS + Azure
Local Dev
Source Repo
Build Docker Image
Azure Container Registry (ACR)
Microsoft Azure
Master Node1 Node2
VSTS
Docker-Compose up
CI
Demo
Sharing Docker Images via Azure Container Registry
Docker Compose
React.JS Website
“Continuous automatedscheduling, coordination, andmanagement of complex systemsof containerized components andthe resources they consume.”@karlkfi
Application
Infrastructure
Azure Container Service
ARM Templat
e
Orchestrator
DemoDeploying an ACS Cluster with Kubernetes OrchestratorUsing AZ cli script
Create Cluster
Master Node1 Node2
App Marketplaces
http://kubeapps.com http://mesosphere.github.io/universe/
DevOps Practices with VSTS + Azure
Local Dev
Source Repo
Build Docker Image
Azure Container Registry (ACR)
Microsoft Azure
Master Node1 Node2ACS / K8s Cluster
Deploy to Cluster(Stage)
Deploy to Cluster(Prod)
Automated Tests
VSTS
Docker-Compose up
CI
CD RM
DemoDeployment Using Helm to ACS+K8s Cluster
Continuous Delivery to ACS+K8s with VSTS
Resources• DevOps Fundamental Video Series
http://aka.ms/DevOpsFundamentals • Continuous Delivery to ACS+K8s with VSTS
http://wp.me/p355zy-6h• MVA Courses on Microservices
https://mva.microsoft.com/search/SearchResults.aspx#!q=microservice&lang=1033
• VSTS Kubernetes Taskhttps://github.com/TsuyoshiUshio/KubernetesTask
• ACS – Kubernetes Walkthroughhttps://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough
• ACS – DCOS CI/CD https://docs.microsoft.com/en-us/azure/container-service/container-service-setup-ci-cd
• Microsoft DevOps Case Studieshttps://microsoft.github.io/techcasestudies/
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.