SlideShare uma empresa Scribd logo
1 de 26
Baixar para ler offline
Container
Orchestration with
TRAEFIK
On Docker Swarm
Jakub Hajek / Cometari

Technical consultant & Founder
July 25th, 2019
Introduction
• I am the owner and technical consultant working for Cometari
• I have been system admin since 1998.
• Cometari is an agency implementing DevOps culture, providing consultancy,
workshops and software services.
• Our areas of expertise are DevOps, Elastic Stack (log analysis), Cloud
Computing.
• We are very deeply involved in the travel tech industry, however our solutions
go much further than just integrating travel API’s.
—
“I strongly believe that implementing DevOps
culture, across the entire organisation, should
provide measurable value and solve the real
issue rather than generate a new one.”
What will be presented
• Key features of Traefik working together with Docker Swarm
• Demo of fully fledged environment running on 4 nodes working as Swarm
cluster.
• Three application stacks will be deployed:
• Replicated Traefik instances with Consul cluster (BETA)
• Frontend app with simple NodeJS Backend
TRAEFIK key features
TRAEFIK key features
• Modern HTTP reverse proxy and load balancer for micro services working with
Docker Swarm and Kubernetes - just need to point Traefik into your
orchestrator
• Continuously update configuration, no restarts required
• Integration with Let’s Encrypt!
• Immutable image deployed on a cluster
• Configuration done via Docker labels on a service level
Challenges with TRAEFIK and SSL
Challenges with HA and SSL
• We need to have more than one instance of Traefik to provide HA
• Each instance needs to have access to certificates which are already generated
• Docker keeps the persistence locally, no easy way to share the data for other
Traefik instances
• Each component should be stateless, so how to deal with persistence
What is the SOLUTION?
TRAEFIK with CONSUL CLUSTER
• Running Consul cluster consisting of 3+1 nodes
• Keeping the persistence data in Consul, Key - value store
• Each Traefik instance can have access to Consul
• Traefik can keep up to 100 SSL certs
• Data are compressed to reduce the size
• We can easily scale horizontally TRAEFIK instances and still have access to our
SSL certs
TRAEFIK IMAGE with built in SSL certs
• Custom image with Traefik with added SSL certs into the image
• Works perfectly if you bought certs from a external provider
• Scalability is simple, no need to care about data persistence
DOCKER SWARM key features
Declarative service model
Replicas =3
Scalability in SWARM
Routing mesh
NODE_3NODE_2NODE_1
Demo environment
Demo environment in details
• Running on 4 virtual machines accessible from Internet
• VM’s have already installed the latest version of Docker
• Swarm cluster is already created
• Three stacks are deployed: Traefik with Consul and App stack
• DNS round robin for each domains used in the demo
• Route 53 (AWS) manages health-checks to update DNS records in case of failure of any VMs
• Domains:
• node-app.labs.cometari.eu
• traefik.labs.cometari.eu
• consul.labs.cometari.eu
• viz.labs.cometari.eu
• 3 overlay networks
• SSL Certificates issued by Let’s Encrypt and managed via TRAEFIK
• Consul cluster stores SSL certificates in KV store
• TRAEFIK Edge router is connected with Consul cluster
• WEB server with Frontend app connected to NodeJS backend (optional
service: might be responsible for caching static content)
Demo environment in details
Diagram of demo environment
DOCKER overlay networks
Diagram of the architecture from the service
perspective
SHOW ME THE CODE!
Overview of STACK FILES!
Summary
• Fully fledged example of multi tier application stack
• Straightforward configuration, everything is code!
• Immutable images, custom configuration managed by injecting environment
variables
• Easy way to scale up / down a service
• Automatically exposed new services thanks to TRAEFIK, no need to prepare
manually a config files
• Managing of SSL certs is managed in easy way!
• Infrastructure as code!
Links
• The source code is available at https://github.com/jakubhajek/traefik-consul-
swarm
• The official Traefik documentation: https://docs.traefik.io/v1.7/configuration/
backends/docker/
• The official Docker Swarm documentation: https://docs.docker.com/engine/
swarm/
• Compose file version 3 references: https://docs.docker.com/compose/
compose-file/
Thank You!
Jakub Hajek
Cometari
@_jakubhajek
kuba@cometari.com

Mais conteúdo relacionado

Mais procurados

SRE and GitOps for Building Robust Kubernetes Platforms.pdf
SRE and GitOps for Building Robust Kubernetes Platforms.pdfSRE and GitOps for Building Robust Kubernetes Platforms.pdf
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
Weaveworks
 

Mais procurados (20)

Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Free GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOpsFree GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOps
 
Let’s unbox Rancher 2.0 <v2.0.0>
Let’s unbox Rancher 2.0 <v2.0.0>  Let’s unbox Rancher 2.0 <v2.0.0>
Let’s unbox Rancher 2.0 <v2.0.0>
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Helm.pptx
Helm.pptxHelm.pptx
Helm.pptx
 
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
SRE and GitOps for Building Robust Kubernetes Platforms.pdfSRE and GitOps for Building Robust Kubernetes Platforms.pdf
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
 
