From 129083b840fb4314bfe915dc40eef0624fa9bd17 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 22 Sep 2022 14:47:26 -0700 Subject: [PATCH] Export Zuul traces to Jaeger This generates TLS certs for Zuul using the jaeger CA and enables tracing on all Zuul components, exporting to tracing.opendev.org. Change-Id: I821e5ce4738ea0c93e116684033fa7b78e2da8c6 --- playbooks/roles/zuul/tasks/main.yaml | 16 ++++++++++++++++ playbooks/roles/zuul/templates/zuul.conf.j2 | 7 +++++++ 2 files changed, 23 insertions(+) diff --git a/playbooks/roles/zuul/tasks/main.yaml b/playbooks/roles/zuul/tasks/main.yaml index c90eae8f12..0a89514374 100644 --- a/playbooks/roles/zuul/tasks/main.yaml +++ b/playbooks/roles/zuul/tasks/main.yaml @@ -30,6 +30,22 @@ opendev_ca_cert_dir_owner: "{{ zuul_user_id }}" opendev_ca_cert_dir_group: "{{ zuul_group_id }}" +- name: Create Jaeger Config dir + file: + state: directory + path: /etc/zuul/jaeger + owner: "{{ zuul_user }}" + group: "{{ zuul_group }}" + +- name: Generate Jaeger TLS cert + include_role: + name: opendev-ca + vars: + opendev_ca_name: jaeger + opendev_ca_cert_dir: /etc/zuul/jaeger + opendev_ca_cert_dir_owner: "{{ zuul_user_id }}" + opendev_ca_cert_dir_group: "{{ zuul_group_id }}" + - name: Write Zuul Conf File template: src: zuul.conf.j2 diff --git a/playbooks/roles/zuul/templates/zuul.conf.j2 b/playbooks/roles/zuul/templates/zuul.conf.j2 index 6efb8faf2e..bfe8328eff 100644 --- a/playbooks/roles/zuul/templates/zuul.conf.j2 +++ b/playbooks/roles/zuul/templates/zuul.conf.j2 @@ -69,6 +69,13 @@ realm=zuul issuer_id=https://keycloak.opendev.org/auth/realms/zuul client_id=zuul +[tracing] +enabled=true +endpoint=tracing.opendev.org:4317 +tls_cert=/etc/zuul/jaeger/certs/cert.pem +tls_key=/etc/zuul/jaeger/keys/key.pem +tls_ca=/etc/zuul/jaeger/certs/cacert.pem + {% for connection in zuul_connections -%} [connection "{{ connection['name'] }}"] {% for key, value in connection.items() -%}