Things like Infrastructure as Code, Service Discovery and Config Management can and have helped us to quickly build and rebuild infrastructure but we haven't nearly spend enough time to train our self to review, monitor and respond to outages. Does our platform degrade in a graceful way or what does a high cpu load really mean? What can we learn from level 1 outages to be able to run our platforms more reliably.
We all love infrastructure as code, we automate everything ™. However making sure all of our infrastructure assets are monitored effectively can be slow and resource intensive multi stage process. During this talk we will investigate how we can setup and observe a service mesh platform using HashiCorp's Consul Connect by recording its metrics. logs and traces.
This talk will focus on configuring and analysing the metrics, logs and traces Consul Connect produces using Prometheus, Loki, Tempo and Grafana.
2. ➔Used to be a Molecular Biologist,
Used to be a Molecular Biologist,
➔Then became a Dev,
Then became a Dev,
➔Now an Ops.
Now an Ops.
➔Currently
Currently CTO @ Hot Potatoes
CTO @ Hot Potatoes
➔Today Proud Dad
Today Proud Dad
8. service {
name = "counting"
port = 9003
check {
id = "counting-check"
http = "http://localhost:9003/health"
interval = "1s"
timeout = "1s"
}
}
Consul Service Definition
9. dig @127.0.0.1 -p 8600 counting.service.consul. ANY
zone "consul" IN {
type forward;
forward only;
forwarders { 127.0.0.1 port 8600; };
};
Consul Service Usage
11. Service {
name = "counting"
port = 9003
connect {
sidecar_service {
proxy {
}
}
}
check {
id = "counting-check"
http = "http://localhost:9003/health"
interval = "1s"
timeout = "1s"
}
}
Consul Connect Declaration
12. service {
name = "dashboard"
port = 9002
connect {
sidecar_service {
proxy {
upstreams = [
{
destination_name = "counting"
local_bind_port = 5000
}
]
}
}
}
}
Connect to a service
13. consul connect proxy -sidecar-for counting > counting-proxy.log &
consul connect proxy -sidecar-for dashboard > dashboard-proxy.log &
Fire up those connections
14. Power of the service mesh
https://learn.hashicorp.com/tutorials/consul/service-mesh-with-envoy-proxy
consul intention create dashboard counting