Using Azure DevOps to continuously build, test, and deploy containerized applications with ease Adrian Todorov, Cloud Solutions Architect @todorov_adrian | linkedin.com/in/adriantodorov
Hello! I am Adrian Todorov love heavily
developers I need to create applications at a competitive rate without worrying about IT New applications run smoothly on my machine but malfunction on traditional IT servers My productivity and application innovation become suspended when I have to wait on IT
IT I need to manage servers and maintain compliance with little disruption I’m unsure of how to integrate unfamiliar applications, and I require help from developers I’m unable to focus on both server protection and application compliance
Security threats Datacenter efficiency Supporting innovation
Servers Services
Software Development Lifecycle
Software Development Lifecycle DevOps = efficiencies that speed up this lifecycle
Key DevOps Practices Infrastructure as Code Continuous Integration Continuous Deployment Automated Testing Release Management Performance Monitoring Availability Monitoring Load Testing & Auto Scale Automated Recovery (Rollback & Roll Forward)
Why Containers? Developers Enable ‘write-once, run-anywhere’ apps Enables microservice architectures Great for dev/test of apps and services Production realism Growing Developer Community Operations Portability, Portability, Portability Standardized development, QA, and prod environments Abstract differences in OS distributions and underlying infrastructure Higher compute density Easily scale-up and scale-down in response to changing business needs DevOps
container Containers = operating system virtualization Traditional virtual machines = hardware virtualization Windows Server containers: maximum speed and density Hyper-V containers: isolation plus performance OS Kernel Applications Container Container Container Hardware Hardware Container Container Container Hyper-V Container Kernel Container Kernel Container Kernel Hardware OS Application VM VM VM App OS App OS App OS
container Not a real thing. An application delivery mechanism with process isolation based on several Linux kernel features. (what a process can see) (what a process can use)
What is ?  An open source container runtime  Mac, Windows & Linux support  Command line tool  “Dockerfile” file format for building container images  The Docker image format with layered filesystem
Docker Layered Filesystem
Docker Layered Filesystem
Virtualization Containerization Type 1 Hardware Hypervisor 1 VM VM VM Hardware Type 2 Host OS Hypervisor 2 VM VM VM Virtual machine Guest OS Dependencies Application Hardware Host OS Docker Engine Dependency 1 Dependency 2 C C C C C Container App dependencies Application XYZ Virtualization versus containerization
advantage Fast iteration Agile delivery Immutability Cost savings Elastic bursting Efficient deployment For ITFor developers
Container Orchestration
orchestration Scheduling Affinity/anti- affinity Health monitoring Failover Scaling Networking Service discovery Coordinated app upgrades
Kubernetes Portable Public, private, hybrid, multi-cloud Extensible Modular, pluggable, hookable, composable Self-healing Auto-placement, auto-restart, auto-replication, auto-scaling
Kubernetes Deploy your applications quickly and predictably Scale your applications on the fly Roll out new features seamlessly Limit hardware usage to required resources only
Container Orchestration: Kubernetes
What is Kubernetes?
Kubernetes - Agility
Kubernetes - Agility
Kubernetes - Scalability
Kubernetes - Scalability
Kubernetes - Scalability
Kubernetes - Reliability
Azure Container Service (AKS)
Why AKS?
Getting Started with AKS
Managing an AKS cluster
Maersk uses AKS for a customer service process to elevate NSAT, an industry-wide challenge Needs: Get near-real-time data to provide better customer service Collect data for future Machine Learning driven features Challenges: Compute & memory intensive features Data integration difficulties Limited organisational experience in Cloud & Kubernetes Requirements: Spend less time on container software management Automation and continuous delivery Full visibility to application, container and infrastructure Fine grained security and access control Click icon to learn more
Architectural approach 1. Azure Pipelines for automation and CI/CD pipelines; adding Terraform for further automation 2. Key Vault to secure secrets and for persistent configuration store 3. Azure Monitor for containers provides better logging, troubleshooting, with no direct container access 4. RBAC control for fine grained Kubernetes resources access control Firewall App Gateway AKS w/ RBAC Azure Monitor Azure Pipeline SQL Database Cosmos DB Performance Document DB Key Vault Event Hub Batch processing Event Simulation Data Factory Data Management Gateway On-premises database Express Route Service Bus Internal Queuing SQL Database
Results Reduced environment provisioning time from 1+ weeks to 2.5 hours Deploy times reduced to minutes with the introduction of Terraform Increased developer autonomy with ARM Templates and Terraform <> Less time spend on managing secrets with AKS and Key Vault AKS and CaaS can potentially save 33% on run cost 100% automated production deployments
Release automation tools Simplifying the Kubernetes experience Streamlined Kubernetes development The package manager for Kubernetes Event-driven scripting for Kubernetes Visualization dashboard for Brigade Azure Container Service (AKS) Azure Container Instances (ACI) Azure Container Registry Open Service Broker API (OSBA) Release Automation Tools
Helm The best way to find, share, and use software built for Kubernetes Manage complexity Charts can describe complex apps; provide repeatable app installs, and serve as a single point of authority Easy updates Take the pain out of updates with in- place upgrades and custom hooks Simple sharing Charts are easy to version, share, and host on public or private servers Rollbacks Use helm rollback to roll back to an older version of a release with ease Azure Container Service (AKS) Azure Container Instances (ACI) Azure Container Registry Open Service Broker API (OSBA) Release Automation Tools
Helm Helm Charts helps you define, install, and upgrade even the most complex Kubernetes application custom services Chart.yml db load balancer ci … Azure Container Service (AKS) Azure Container Instances (ACI) Azure Container Registry Open Service Broker API (OSBA) Release Automation Tools
Introducing Azure DevOps Kanban Boards, Backlogs, Dashboards, and Reporting CI/CD platform, FREE for open source projects Unlimited, Cloud-Hosted Private Git Repos Manual and Exploratory Testing Tools Package Management for Maven, npm, and NuGet Azure Boards Azure ReposAzure Pipelines Azure Test Plans Azure Artifacts https://azure.com/devops
Azure DevOps – Get started for FREE https://azure.com/devops
DevOps at Microsoft Data: Internal Microsoft engineering system activity, August 2018 372k Pull Requests per month 2m Git commits per month 78,000Deployments per day 4.4m Builds per month 500m Test executions per day 500k Work items updated per day 5m Work items viewed per day Azure DevOps is the toolchain of choice for Microsoft internal engineering with over 90,000 internal users https://aka.ms/DevOpsAtMicrosoft
Database tier AKS production cluster Source code control Helm chart Inner loop Test Debug Azure DevSpaces AKS dev cluster Azure Container Registry Azure Pipelines/ DevOps Project Auto-build Business logic Front end Azure Monitor CI/CD
Azure makes Kubernetes easy Accelerate containerized application development Task The Old Way With Azure Build a containerized app and deploy to Kubernetes Build the app Write a Dockerfile Build the container image Push the container to a registry Write Kubernetes manifests/Helm chart Deploy to Kubernetes draft init to configure your environment draft create to auto-create Dockerfile/Helm chart draft up to deploy to Kubernetes Build a containerized app and deploy to Kubernetes Set up a local dev environment using Minikube Determine the transitive closure of your dependencies Identify behavior of dependencies for key test cases Stub out dependent services with expected behavior Make local changes, check-in, and hope things work Validate with application logs Use DevSpaces Do breakpoint debugging in your IDE Expose web apps to the internet with a DNS entry Deploy an ingress controller Create a load-balanced IP for it Add an ingress resource to your deployment Acquire a custom domain Create a DNS A-record for your service Turn HTTP application routing on in your cluster Add an ingress resource to your deployment
Azure makes Kubernetes easy Set up CI/CD in a few clicks Task The Old Way With Azure Set up a CI/CD pipeline and deploy to Kubernetes Create git repo Create a build pipeline Create a container registry Create a Kubernetes cluster Configure build pipeline to push to container registry Configure build pipeline to deploy to Kubernetes Create an Azure DevOps project with AKS as a target Make container images available for deployment worldwide Create a container registry in every region Configure build pipeline with multiple endpoints Loop through all regions and push following build Create an Azure Container Registry with geo-replication Push your image to a single endpoint Track health with consolidated cluster and application logs Choose a logging solution Deploy log stack in your cluster or provision a service Configure and deploy a logging agent onto all nodes Checkbox “container monitoring” in the Azure portal
 Build small containers  Application architecture  Use Namespaces  Use helm charts  RBAC  Implement Health checks  Set requests and limits  Be mindful of your services  Map external services  Don’t rely on load balancers 5 Kubernetes Best Practices
