-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move work from tempo-k8s@tempo-coordinator
- Loading branch information
1 parent
c44df77
commit 5931889
Showing
86 changed files
with
15,353 additions
and
1,082 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Deploying Tempo | ||
|
||
To manually test and develop tempo: | ||
|
||
charmcraft pack | ||
charmcraft pack -p ./tests/integration/tester/ | ||
j deploy ./tempo-k8s_ubuntu-22.04-amd64.charm tempo --resource tempo-image=grafana/tempo:2.4.0 | ||
|
||
you need to always deploy at least 2 units of tester: | ||
|
||
j deploy ./tester_ubuntu-22.04-amd64.charm tester -n 3 --resource workload=python:slim-buster | ||
j relate tempo:tracing tester:tracing | ||
|
||
# Object storage | ||
|
||
In order to test tempo with object storage (using [minio charm](https://github.com/canonical/minio-operator)), | ||
you can do the following (replace YOUR_MINIO_ACCESS_KEY and YOUR_MINIO_SECRET with anything you want as long as the | ||
secret is more than 8 characters): | ||
|
||
Deploy minio: | ||
``` | ||
juju deploy minio --channel edge --trust | ||
juju config minio access-key=YOUR_MINIO_ACCESS_KEY | ||
juju config minio secret-key=YOUR_MINIO_SECRET | ||
``` | ||
|
||
Deploy mc and set up buckets: | ||
``` | ||
sudo snap install minio-client --edge --devmode | ||
kubectl port-forward service/minio -n test-minio 9000:9000 | ||
minio-client config host add local http://localhost:9000 YOUR_MINIO_ACCESS_KEY YOUR_MINIO_SECRET | ||
minio-client mb local/tempo | ||
``` | ||
|
||
Deploy and configure s3-integrator: | ||
``` | ||
juju deploy s3-integrator | ||
juju config s3-integrator endpoint=http://MINIO_IP_ADDRESS:9000 | ||
juju config s3-integrator bucket=tempo | ||
juju run s3-integrator/leader sync-s3-credentials access-key=YOUR_MINIO_ACCESS_KEY secret-key=YOUR_MINIO_SECRET | ||
``` | ||
|
||
Deploy tempo: | ||
``` | ||
juju deploy ./tempo-k8s_ubuntu-22.04-amd64.charm tempo --resource tempo-image=grafana/tempo:2.4.0 | ||
juju integrate tempo s3-integrator | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,28 @@ | ||
# Tempo Coordinator charm for Kubernetes | ||
# Tempo Operator | ||
|
||
[](https://charmhub.io/tempo-coordinator-k8s) | ||
[](https://github.com/canonical/tempo-coordinator-k8s-operator/actions/workflows/release.yaml) | ||
[](https://charmhub.io/tempo-k8s) | ||
[](https://github.com/canonical/tempo-k8s-operator/actions/workflows/release.yaml) | ||
[](https://discourse.charmhub.io) | ||
|
||
## Description | ||
This repository contains the source code for a Charmed Operator that drives [Tempo] on Kubernetes. | ||
|
||
This charm serves as a coordinator for a Tempo HA deployment, together with the [tempo-worker-k8s](https://github.com/canonical/tempo-worker-k8s-operator) charm. | ||
## Usage | ||
|
||
Assuming you have access to a bootstrapped Juju controller on Kubernetes, you can: | ||
|
||
```bash | ||
$ juju deploy tempo-k8s # --trust (use when cluster has RBAC enabled) | ||
``` | ||
|
||
## OCI Images | ||
|
||
This charm, by default, deploys `grafana/tempo:2.4.0`. | ||
|
||
## Contributing | ||
|
||
See the [Juju SDK documentation](https://juju.is/docs/sdk) for more information about developing and improving charms. | ||
Please see the [Juju SDK docs](https://juju.is/docs/sdk) for guidelines | ||
on enhancements to this charm following best practice guidelines, and the | ||
[contributing] doc for developer guidance. | ||
|
||
[Tempo]: https://grafana.com/traces/ | ||
[contributing]: https://github.com/PietroPasotti/tempo-k8s-operator/blob/main/CONTRIBUTING.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,136 @@ | ||
# This file configures Charmcraft. | ||
# See https://juju.is/docs/sdk/charmcraft-config for guidance. | ||
|
||
# Copyright 2022 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
name: tempo-k8s | ||
type: charm | ||
|
||
assumes: | ||
- k8s-api | ||
|
||
# Juju 3.4.0 needed for pebble notify | ||
- juju >= 3.4.0 | ||
|
||
description: | | ||
Tempo is a distributed tracing backend by Grafana, supporting Jaeger, | ||
Zipkin, and OpenTelemetry protocols. | ||
summary: | | ||
Tempo is a distributed tracing backend by Grafana. | ||
links: | ||
documentation: https://discourse.charmhub.io/t/tempo-k8s-docs-index/14005 | ||
website: | ||
- https://charmhub.io/tempo-k8s | ||
source: | ||
- https://github.com/canonical/tempo-k8s-operator | ||
issues: | ||
- https://github.com/canonical/tempo-k8s-operator/issues | ||
|
||
containers: | ||
tempo: | ||
resource: tempo-image | ||
mounts: | ||
- storage: data | ||
location: /tmp/tempo | ||
|
||
resources: | ||
tempo-image: | ||
type: oci-image | ||
description: OCI image for Tempo | ||
# Included for simplicity in integration tests | ||
# see https://hub.docker.com/r/grafana/tempo/tags | ||
upstream-source: grafana/tempo:2.4.0 | ||
|
||
provides: | ||
tempo-cluster: | ||
interface: tempo_cluster | ||
description: | | ||
Connect any number of tempo-worker-k8s charms to cluster the Tempo components off to different nodes. | ||
grafana-dashboard: | ||
interface: grafana_dashboard | ||
description: | | ||
Forwards the built-in grafana dashboard(s) for monitoring Tempo. | ||
grafana-source: | ||
interface: grafana_datasource | ||
description: | | ||
Configures Grafana to be able to use this Tempo instance as a datasource. | ||
metrics-endpoint: | ||
interface: prometheus_scrape | ||
description: | | ||
Exposes the Prometheus metrics endpoint providing telemetry about the | ||
Tempo instance. | ||
tracing: | ||
interface: tracing | ||
description: | | ||
Integration to offer other charms the possibility to send traces to Tempo. | ||
requires: | ||
s3: | ||
interface: s3 | ||
limit: 1 | ||
description: | | ||
Obtains access to the s3 bucket for data storage. | ||
logging: | ||
interface: loki_push_api | ||
description: | | ||
Integration with Loki to push Tempo logs to the observability stack. | ||
ingress: | ||
interface: traefik_route | ||
description: | | ||
Ingress integration for Tempo server and Tempo receiver endpoints, | ||
so that cross-model workloads can send their traces to Tempo through the ingress. | ||
Uses `traefik_route` to open ports on Traefik host for tracing ingesters. | ||
certificates: | ||
interface: tls-certificates | ||
limit: 1 | ||
description: | | ||
Certificate and key files for securing Tempo internal and external | ||
communications with TLS. | ||
storage: | ||
data: | ||
type: filesystem | ||
location: /tempo-data | ||
|
||
actions: | ||
list-receivers: | ||
description: | | ||
Returns a list of all enabled receiver endpoints. | ||
peers: | ||
tempo-peers: | ||
interface: tempo_peers | ||
description: | | ||
peer relation for internal coordination | ||
config: | ||
options: | ||
coordinator_runs_workload_when_clustered: | ||
type: boolean | ||
default: true | ||
description: | | ||
Whether this charm should also run a worker node when related | ||
to any number of specialized worker applications. | ||
Set it to ``false`` if you want this charm to stop running `Tempo` | ||
as soon as you integrate it with a tempo-worker-k8s-charm instance. | ||
In this case, tempo-k8s will only act as coordinator | ||
(and reverse proxy) for the tempo cluster. | ||
bases: | ||
- build-on: | ||
- name: ubuntu | ||
channel: "22.04" | ||
- name: "ubuntu" | ||
channel: "22.04" | ||
run-on: | ||
- name: ubuntu | ||
channel: "22.04" | ||
- name: "ubuntu" | ||
channel: "22.04" | ||
|
||
parts: | ||
charm: | ||
charm-binary-python-packages: | ||
- pydantic>2.0 | ||
|
||
# For v2.tls_certificates | ||
- cryptography | ||
- jsonschema | ||
|
||
cos-tool: | ||
plugin: dump | ||
source: . | ||
build-packages: | ||
- curl | ||
override-pull: | | ||
curl -L -O https://github.com/canonical/cos-tool/releases/latest/download/cos-tool-${CRAFT_TARGET_ARCH} | ||
chmod +x cos-tool-* | ||
- "pydantic>=2" | ||
- "cryptography" | ||
- "jsonschema" | ||
- "opentelemetry-exporter-otlp-proto-http==1.21.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.