CI/CD with Openshift and Jenkins
CI/CD with Openshift and JenkinsCI/CD with Openshift and Jenkins
CI/CD with Openshift and Jenkins
 
Rancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep DiveRancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep Dive
 
Intro to Helm for Kubernetes
Intro to Helm for KubernetesIntro to Helm for Kubernetes
Intro to Helm for Kubernetes
 
Microsoft Azure IaaS and Terraform
Microsoft Azure IaaS and TerraformMicrosoft Azure IaaS and Terraform
Microsoft Azure IaaS and Terraform
 
Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!
 
Terraform and Weave GitOps: Build a Fully Automated Application Stack
Terraform and Weave GitOps: Build a Fully Automated Application StackTerraform and Weave GitOps: Build a Fully Automated Application Stack
Terraform and Weave GitOps: Build a Fully Automated Application Stack
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
Cncf checkov and bridgecrew
Cncf checkov and bridgecrewCncf checkov and bridgecrew
Cncf checkov and bridgecrew
 
The journey to GitOps
The journey to GitOpsThe journey to GitOps
The journey to GitOps
 
Intro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdfIntro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdf
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
 
Kubernetes 101
Kubernetes   101Kubernetes   101
Kubernetes 101
 
Rancher Rodeo 13 mai 2022
Rancher Rodeo 13 mai 2022Rancher Rodeo 13 mai 2022
Rancher Rodeo 13 mai 2022
 

Semelhante a Container Orchestration with Traefk on Docker Swarm

Semelhante a Container Orchestration with Traefk on Docker Swarm (20)

Evénement Docker Paris: Anticipez les nouveaux business model et réduisez vos...
Evénement Docker Paris: Anticipez les nouveaux business model et réduisez vos...Evénement Docker Paris: Anticipez les nouveaux business model et réduisez vos...
Evénement Docker Paris: Anticipez les nouveaux business model et réduisez vos...
 
Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
Webinar : Docker in Production
Webinar : Docker in ProductionWebinar : Docker in Production
Webinar : Docker in Production
 
DockerPenang Meetup#1
DockerPenang Meetup#1DockerPenang Meetup#1
DockerPenang Meetup#1
 
