SlideShare a Scribd company logo
1 of 19
DISCOVER/REGISTER
EVERYTHING IN CONSUL
EVERYTHING DISCOVERD USING CONSUL-TEMPLATE AND CONSUL.
AGENDA
• Service Discovery introduction
• Benefits
• Consul service Discovery – Registration checks/services
• Consul templates
• Haproxy, Bind9 and iptables auto-Discovery
• Demo
INTRODUCTION
The basic idea behind
service discovery is for each
new instance of a service (or
an application) to be able to
identify its current
environment and store that
information. For example, if
you spawn a service that
service must provide
information to populate other
service like spawn services
to populate load
balancer,DNS,firewall and
others services.
SERVICE DISCOVERY - BENEFITS
• Centralized information for services
• One or more information can be used for many services
• Distribuited services can process information at the same time making
faster workflow/pipeline
• Simple implemention and standardized architecture for all services
• Easy way to rollback or continue workflow
CONSUL – REGISTERING CHECKS/SERVICES
Registering checks to add health checks in our services, that prevent using services that are
unhealthy.In our case we are going to create a unique check localhost avoiding creating a lot checks for
each node.
** You can choose many checks like http,tcp,checks and TTL.
CONSUL – REGISTERING SERVICES
Registering service associating with the checks/health checks, you can add more node just modifying
the ID and Address
REGISTERING/DEREGISTERING WAYS
• Nomad has fully integration with consul and you can set the registration in job config file.
• Consul agent can register services/checks/ using simple json config file.
• Registrator can be used to listen docker events to register on consul.
• Systemd can be used with ExecStartPre, ExecStop to send registration/deregistration API.
• We can send API directly from services/applications.
CONSUL-TEMPLATE
Consul Template queries a Consul servers and updates any number of config
templates/ files and could reload the configuration (it´s like confd service does from
CoreOS).It uses “go template” to rendering config file.
CONSUL TEMPLATE FOR API-INTEGRATION
Some services/products don´t use much config file but Most of the time
it has a good API suport. So If tha´t is the case, you can still use consul
template to get information from consul and convert to a json format
directly.Like consul-f5 Project does. It populate a json file from consul
about your instances and send API to f5 to create VS and pool. You can
create servisse like this for any product which supports API.
DEMO - CONSUL TEMPLATE
• Auto-discover nodes for Load Balancer (Haproxy (tcp e http)
• Auto-Discovery DNS records (Bind dns records)
• Auto-Discovery iptables RULES (allow external access DNAT )
Consul Template uses go template to rendering config file and supports send notifications
and exec commands after some changes (new registration/deregistration).It can be
adapted for almost any case but we are going to show some basics in our case showing
how powerfull is it. Following methods we are going to show:
SERVICE DISCOVERY - HAPROXY
• We are going to register 4 tags associated with the services : Port, external
ip address, dns records + domain, protocol.
• If a service register a “http service”, consul template is going to populate
acl´s inside same frontend to send to correct backend in haproxy config file.
(we setup it to use same ip address for many domains)
• If a service register a “tcp service” , consul template is going to populate a
new frontend with the backend associated.
TESTING CONSUL-TEMPLATE HAPROXY
IN Out
As you can see we have different configs for tcp and http services. It was populated based
on Tags by Consul-template.
TESTING - SERVICE DISCOVERY - BIND
TESTING - SERVICE DISCOVERY - IPTABLES
IN Out
TESTING ALL TOGETHER I -
Checking if everything is clean
TESTING ALL TOGETHER II -
TESTING ALL TOGETHER III – HAPROXY
CONFIG FILE POPULATED
TESTING ALL TOGETHER III –
BIND/IPTABLES CONFIG FILE POPULATED
THANK YOU!
Questions?
More Information:
Linkedin:
https://www.linkedin.com/in/leandro-totino-pereira
Facebook:
www.facebook.com/leandro.totinopereira

More Related Content

What's hot

Welcome Azure Functions 2. 0
Welcome Azure Functions 2. 0Welcome Azure Functions 2. 0
Welcome Azure Functions 2. 0Massimo Bonanni
 
Building Thick Clients with Tower in Rust
Building Thick Clients with Tower in RustBuilding Thick Clients with Tower in Rust
Building Thick Clients with Tower in RustLucio Franco
 
The burden of a successful feature: Scaling our real time logging platform
The burden of a successful feature: Scaling our real time logging platformThe burden of a successful feature: Scaling our real time logging platform
The burden of a successful feature: Scaling our real time logging platformFastly
 
Postman tests in jenkins
Postman tests in jenkinsPostman tests in jenkins
Postman tests in jenkinsAlex Galkin
 
ONAP SDC - Model driven design
ONAP SDC - Model driven designONAP SDC - Model driven design
ONAP SDC - Model driven designEden Rozin
 
Driving Service Reliability Through Autoscaling Workloads on OpenShift
Driving Service Reliability Through Autoscaling Workloads on OpenShiftDriving Service Reliability Through Autoscaling Workloads on OpenShift
Driving Service Reliability Through Autoscaling Workloads on OpenShiftDevOps.com
 
Stuff we noticed while building "Asterisk in the cloud"
Stuff we noticed while building "Asterisk in the cloud"Stuff we noticed while building "Asterisk in the cloud"
Stuff we noticed while building "Asterisk in the cloud"troyd
 
Version Control ThinkVitamin
Version Control ThinkVitaminVersion Control ThinkVitamin
Version Control ThinkVitaminAlex Hillman
 
KFServing and Kubeflow Pipelines
KFServing and Kubeflow PipelinesKFServing and Kubeflow Pipelines
KFServing and Kubeflow PipelinesAnimesh Singh
 
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYCThe Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYCAmbassador Labs
 
Creating the application
Creating the applicationCreating the application
Creating the applicationJason Noble
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...Amazon Web Services
 
Navigate Data Service using AWS
Navigate Data Service using AWSNavigate Data Service using AWS
Navigate Data Service using AWSArno Broekhof
 

What's hot (19)

Welcome Azure Functions 2. 0
Welcome Azure Functions 2. 0Welcome Azure Functions 2. 0
Welcome Azure Functions 2. 0
 
Building Thick Clients with Tower in Rust
Building Thick Clients with Tower in RustBuilding Thick Clients with Tower in Rust
Building Thick Clients with Tower in Rust
 
The burden of a successful feature: Scaling our real time logging platform
The burden of a successful feature: Scaling our real time logging platformThe burden of a successful feature: Scaling our real time logging platform
The burden of a successful feature: Scaling our real time logging platform
 
Projects
ProjectsProjects
Projects
 
Composer intro
Composer introComposer intro
Composer intro
 
Compute @ edge
Compute @ edgeCompute @ edge
Compute @ edge
 
Postman tests in jenkins
Postman tests in jenkinsPostman tests in jenkins
Postman tests in jenkins
 
ONAP SDC - Model driven design
ONAP SDC - Model driven designONAP SDC - Model driven design
ONAP SDC - Model driven design
 
Driving Service Reliability Through Autoscaling Workloads on OpenShift
Driving Service Reliability Through Autoscaling Workloads on OpenShiftDriving Service Reliability Through Autoscaling Workloads on OpenShift
Driving Service Reliability Through Autoscaling Workloads on OpenShift
 
Readme
ReadmeReadme
Readme
 
Stuff we noticed while building "Asterisk in the cloud"
Stuff we noticed while building "Asterisk in the cloud"Stuff we noticed while building "Asterisk in the cloud"
Stuff we noticed while building "Asterisk in the cloud"
 
Version Control ThinkVitamin
Version Control ThinkVitaminVersion Control ThinkVitamin
Version Control ThinkVitamin
 
Pie on AWS
Pie on AWSPie on AWS
Pie on AWS
 
KFServing and Kubeflow Pipelines
KFServing and Kubeflow PipelinesKFServing and Kubeflow Pipelines
KFServing and Kubeflow Pipelines
 
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYCThe Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
 
Creating the application
Creating the applicationCreating the application
Creating the application
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
 
Navigate Data Service using AWS
Navigate Data Service using AWSNavigate Data Service using AWS
Navigate Data Service using AWS
 
Intro to.net core 20170111
Intro to.net core   20170111Intro to.net core   20170111
Intro to.net core 20170111
 

Similar to Discover/Register Everything in consul

Kubernetes101 - Pune Kubernetes Meetup 6
Kubernetes101 - Pune Kubernetes Meetup 6Kubernetes101 - Pune Kubernetes Meetup 6
Kubernetes101 - Pune Kubernetes Meetup 6Harshal Shah
 
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)Nicolas Brousse
 