Microsoft
Questions?
Secure your Kubernetes environment Compliant Kubernetes service with certifications covering SOC, HIPAA, and PCI Control access through AAD and RBAC Safeguard keys and secrets with Key Vault Secure network communications with VNET and CNI
Scale and run with confidence Built-in auto scaling Global data center Geo-replicated container registry Elastically burst using ACI Browser Traffic manager Geo-replicated container registry AKS clusters Azure Container Instances Pod Pod Pod Pod Pod Pod
VM Pods VM Pods VM Pods VM Pods Kubernetes control pane Azure Container Instances (ACI) Pods ACI Connector Application Architect Infrastructure Architect Deployment/ tasks

Using Azure DevOps to continuously build, test, and deploy containerized applications with ease

  • 1.
    Using Azure DevOpsto continuously build, test, and deploy containerized applications with ease Adrian Todorov, Cloud Solutions Architect @todorov_adrian | linkedin.com/in/adriantodorov
  • 2.
    Hello! I am AdrianTodorov love heavily
  • 5.
    developers I need tocreate applications at a competitive rate without worrying about IT New applications run smoothly on my machine but malfunction on traditional IT servers My productivity and application innovation become suspended when I have to wait on IT
  • 6.
    IT I need tomanage servers and maintain compliance with little disruption I’m unsure of how to integrate unfamiliar applications, and I require help from developers I’m unable to focus on both server protection and application compliance
  • 7.
  • 8.
  • 10.
  • 11.
    Software Development Lifecycle DevOps= efficiencies that speed up this lifecycle
  • 12.
    Key DevOps Practices Infrastructureas Code Continuous Integration Continuous Deployment Automated Testing Release Management Performance Monitoring Availability Monitoring Load Testing & Auto Scale Automated Recovery (Rollback & Roll Forward)
  • 13.
    Why Containers? Developers Enable ‘write-once,run-anywhere’ apps Enables microservice architectures Great for dev/test of apps and services Production realism Growing Developer Community Operations Portability, Portability, Portability Standardized development, QA, and prod environments Abstract differences in OS distributions and underlying infrastructure Higher compute density Easily scale-up and scale-down in response to changing business needs DevOps
  • 14.
    container Containers = operatingsystem virtualization Traditional virtual machines = hardware virtualization Windows Server containers: maximum speed and density Hyper-V containers: isolation plus performance OS Kernel Applications Container Container Container Hardware Hardware Container Container Container Hyper-V Container Kernel Container Kernel Container Kernel Hardware OS Application VM VM VM App OS App OS App OS
  • 15.
    container Not a realthing. An application delivery mechanism with process isolation based on several Linux kernel features. (what a process can see) (what a process can use)
  • 16.
    What is ? An open source container runtime  Mac, Windows & Linux support  Command line tool  “Dockerfile” file format for building container images  The Docker image format with layered filesystem
  • 17.
  • 18.
  • 19.
    Virtualization Containerization Type 1 Hardware Hypervisor1 VM VM VM Hardware Type 2 Host OS Hypervisor 2 VM VM VM Virtual machine Guest OS Dependencies Application Hardware Host OS Docker Engine Dependency 1 Dependency 2 C C C C C Container App dependencies Application XYZ Virtualization versus containerization
  • 20.
  • 22.
  • 23.
  • 24.
    Kubernetes Portable Public, private, hybrid, multi-cloud Extensible Modular,pluggable, hookable, composable Self-healing Auto-placement, auto-restart, auto-replication, auto-scaling
  • 25.
    Kubernetes Deploy your applications quickly andpredictably Scale your applications on the fly Roll out new features seamlessly Limit hardware usage to required resources only
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 36.
  • 37.
  • 38.
  • 42.
    Maersk uses AKSfor a customer service process to elevate NSAT, an industry-wide challenge Needs: Get near-real-time data to provide better customer service Collect data for future Machine Learning driven features Challenges: Compute & memory intensive features Data integration difficulties Limited organisational experience in Cloud & Kubernetes Requirements: Spend less time on container software management Automation and continuous delivery Full visibility to application, container and infrastructure Fine grained security and access control Click icon to learn more
  • 43.
    Architectural approach 1. AzurePipelines for automation and CI/CD pipelines; adding Terraform for further automation 2. Key Vault to secure secrets and for persistent configuration store 3. Azure Monitor for containers provides better logging, troubleshooting, with no direct container access 4. RBAC control for fine grained Kubernetes resources access control Firewall App Gateway AKS w/ RBAC Azure Monitor Azure Pipeline SQL Database Cosmos DB Performance Document DB Key Vault Event Hub Batch processing Event Simulation Data Factory Data Management Gateway On-premises database Express Route Service Bus Internal Queuing SQL Database
  • 44.
    Results Reduced environment provisioning timefrom 1+ weeks to 2.5 hours Deploy times reduced to minutes with the introduction of Terraform Increased developer autonomy with ARM Templates and Terraform <> Less time spend on managing secrets with AKS and Key Vault AKS and CaaS can potentially save 33% on run cost 100% automated production deployments
  • 45.
    Release automation tools Simplifyingthe Kubernetes experience Streamlined Kubernetes development The package manager for Kubernetes Event-driven scripting for Kubernetes Visualization dashboard for Brigade Azure Container Service (AKS) Azure Container Instances (ACI) Azure Container Registry Open Service Broker API (OSBA) Release Automation Tools
  • 46.
    Helm The best wayto find, share, and use software built for Kubernetes Manage complexity Charts can describe complex apps; provide repeatable app installs, and serve as a single point of authority Easy updates Take the pain out of updates with in- place upgrades and custom hooks Simple sharing Charts are easy to version, share, and host on public or private servers Rollbacks Use helm rollback to roll back to an older version of a release with ease Azure Container Service (AKS) Azure Container Instances (ACI) Azure Container Registry Open Service Broker API (OSBA) Release Automation Tools
  • 47.
    Helm Helm Charts helpsyou define, install, and upgrade even the most complex Kubernetes application custom services Chart.yml db load balancer ci … Azure Container Service (AKS) Azure Container Instances (ACI) Azure Container Registry Open Service Broker API (OSBA) Release Automation Tools
  • 49.
    Introducing Azure DevOps KanbanBoards, Backlogs, Dashboards, and Reporting CI/CD platform, FREE for open source projects Unlimited, Cloud-Hosted Private Git Repos Manual and Exploratory Testing Tools Package Management for Maven, npm, and NuGet Azure Boards Azure ReposAzure Pipelines Azure Test Plans Azure Artifacts https://azure.com/devops
  • 50.
    Azure DevOps –Get started for FREE https://azure.com/devops
  • 51.
    DevOps at Microsoft Data:Internal Microsoft engineering system activity, August 2018 372k Pull Requests per month 2m Git commits per month 78,000Deployments per day 4.4m Builds per month 500m Test executions per day 500k Work items updated per day 5m Work items viewed per day Azure DevOps is the toolchain of choice for Microsoft internal engineering with over 90,000 internal users https://aka.ms/DevOpsAtMicrosoft
  • 52.
    Database tier AKS productioncluster Source code control Helm chart Inner loop Test Debug Azure DevSpaces AKS dev cluster Azure Container Registry Azure Pipelines/ DevOps Project Auto-build Business logic Front end Azure Monitor CI/CD
  • 54.
    Azure makes Kuberneteseasy Accelerate containerized application development Task The Old Way With Azure Build a containerized app and deploy to Kubernetes Build the app Write a Dockerfile Build the container image Push the container to a registry Write Kubernetes manifests/Helm chart Deploy to Kubernetes draft init to configure your environment draft create to auto-create Dockerfile/Helm chart draft up to deploy to Kubernetes Build a containerized app and deploy to Kubernetes Set up a local dev environment using Minikube Determine the transitive closure of your dependencies Identify behavior of dependencies for key test cases Stub out dependent services with expected behavior Make local changes, check-in, and hope things work Validate with application logs Use DevSpaces Do breakpoint debugging in your IDE Expose web apps to the internet with a DNS entry Deploy an ingress controller Create a load-balanced IP for it Add an ingress resource to your deployment Acquire a custom domain Create a DNS A-record for your service Turn HTTP application routing on in your cluster Add an ingress resource to your deployment
  • 55.
    Azure makes Kuberneteseasy Set up CI/CD in a few clicks Task The Old Way With Azure Set up a CI/CD pipeline and deploy to Kubernetes Create git repo Create a build pipeline Create a container registry Create a Kubernetes cluster Configure build pipeline to push to container registry Configure build pipeline to deploy to Kubernetes Create an Azure DevOps project with AKS as a target Make container images available for deployment worldwide Create a container registry in every region Configure build pipeline with multiple endpoints Loop through all regions and push following build Create an Azure Container Registry with geo-replication Push your image to a single endpoint Track health with consolidated cluster and application logs Choose a logging solution Deploy log stack in your cluster or provision a service Configure and deploy a logging agent onto all nodes Checkbox “container monitoring” in the Azure portal
  • 56.
     Build smallcontainers  Application architecture  Use Namespaces  Use helm charts  RBAC  Implement Health checks  Set requests and limits  Be mindful of your services  Map external services  Don’t rely on load balancers 5 Kubernetes Best Practices
  • 57.
  • 58.
  • 59.
    Secure your Kubernetesenvironment Compliant Kubernetes service with certifications covering SOC, HIPAA, and PCI Control access through AAD and RBAC Safeguard keys and secrets with Key Vault Secure network communications with VNET and CNI
  • 60.
    Scale and runwith confidence Built-in auto scaling Global data center Geo-replicated container registry Elastically burst using ACI Browser Traffic manager Geo-replicated container registry AKS clusters Azure Container Instances Pod Pod Pod Pod Pod Pod
  • 61.
    VM Pods VM Pods VM Pods VM Pods Kubernetes control pane Azure ContainerInstances (ACI) Pods ACI Connector Application Architect Infrastructure Architect Deployment/ tasks

