SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
Microservices and Docker Swarm
Who am I?
Alberto Guimarães Viana
Goiano, atualmente moro em Hamburg/Alemanha
E-mail: albertogviana@gmail.com
Twitter: @albertogviana
Github: https://github.com/albertogviana
Project
■ https://www.getrevue.co/profile/devops-week-news
■ https://twitter.com/devopsweeknews
Presentation
https://github.com/albertogviana/docker-swarm-presentation
What is a microservice?
■ Small, and Focused on Doing One Thing Well
■ Autonomous
Building Microservices by Sam Newman
Docker
Docker ecosystem
■ Docker Engine
■ Docker Swarm
■ Docker Registry
■ Docker Machine
■ Docker Compose
Docker Swarm
Swarm Features
■ Highly-available, distributed store based on Raft (Service discovery)
■ Cluster management integrated with Docker Engine
■ Declarative service model
■ Scaling
■ Desired state reconciliation
■ Multi-host networking
■ Load balancing
■ Secure by default
■ Rolling updates
Service Discovery
■ All other orchestration systems use a key/value store
(k8s→etcd, nomad→consul, mesos→zookeeper, etc.)
■ Swarm stores information directly in Raft
■ Analogy courtesy of @aluzzardi:
It's like B-Trees and RDBMS. They are different layers, often associated. But you don't need
to bring up a full SQL server when all you need is to index some data.
■ As a result, the orchestrator has direct access to the data
(the main copy of the data is stored in the orchestrator's memory)
■ Simpler, easier to deploy and operate; also faster
Swarm concept
■ A node can be a manager or a worker
■ A manager actively takes part in the Raft consensus
■ You can talk to a manager using the Swarm API
■ One manager is elected as the leader; other managers merely forward
requests to it
■ Using the API, you can indicate that you want to run a service
Swarm concept
■ A service is specified by its desired state: which image, how many instances...
■ The leader uses different subsystems to break down services into tasks:
orchestrator, scheduler, allocator, dispatcher
■ A task corresponds to a specific container, assigned to a specific node
■ Nodes know which tasks should be running, and will start or stop containers
accordingly (through the Docker Engine API)
Swarm Mode
■ Docker Engine 1.12 features SwarmKit integration
■ The Docker CLI features three new commands:
○ docker swarm (enable Swarm mode; join a Swarm; adjust cluster
parameters)
○ docker node (view nodes; promote/demote managers; manage nodes)
○ docker service (create and manage services)
Build swarm cluster
Visualizing the cluster
Adding nodes to the cluster
Security
Under the hood
■ When we do docker swarm init, a TLS root CA is created. Then a keypair is
issued for the first node, and signed by the root CA.
■ When further nodes join the Swarm, they are issued their own keypair, signed
by the root CA, and they also receive the root CA public key and certificate.
■ All communication is encrypted over TLS.
■ The node keys and certificates are automatically renewed on regular intervals
(by default, 90 days; this is tunable with docker swarm update).
Docker Service
Routing Mesh
Routing Mesh
Scaling a service
Reverse Proxy
Dockerfile
Rolling Updates
Docker secret
Docker Node
Docker system?
What now?
Metrics
■ Prometheus
■ cAdvisor
■ InfluxDB
Logging
■ ElasticSearch, Kibana and Logstash (ELK)
■ FluentD
■ Loggly
■ Graylog
■ gliderlabs/logspout
Dashboards
■ Grafana (https://grafana.net/dashboards/609)
Book
Questions?
E-mail: albertogviana@gmail.com
Thank you! Obrigado!

Mais conteúdo relacionado

Mais procurados

Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Simplilearn
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
Docker, Inc.
 

Mais procurados (20)

Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
Intro to containerization
Intro to containerizationIntro to containerization
Intro to containerization
 
What is Docker
What is DockerWhat is Docker
What is Docker
 
Docker
DockerDocker
Docker
 
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
 
Docker and Kubernetes 101 workshop
Docker and Kubernetes 101 workshopDocker and Kubernetes 101 workshop
Docker and Kubernetes 101 workshop
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Docker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker SlidesDocker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker Slides
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking Overview
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Docker introduction & benefits
Docker introduction & benefitsDocker introduction & benefits
Docker introduction & benefits
 

Semelhante a Docker swarm

Semelhante a Docker swarm (20)

Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0
 
Docker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-templateDocker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-template
 
Swarm mode
Swarm modeSwarm mode
Swarm mode
 
Orchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failuresOrchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failures
 
Introducing Docker Swarm - the orchestration tool by Docker
Introducing Docker Swarm - the orchestration tool by DockerIntroducing Docker Swarm - the orchestration tool by Docker
Introducing Docker Swarm - the orchestration tool by Docker
 
Docker swarm introduction
Docker swarm introductionDocker swarm introduction
Docker swarm introduction
 
9th docker meetup 2016.07.13
9th docker meetup 2016.07.139th docker meetup 2016.07.13
9th docker meetup 2016.07.13
 
Docker Swarm Mode Orchestration
Docker Swarm Mode OrchestrationDocker Swarm Mode Orchestration
Docker Swarm Mode Orchestration
 
Dokcer swarm
Dokcer swarmDokcer swarm
Dokcer swarm
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
 
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub HajekJDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
 
Docker-machine
Docker-machineDocker-machine
Docker-machine
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
 
Swarm: Native Docker Clustering
Swarm: Native Docker ClusteringSwarm: Native Docker Clustering
Swarm: Native Docker Clustering
 
Deploying and managing IBM MQ in the Cloud
Deploying and managing IBM MQ in the CloudDeploying and managing IBM MQ in the Cloud
Deploying and managing IBM MQ in the Cloud
 
Swarm migration
Swarm migrationSwarm migration
Swarm migration
 
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
 
Docker and CloudStack
Docker and CloudStackDocker and CloudStack
Docker and CloudStack
 
Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

Docker swarm