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

Docker for .NET Developers (45 min version)

Docker for .NET Developers (45 min version)

In this talk Steve will take you on a tour of Docker, a modern application packaging and containerisation technology that .NET developers can now leverage. Steve will share with you the Docker journey that his team are on, exploring their motivations for using Docker. You will learn the core terminology .NET developers need to know to begin working with Docker and explore demos that show how you can start using Docker with your own ASP.NET Core projects. Finally, Steve will demonstrate how he and his team have built a deployment pipeline using Jenkins and explore the AWS EC2 Container Services (ECS) configuration they have created to enable rapid, continuous delivery of their microservices.

Steve Gordon

August 22, 2017
Tweet

More Decks by Steve Gordon

Other Decks in Technology

Transcript

  1. Technology that unlocks the value of your professional audience Docker

    for .NET Developers Steve Gordon - Senior Software Developer Madgex Ltd Blog: stevejgordon.co.uk Twitter: @stevejgordon
  2. Technology that unlocks the value of your professional audience What

    we’ll cover • Our journey To Docker • Why use Docker? • What is Docker? • dockerfiles and docker-compose • Using Jenkins for builds • Running containers on AWS ECS
  3. Technology that unlocks the value of your professional audience What

    is Docker? • Containerisation and application platform • Images are lightweight, standalone packages for an application • Package includes all dependencies as a single unit of deployment • Containers run securely and in isolation • Frictionless development and deployment
  4. Technology that unlocks the value of your professional audience Lightweight

    Significantly smaller resource footprint Small unit of deployment Smaller file size Containers vs. Virtual Machines SERVER HOST OS HYPERVISOR GUEST OS GUEST OS BINS / LIBS BINS / LIBS APP B APP A SERVER HOST OS DOCKER ENGINE BINS / LIBS APP A BINS / LIBS APP C BINS / LIBS APP B Reliability Trust that what worked locally will work in production Fast start-up Can start in under 1 second
  5. Technology that unlocks the value of your professional audience Microservice

    based Single responsibility. Discrete scaling .NET Core & ASP.NET Core Cross platform. Improved performance API driven SPA ASP.NET Core APIs Madgex Insights
  6. Technology that unlocks the value of your professional audience Insights

    Architecture FRONT END SPA USER API SCHEDULE API REPORT API QUERY API ELASTICSEARCH
  7. Technology that unlocks the value of your professional audience Motivation

    1: Developer Workflow PULL CLIENT PROJECT PULL PLATFORM BUILD x2 EDIT DOCKER-COMPOSE PULL EDIT DOCKER-COMPOSE UP -D
  8. Technology that unlocks the value of your professional audience “This

    is amazing!” James Wragg (Senior Front End Developer at Madgex)
  9. Technology that unlocks the value of your professional audience Anatomy

    of an image OS FILE SYSTEM – DEBIAN DEPENDENCIES (PACKAGES) - CURL DEPENDENCIES (PACKAGES) - SCM .NET CORE SDK AND CLI ASP.NET CORE NUGET PACKAGE CACHE YOUR ASP.NET APPLICATION SCRATCH
  10. Technology that unlocks the value of your professional audience Demo

    docker-compose Build and run multiple images
  11. Technology that unlocks the value of your professional audience Amazon

    ECS Services Manage how tasks run and scale. ALB CLUSTER EC2 INSTANCE ECS AGENT TASK A TASK B EC2 INSTANCE ECS AGENT TASK A TASK B TASK B SERVICE A Desired Count = 2 Task Def = Task Def A SERVICE B Desired Count = 4 Task Def = Task Def B Task Definition A recipe to execute your application TASK B ECS is a Managed Service No patching or maintenance Cluster Logical grouping of EC2 instances ALB Share a single ALB with path routing to multiple services Task A running instance of a task definition
  12. Technology that unlocks the value of your professional audience Demo

    Deploying to AWS ECS using Docker and Jenkins
  13. Technology that unlocks the value of your professional audience Challenges

    and lessons learnt • There is a learning curve… but it's shallow at first • Start with basic dockerfiles - Innovate in stages • Get started just by using a pre-built image e.g. Postgres • Amazon ECS a little complex • Use CloudFormation to define ECS environments • Vendor Lock • Logging • Placement of containers – Balance memory/memory reservation
  14. Technology that unlocks the value of your professional audience Benefits

    • Improved developer productivity and reduced onboarding time • No more "it runs on my machine" arguments • Dependable deployments • Simple build and deploy process • Zero downtime, fast, continuous deployments • Lower costs
  15. Technology that unlocks the value of your professional audience Thank

    you Steve Gordon @stevejgordon stevejgordon.co.uk https://www.meetup.com/dotnetsoutheast