mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-10-18 04:43:12 +02:00
Produce OpenTelemetry metrics (#185)
* .golangci.yml: remove mentions of deprecated linters * Fix "staticcheck" linter error by using grpc.NewClient * Configure OpenTelemetry Metrics only for now. * Produce OpenTelemetry metrics * Update DeploymentGuide.md Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com> * Update DeploymentGuide.md Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com> * Introduce "org.cirruslabs.orchard.controller.worker_status" --------- Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
This commit is contained in:
co-authored by
Fedor Korotkov
parent
1f5bb26d20
commit
ff0497b1d8
+24
-1
@@ -126,13 +126,36 @@ orchard context default production
|
||||
|
||||
## Configuring Orchard Workers
|
||||
|
||||
First, create a service account limited with a minimal set of roles required for proper worker functioning:
|
||||
|
||||
```bash
|
||||
orchard create service-account worker-pool-m1 --roles "compute:read" --roles "compute:write"
|
||||
```
|
||||
|
||||
Then, generate a bootstrap token:
|
||||
|
||||
```shell
|
||||
orchard get bootstrap-token worker-pool-m1
|
||||
```
|
||||
|
||||
## Configuring Orchard Workers
|
||||
Then, for each worker machine, start the worker as follows:
|
||||
|
||||
```shell
|
||||
orchard worker run --bootstrap-token <bootstrap token from the step above> <controller URL>
|
||||
```
|
||||
|
||||
### Automation
|
||||
|
||||
If you have a set of machines that you want to use as Orchard Workers, you can use Ansible to configure them.
|
||||
Please refer a [separate repository](https://github.com/cirruslabs/ansible-orchard) where we prepared a basic
|
||||
Ansible playbook for convenient setup.
|
||||
|
||||
## Observability
|
||||
|
||||
Both the controller and worker produce some useful OpenTelemetry metrics. Metrics are scoped with `org.cirruslabs.orchard` prefix and include information about resource utilization, statuses or workers, scheduling/pull time and many more.
|
||||
|
||||
By default, the telemetry is sent to https://localhost:4317 using the gRPC protocol and to http://localhost:4318 using the HTTP protocol.
|
||||
|
||||
You can override this by setting the [standard OpenTelemetry environment variable](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/) `OTEL_EXPORTER_OTLP_ENDPOINT`.
|
||||
|
||||
Please refer to [OTEL Collector documentation](https://opentelemetry.io/docs/collector/) for instruction on how to setup a sidecar for the metrics collections or find out if your SaaS monitoring has an available OTEL endpoint (see [Honeycomb](https://docs.honeycomb.io/send-data/opentelemetry/) as an example).
|
||||
|
||||
Reference in New Issue
Block a user