Service Discovery and Registration in a Microservices Architecture
Service Discovery and Registration in a Microservices ArchitectureService Discovery and Registration in a Microservices Architecture
Service Discovery and Registration in a Microservices ArchitecturePLUMgrid
 
Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...Aptible
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administratorsSharon James
 
FOSDEM19 MySQL Component Infrastructure
FOSDEM19 MySQL Component InfrastructureFOSDEM19 MySQL Component Infrastructure
FOSDEM19 MySQL Component InfrastructureGeorgi Kodinov
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Amazon Web Services
 
autumo ifaceX - Product Presentation
autumo ifaceX - Product Presentationautumo ifaceX - Product Presentation
autumo ifaceX - Product PresentationMichael Gasche
 
Introduction To Apache Camel
Introduction To Apache CamelIntroduction To Apache Camel
Introduction To Apache CamelKnoldus Inc.
 
Hia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyHia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyAndrew Coleman
 
Service Discovery in MicroServices
Service Discovery in MicroServicesService Discovery in MicroServices
Service Discovery in MicroServicesSRINIVAS KOLAPARTHI
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to KubernetesVishal Biyani
 
HL7 Survival Guide - Chapter 10 – Process and Workflow
HL7 Survival Guide - Chapter 10 – Process and WorkflowHL7 Survival Guide - Chapter 10 – Process and Workflow
HL7 Survival Guide - Chapter 10 – Process and WorkflowCaristix
 
DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.Vlad Fedosov
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a databaseSon Nguyen
 
analytic engine - a common big data computation service on the aws
analytic engine - a common big data computation service on the awsanalytic engine - a common big data computation service on the aws
analytic engine - a common big data computation service on the awsScott Miao
 
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...Amazon Web Services
 

Similar to Discover/Register Everything in consul (20)

Kubernetes101 - Pune Kubernetes Meetup 6
Kubernetes101 - Pune Kubernetes Meetup 6Kubernetes101 - Pune Kubernetes Meetup 6
Kubernetes101 - Pune Kubernetes Meetup 6
 
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
 
Service Discovery and Registration in a Microservices Architecture
Service Discovery and Registration in a Microservices ArchitectureService Discovery and Registration in a Microservices Architecture
Service Discovery and Registration in a Microservices Architecture
 
Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...
 
services order
services orderservices order
services order
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
FOSDEM19 MySQL Component Infrastructure
FOSDEM19 MySQL Component InfrastructureFOSDEM19 MySQL Component Infrastructure
FOSDEM19 MySQL Component Infrastructure
 
Bluemix DevOps Services
Bluemix DevOps Services Bluemix DevOps Services
Bluemix DevOps Services
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
 
autumo ifaceX - Product Presentation
autumo ifaceX - Product Presentationautumo ifaceX - Product Presentation
autumo ifaceX - Product Presentation
 
Introduction To Apache Camel
Introduction To Apache CamelIntroduction To Apache Camel
Introduction To Apache Camel
 
Hia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyHia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economy
 
Service Discovery in MicroServices
Service Discovery in MicroServicesService Discovery in MicroServices
Service Discovery in MicroServices
 
locize tech stack
locize tech stacklocize tech stack
locize tech stack
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
HL7 Survival Guide - Chapter 10 – Process and Workflow
HL7 Survival Guide - Chapter 10 – Process and WorkflowHL7 Survival Guide - Chapter 10 – Process and Workflow
HL7 Survival Guide - Chapter 10 – Process and Workflow
 
DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a database
 
analytic engine - a common big data computation service on the aws
analytic engine - a common big data computation service on the awsanalytic engine - a common big data computation service on the aws
analytic engine - a common big data computation service on the aws
 
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...
Customer Sharing: Trend Micro - Analytic Engine - A common Big Data computati...
 

More from Leandro Totino Pereira