Editor's Notes

  • #4 Microsoft Envision 2016
  • #10 S4 Solution Specialist Sales Summit
  • #11 Developers are going to come out with the idea, they are going to implement the idea, they are going to take the code that they write and then build it, test it, put it through the release process until it finally gets out into production where your customers can use it Every new feature that you build into your application is going to go through that lifecycle After your customers can get their hands on it, you can start to learn from it Development team can look at the customer usage data from the application, they can get feedback from the customer and they can start to plan and take educated decisions on what they want to do next 2 Important things to note about this development lifecycle First: The speed of the completing that loop (to build a new feature and to get it into the hands of your customers and have your customers start using it and learning from their usage) – the speed of completing that loop determines your business agility The faster we’re able to iterate through the loop, the more responsive you will be to customers and the quicker you will be able to innovate We need to focus on improving that loop as quickly as we can Second thing to note: Developers are adding value to the customer when they are working on the left side, writing new code and building new features Any time the developers spend in the middle of this diagram, all of this time will be lost in the eyes of the customer. Either building the delivery pipeline or handholding changes through that pipeline, all of that time will be lost in the eyes of your customers So what you want to do is maximize your time your developers are writing new features and minimize the time developers are spending in the middle
  • #12 And it’s really those 2 things that make the heart of the DevOps, the heart of DevOps is any efficiencies you might make, that can you drive, that helps you loop through this faster. And this is why it’s so confusing to implement DevOps. There are many things you can do here. You can make organizational changes, cultural changes, process changes, tool changes and I think that’s okay, anything that you can use to make improvements to this delivery pipeline and feedback loop count as DevOps
  • #13 You might also hear Pipeline as Code. Another newer term is GitOps. All of these practices help you
  • #18 Add in graphic from Codefresh layer example -
  • #19 Add in graphic from Codefresh layer example -
  • #21 Agile delivery is part of DevOps, so everything is starting to tie together.
  • #50 49
  • #51 50
  • #52 51
  • #58 57