add Jaeger distributed tracing

This commit is contained in:
Tim Park 2018-11-19 16:21:42 -08:00
Родитель 8792248239
Коммит f164a22772
4 изменённых файлов: 37 добавлений и 21 удалений

1
.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1 @@
.terraform

Просмотреть файл

@ -21,13 +21,17 @@ Monitoring
Log Management
- [Fluentd](https://www.fluentd.org/) log collection and forwarding
- [Elasticsearch](https://www.elastic.co/) log aggregation
- [Fluentd](https://www.fluentd.org/) collection and forwarding
- [Elasticsearch](https://www.elastic.co/) aggregation
- [Kibana](https://www.elastic.co/products/kibana) querying and visualization
Ingress
Traffic Ingress
- [Traefik](https://traefik.io/) ingress controller
- [Traefik](https://traefik.io/) ingress controller automatically integrated with Jaeger.
Distributed Tracing
- [Jaeger](https://www.jaegertracing.io/) end to end distributed tracing.
## Getting Started
@ -37,7 +41,7 @@ Ingress
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
- [helm](https://helm.sh/)
2. If you haven't, create a new Kubernetes cluster with RBAC enabled and ensure that it is the default context `kubectl` is using.
2. If you haven't, create a new Kubernetes cluster with RBAC enabled and switch to it such that it is the default context `kubectl` is using.
3. Clone this project locally:

Просмотреть файл

@ -6,12 +6,6 @@ module "prometheus" {
prometheus_server_storage_size = "${var.prometheus_server_storage_size}"
}
module "kured" {
source = "git::https://github.com/timfpark/terraform-helm-kured.git"
prometheus_service_endpoint = "${module.prometheus.prometheus_service_endpoint}"
}
module "grafana" {
source = "git::https://github.com/timfpark/terraform-helm-grafana.git"
@ -23,17 +17,10 @@ module "grafana" {
dashboard_yaml = "${file("config/common/grafana-dashboards.yaml")}"
}
module "traefik" {
source = "git::https://github.com/timfpark/terraform-helm-traefik.git"
module "kured" {
source = "git::https://github.com/timfpark/terraform-helm-kured.git"
ingress_replica_count = "${var.ingress_replica_count}"
ssl_enabled = "${var.traefik_ssl_enabled}"
ssl_enforced = "${var.traefik_ssl_enforced}"
prometheus_enabled = "true"
ssl_cert_base64 = "${base64encode(file("config/common/tls/wildcard.domain.io.crt"))}"
ssl_key_base64 = "${base64encode(file("config/common/tls/wildcard.domain.io.key"))}"
prometheus_service_endpoint = "${module.prometheus.prometheus_service_endpoint}"
}
module "elasticsearch" {
@ -55,3 +42,24 @@ module "kibana" {
elasticsearch_client_endpoint = "${module.elasticsearch.elasticsearch_client_endpoint}"
}
module "jaeger" {
source = "git::https://github.com/timfpark/terraform-helm-jaeger.git"
elasticsearch_client_endpoint = "${module.elasticsearch.elasticsearch_client_endpoint}"
}
module "traefik" {
source = "git::https://github.com/timfpark/terraform-helm-traefik.git"
ingress_replica_count = "${var.ingress_replica_count}"
ssl_enabled = "${var.traefik_ssl_enabled}"
ssl_enforced = "${var.traefik_ssl_enforced}"
ssl_cert_base64 = "${base64encode(file("config/common/tls/wildcard.domain.io.crt"))}"
ssl_key_base64 = "${base64encode(file("config/common/tls/wildcard.domain.io.key"))}"
prometheus_enabled = "true"
tracing_enabled = "true"
jaeger_agent_endpoint = "${module.jaeger.agent_endpoint}"
}

3
tools/jaeger Executable file
Просмотреть файл

@ -0,0 +1,3 @@
export JAEGER_POD=$(kubectl get pods -n jaeger -l "component=query" -o jsonpath="{.items[0].metadata.name}")
`sleep 1 && open http://localhost:16686/` &
kubectl -n jaeger port-forward $JAEGER_POD 16686