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

Building Your Docker Tech Stack

Building Your Docker Tech Stack

This session will focus on the practicals of building a fully-functional stack of container cluster tools, with different options for stacking those tools from the OS-up.

We’ve all seen examples of common technologies stacks, like the good ol’ LAMP and MEAN stacks for apps, but what about lower-level infrastructure? And can we get it without cloud vendor lock-in please? Oh and pure containers and infrastructure-as-code too?

With Docker, sure thing! This session will cover:

Which OS/Distro and Kernel to use
VM’s or Bare Metal
Recommended Swarm architectures
Tool stacks for “pure open source”, “cloud-service based”, and “Docker EE” scenarios
Demos of these tools working together including InfraKit, Docker, Swarm, Flow-Proxy, ELK, Prometheus, REX-Ray, and more.

Bret Fisher

June 13, 2018
Tweet

More Decks by Bret Fisher

Other Decks in Technology

Transcript

  1. BRET FISHER Docker Captain, DevOps Dude, Author of Docker Mastery

    Building Your Docker Tech Stack bretfisher.com/dockercon18 @bretfisher
  2. People ask "Where's my LAMP for container clusters?" Your solutions

    will be a "stack" of infrastructure tools Cloud-native container tools are new We need patterns and examples of full cluster stacks Problem: No Server Tool Lives In Isolation
  3. Build examples of full-er/ish stacks on different tools Options for

    solo to medium-sized DevOps/Ops teams Use Docker Swarm latest stable as orchestrator Avoid cloud vendor lock-in* 4 Goals for Today * Lock-in: A service I can't swap out in my server stack
  4. Limit "going production Docker" project scope. Go Lean! Focus first

    on quality Dockerfiles Stay on your familiar host OS with 4.x Kernel Use base images of familiar OS (keep same pkg mgr) Swarm CE can be 1 or more nodes, use it everywhere Swarm EE is your "easy button" for security and ops Last Time On Bret's DockerCon Talk
  5. Two Stacks, Same Core Docker CE Swarm Used for Dev/Test

    Heavy use of OSS/free Gluttony of choice for 3rd party Newest engine features Docker EE Swarm Used for Staging/Prod Heavy use of paid support Use Docker Solution Briefs Mature engine with hotfixes + +
  6. EE Platform Architecture Physical Virtualization Public Cloud Platform Security Developer

    Services Registry Services Access Policies App Lifecycle Management Automation & Extensibility Networking Orchestration Storage Container Engine ENTERPRISE EDITION PLATFORM
  7. CE Platform Architecture Public Cloud Overlay Swarm Container Engine COMMUNITY

    EDITION PLATFORM Physical Virtualization Platform Security
  8. Cloud agnostic, minimal infra Apps auto-recover on node fail Incoming

    TLS Centralized logging Centralized monitoring Healthcheck all containers Infra Requirements of dogvs.cat Performance auto-scaling Self-healing nodes Support serverless functions Services highly available Han Solo Requirements Optional Requirements for Later
  9. Simple Infrastructure, Easy Deployment "How can I deploy a multi-tier

    app on a few servers, with all the bells and whistles of orchestration with load balancing and auto recovery?" Han Solo, The Sysadmin
  10. 3+ Droplets (Ubuntu 16.04) Block Storage (Volumes) Load Balancer (incoming

    HTTP) Digital Ocean dogvs.cat Services Needed for High Availability
  11. Open Source Stack Swarm GUI Portainer Central Monitoring Prometheus +

    Grafana Central Logging Elastic ELK Layer 7 Proxy Traefik + Let's Encrypt Storage REX-Ray + Digital Ocean Volumes Networking Docker Swarm Overlay Orchestration Docker Swarm Runtime Docker CE HW / OS Docker Machine + Digital Ocean
  12. Deploy Proxy Stack: Traefik with Let's Encrypt docker network create

    --driver overlay proxy docker stack deploy -c stack-proxy.yml proxy http://www.dogvs.cat:8080/dashboard/
  13. Deploy Ops Stacks: Prometheus + ELK + Portainer docker stack

    deploy -c stack-swarmprom.yml prom docker stack deploy -c stack-elk.yml elk docker stack deploy -c stack-portainer.yml portainer
  14. Our Apps: Voting + Ghost + Static Site docker stack

    deploy -c stack-ghost.yml ghost docker stack deploy -c stack-voting.yml vote docker stack deploy -c stack-menu.yml menu
  15. Security? host setup scanning: Docker Bench image scanning: Aqua Microscanner

    behavior monitoring: Sysdig Falco user namespaces
  16. Next Steps more nodes? make 'em workers CI/CD stacks: gitlab,

    jenkins make redis, mysql, psql HA add app metrics to Prometheus swap Overlay for Weave Net swap ELK for Papertrail, etc. swap Prometheus for Sysdig, Datadog, Librato, etc. add socat proxy to Traefik
  17. Complex Infrastructure, Harder Deployment "How can I deploy many multi-tier

    app on a many servers, with all the b e l l s a n d w h i s t l e s o f H A orchestration, have load balancing at all levels, with failover and auto recovery?" Amazonian Team
  18. CE Platform Architecture Physical Virtualization Public Cloud Platform Security Networking

    Orchestration Container Engine COMMUNITY EDITION PLATFORM
  19. EE Platform Architecture Physical Virtualization Public Cloud Platform Security Developer

    Services Registry Services Access Policies App Lifecycle Management Automation & Extensibility Networking Orchestration Storage Container Engine ENTERPRISE EDITION PLATFORM
  20. Docker EE on AWS Stack Swarm GUI Docker EE UCP

    Central Monitoring AWS Cloudwatch + Telegraph Central Logging AWS Cloudwatch Logs Registry Docker EE DTR Layer 7 Proxy HTTP Routing Mesh (Interlock+Nginx) Storage Docker Cloudstor EBS/EFS Networking Docker Swarm Overlay Orchestration Docker Swarm Runtime Docker EE HW / OS Terraform + Ansible + AWS
  21. Advantages more flexible deployment tools more SecOps tools ops tools

    are fully HA ops tools are team-ready deploy to K8s just as easy
  22. Deploy Apps docker stack deploy -c stack-ghost.yml ghost docker stack

    deploy -c stack-voting.yml vote docker stack deploy -c stack-menu.yml menu
  23. Next Steps All the things in Swarm CE monitoring via

    CloudWatch and Telegraph logging via CloudWatch Logs
  24. Summary Infrastructure as code, make everything repeatable No "special" nodes,

    use remote management Grow as you go, assume you'll resize Look for compose files of popular tools to make stacks Don't throw out the good in search of the perfect
  25. PLEASE VOTE SO I WIN ALL THE DOCKERS FRIDAY! Thanks!

    bretfisher.com/dockercon18 "Building Your Docker Tech Stack"