(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...
(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...
(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...
 
56k.cloud training
56k.cloud training56k.cloud training
56k.cloud training
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
 
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
 
Container Orchestration
Container OrchestrationContainer Orchestration
Container Orchestration
 
Containers Made secure and easy with Docker EE 2.0
Containers Made secure and easy with Docker EE 2.0Containers Made secure and easy with Docker EE 2.0
Containers Made secure and easy with Docker EE 2.0
 
Continuous Integration with Amazon ECS and Docker
Continuous Integration with Amazon ECS and DockerContinuous Integration with Amazon ECS and Docker
Continuous Integration with Amazon ECS and Docker
 
Session Slides from DEVintersection Europe
Session Slides from DEVintersection EuropeSession Slides from DEVintersection Europe
Session Slides from DEVintersection Europe
 
My session slides from unityConnect 2016 in Haarlem
My session slides from unityConnect 2016 in HaarlemMy session slides from unityConnect 2016 in Haarlem
My session slides from unityConnect 2016 in Haarlem
 
Global Azure Bootcamp: Azure service fabric
Global Azure Bootcamp: Azure service fabric Global Azure Bootcamp: Azure service fabric
Global Azure Bootcamp: Azure service fabric
 
Orchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failuresOrchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failures
 
Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...
Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...
Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...
 
DockerCon EU 2015 Barcelona
DockerCon EU 2015 BarcelonaDockerCon EU 2015 Barcelona
DockerCon EU 2015 Barcelona
 
Moving Applications into Azure Kubernetes
Moving Applications into Azure KubernetesMoving Applications into Azure Kubernetes
Moving Applications into Azure Kubernetes
 
Migrating the GoPro Plus Cloud Service to Amazon ECS
Migrating the GoPro Plus Cloud Service to Amazon ECSMigrating the GoPro Plus Cloud Service to Amazon ECS
Migrating the GoPro Plus Cloud Service to Amazon ECS
 

Mais de Jakub Hajek

Mais de Jakub Hajek (8)

Traefik 2.x features - canary deployment with Traefik and K3S
Traefik 2.x features - canary deployment with Traefik and K3STraefik 2.x features - canary deployment with Traefik and K3S
Traefik 2.x features - canary deployment with Traefik and K3S
 
Canary deployment with Traefik and K3S
Canary deployment with Traefik and K3SCanary deployment with Traefik and K3S
Canary deployment with Traefik and K3S
 
Traefik as an open source edge router for microservice architectures
Traefik as an open source edge router for microservice architecturesTraefik as an open source edge router for microservice architectures
Traefik as an open source edge router for microservice architectures
 
Container Orchestration with Traefik 2.x
Container Orchestration with Traefik 2.xContainer Orchestration with Traefik 2.x
Container Orchestration with Traefik 2.x
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
 
Cometari Dedicated Solutions Company Presentation
Cometari Dedicated Solutions Company PresentationCometari Dedicated Solutions Company Presentation
Cometari Dedicated Solutions Company Presentation
 
Cometari Dedicated Solutions Oferta ogólna
Cometari Dedicated Solutions Oferta ogólnaCometari Dedicated Solutions Oferta ogólna
Cometari Dedicated Solutions Oferta ogólna
 
Cometari Dedicated Solutions General Offer
Cometari Dedicated Solutions General OfferCometari Dedicated Solutions General Offer
Cometari Dedicated Solutions General Offer
 

Último

Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
 
一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理
F
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Monica Sydney
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书
F
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
AS
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理
F
 

Último (20)

Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
 
Research Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptxResearch Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptx
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
Local Call Girls in Gomati 9332606886 HOT & SEXY Models beautiful and charmi...
Local Call Girls in Gomati  9332606886 HOT & SEXY Models beautiful and charmi...Local Call Girls in Gomati  9332606886 HOT & SEXY Models beautiful and charmi...
Local Call Girls in Gomati 9332606886 HOT & SEXY Models beautiful and charmi...
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理
 

Container Orchestration with Traefk on Docker Swarm

  • 1. Container Orchestration with TRAEFIK On Docker Swarm Jakub Hajek / Cometari Technical consultant & Founder July 25th, 2019
  • 2. Introduction • I am the owner and technical consultant working for Cometari • I have been system admin since 1998. • Cometari is an agency implementing DevOps culture, providing consultancy, workshops and software services. • Our areas of expertise are DevOps, Elastic Stack (log analysis), Cloud Computing. • We are very deeply involved in the travel tech industry, however our solutions go much further than just integrating travel API’s.
  • 3. — “I strongly believe that implementing DevOps culture, across the entire organisation, should provide measurable value and solve the real issue rather than generate a new one.”
  • 4. What will be presented • Key features of Traefik working together with Docker Swarm • Demo of fully fledged environment running on 4 nodes working as Swarm cluster. • Three application stacks will be deployed: • Replicated Traefik instances with Consul cluster (BETA) • Frontend app with simple NodeJS Backend
  • 6. TRAEFIK key features • Modern HTTP reverse proxy and load balancer for micro services working with Docker Swarm and Kubernetes - just need to point Traefik into your orchestrator • Continuously update configuration, no restarts required • Integration with Let’s Encrypt! • Immutable image deployed on a cluster • Configuration done via Docker labels on a service level
  • 8. Challenges with HA and SSL • We need to have more than one instance of Traefik to provide HA • Each instance needs to have access to certificates which are already generated • Docker keeps the persistence locally, no easy way to share the data for other Traefik instances • Each component should be stateless, so how to deal with persistence
  • 9. What is the SOLUTION?
  • 10. TRAEFIK with CONSUL CLUSTER • Running Consul cluster consisting of 3+1 nodes • Keeping the persistence data in Consul, Key - value store • Each Traefik instance can have access to Consul • Traefik can keep up to 100 SSL certs • Data are compressed to reduce the size • We can easily scale horizontally TRAEFIK instances and still have access to our SSL certs
  • 11. TRAEFIK IMAGE with built in SSL certs • Custom image with Traefik with added SSL certs into the image • Works perfectly if you bought certs from a external provider • Scalability is simple, no need to care about data persistence
  • 12. DOCKER SWARM key features
  • 17. Demo environment in details • Running on 4 virtual machines accessible from Internet • VM’s have already installed the latest version of Docker • Swarm cluster is already created • Three stacks are deployed: Traefik with Consul and App stack • DNS round robin for each domains used in the demo • Route 53 (AWS) manages health-checks to update DNS records in case of failure of any VMs • Domains: • node-app.labs.cometari.eu • traefik.labs.cometari.eu • consul.labs.cometari.eu • viz.labs.cometari.eu
  • 18. • 3 overlay networks • SSL Certificates issued by Let’s Encrypt and managed via TRAEFIK • Consul cluster stores SSL certificates in KV store • TRAEFIK Edge router is connected with Consul cluster • WEB server with Frontend app connected to NodeJS backend (optional service: might be responsible for caching static content) Demo environment in details
  • 19. Diagram of demo environment
  • 21. Diagram of the architecture from the service perspective
  • 22. SHOW ME THE CODE! Overview of STACK FILES!
  • 23. Summary • Fully fledged example of multi tier application stack • Straightforward configuration, everything is code! • Immutable images, custom configuration managed by injecting environment variables • Easy way to scale up / down a service • Automatically exposed new services thanks to TRAEFIK, no need to prepare manually a config files • Managing of SSL certs is managed in easy way! • Infrastructure as code!
  • 24. Links • The source code is available at https://github.com/jakubhajek/traefik-consul- swarm • The official Traefik documentation: https://docs.traefik.io/v1.7/configuration/ backends/docker/ • The official Docker Swarm documentation: https://docs.docker.com/engine/ swarm/ • Compose file version 3 references: https://docs.docker.com/compose/ compose-file/