Backup multi-cloud solution based on named pipes
Backup multi-cloud solution based on named pipesBackup multi-cloud solution based on named pipes
Backup multi-cloud solution based on named pipesLeandro Totino Pereira
 
Monitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDB
Monitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDBMonitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDB
Monitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDBLeandro Totino Pereira
 
Gocd – Kubernetes/Nomad Continuous Deployment
Gocd – Kubernetes/Nomad Continuous DeploymentGocd – Kubernetes/Nomad Continuous Deployment
Gocd – Kubernetes/Nomad Continuous DeploymentLeandro Totino Pereira
 
Linkerd – Service mesh with service Discovery backend
Linkerd – Service mesh with service Discovery backendLinkerd – Service mesh with service Discovery backend
Linkerd – Service mesh with service Discovery backendLeandro Totino Pereira
 
DynomiteDB - No spof High-availability Redis cluster solution
DynomiteDB -  No spof High-availability Redis cluster solutionDynomiteDB -  No spof High-availability Redis cluster solution
DynomiteDB - No spof High-availability Redis cluster solutionLeandro Totino Pereira
 
DalmatinerDB and cockroachDB monitoring plataform
DalmatinerDB and cockroachDB monitoring plataformDalmatinerDB and cockroachDB monitoring plataform
DalmatinerDB and cockroachDB monitoring plataformLeandro Totino Pereira
 

More from Leandro Totino Pereira (9)

Backup multi-cloud solution based on named pipes
Backup multi-cloud solution based on named pipesBackup multi-cloud solution based on named pipes
Backup multi-cloud solution based on named pipes
 
Zabbix at scale with Elasticsearch
Zabbix at scale with ElasticsearchZabbix at scale with Elasticsearch
Zabbix at scale with Elasticsearch
 
Monitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDB
Monitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDBMonitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDB
Monitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDB
 
Automate schedule
Automate scheduleAutomate schedule
Automate schedule
 
Real time analytics
Real time analyticsReal time analytics
Real time analytics
 
Gocd – Kubernetes/Nomad Continuous Deployment
Gocd – Kubernetes/Nomad Continuous DeploymentGocd – Kubernetes/Nomad Continuous Deployment
Gocd – Kubernetes/Nomad Continuous Deployment
 
Linkerd – Service mesh with service Discovery backend
Linkerd – Service mesh with service Discovery backendLinkerd – Service mesh with service Discovery backend
Linkerd – Service mesh with service Discovery backend
 
DynomiteDB - No spof High-availability Redis cluster solution
DynomiteDB -  No spof High-availability Redis cluster solutionDynomiteDB -  No spof High-availability Redis cluster solution
DynomiteDB - No spof High-availability Redis cluster solution
 
DalmatinerDB and cockroachDB monitoring plataform
DalmatinerDB and cockroachDB monitoring plataformDalmatinerDB and cockroachDB monitoring plataform
DalmatinerDB and cockroachDB monitoring plataform
 

Recently uploaded

Computer Graphics - Windowing and Clipping
Computer Graphics - Windowing and ClippingComputer Graphics - Windowing and Clipping
Computer Graphics - Windowing and ClippingChandrakantDivate1
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docxrahulmanepalli02
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfEr.Sonali Nasikkar
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesChandrakantDivate1
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdfVinayVadlagattu
 
Scouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring methodScouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring methodvimal412355
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)ChandrakantDivate1
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationEmaan Sharma
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 
Danikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfDanikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfthietkevietthinh
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailingAshishSingh1301
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfJNTUA
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfSkNahidulIslamShrabo
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptamrabdallah9
 
Dr Mrs A A Miraje C Programming PPT.pptx
Dr Mrs A A Miraje C Programming PPT.pptxDr Mrs A A Miraje C Programming PPT.pptx
Dr Mrs A A Miraje C Programming PPT.pptxProfAAMiraje
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Studentskannan348865
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxkalpana413121
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsVIEW
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
engineering chemistry power point presentation
engineering chemistry  power point presentationengineering chemistry  power point presentation
engineering chemistry power point presentationsj9399037128
 

Recently uploaded (20)

Computer Graphics - Windowing and Clipping
Computer Graphics - Windowing and ClippingComputer Graphics - Windowing and Clipping
Computer Graphics - Windowing and Clipping
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdf
 
Scouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring methodScouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring method
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & Modernization
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Danikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfDanikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdf
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
Dr Mrs A A Miraje C Programming PPT.pptx
Dr Mrs A A Miraje C Programming PPT.pptxDr Mrs A A Miraje C Programming PPT.pptx
Dr Mrs A A Miraje C Programming PPT.pptx
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
engineering chemistry power point presentation
engineering chemistry  power point presentationengineering chemistry  power point presentation
engineering chemistry power point presentation
 

Discover/Register Everything in consul

  • 1. DISCOVER/REGISTER EVERYTHING IN CONSUL EVERYTHING DISCOVERD USING CONSUL-TEMPLATE AND CONSUL.
  • 2. AGENDA • Service Discovery introduction • Benefits • Consul service Discovery – Registration checks/services • Consul templates • Haproxy, Bind9 and iptables auto-Discovery • Demo
  • 3. INTRODUCTION The basic idea behind service discovery is for each new instance of a service (or an application) to be able to identify its current environment and store that information. For example, if you spawn a service that service must provide information to populate other service like spawn services to populate load balancer,DNS,firewall and others services.
  • 4. SERVICE DISCOVERY - BENEFITS • Centralized information for services • One or more information can be used for many services • Distribuited services can process information at the same time making faster workflow/pipeline • Simple implemention and standardized architecture for all services • Easy way to rollback or continue workflow
  • 5. CONSUL – REGISTERING CHECKS/SERVICES Registering checks to add health checks in our services, that prevent using services that are unhealthy.In our case we are going to create a unique check localhost avoiding creating a lot checks for each node. ** You can choose many checks like http,tcp,checks and TTL.
  • 6. CONSUL – REGISTERING SERVICES Registering service associating with the checks/health checks, you can add more node just modifying the ID and Address
  • 7. REGISTERING/DEREGISTERING WAYS • Nomad has fully integration with consul and you can set the registration in job config file. • Consul agent can register services/checks/ using simple json config file. • Registrator can be used to listen docker events to register on consul. • Systemd can be used with ExecStartPre, ExecStop to send registration/deregistration API. • We can send API directly from services/applications.
  • 8. CONSUL-TEMPLATE Consul Template queries a Consul servers and updates any number of config templates/ files and could reload the configuration (it´s like confd service does from CoreOS).It uses “go template” to rendering config file.
  • 9. CONSUL TEMPLATE FOR API-INTEGRATION Some services/products don´t use much config file but Most of the time it has a good API suport. So If tha´t is the case, you can still use consul template to get information from consul and convert to a json format directly.Like consul-f5 Project does. It populate a json file from consul about your instances and send API to f5 to create VS and pool. You can create servisse like this for any product which supports API.
  • 10. DEMO - CONSUL TEMPLATE • Auto-discover nodes for Load Balancer (Haproxy (tcp e http) • Auto-Discovery DNS records (Bind dns records) • Auto-Discovery iptables RULES (allow external access DNAT ) Consul Template uses go template to rendering config file and supports send notifications and exec commands after some changes (new registration/deregistration).It can be adapted for almost any case but we are going to show some basics in our case showing how powerfull is it. Following methods we are going to show:
  • 11. SERVICE DISCOVERY - HAPROXY • We are going to register 4 tags associated with the services : Port, external ip address, dns records + domain, protocol. • If a service register a “http service”, consul template is going to populate acl´s inside same frontend to send to correct backend in haproxy config file. (we setup it to use same ip address for many domains) • If a service register a “tcp service” , consul template is going to populate a new frontend with the backend associated.
  • 12. TESTING CONSUL-TEMPLATE HAPROXY IN Out As you can see we have different configs for tcp and http services. It was populated based on Tags by Consul-template.
  • 13. TESTING - SERVICE DISCOVERY - BIND
  • 14. TESTING - SERVICE DISCOVERY - IPTABLES IN Out
  • 15. TESTING ALL TOGETHER I - Checking if everything is clean
  • 17. TESTING ALL TOGETHER III – HAPROXY CONFIG FILE POPULATED
  • 18. TESTING ALL TOGETHER III – BIND/IPTABLES CONFIG FILE POPULATED