# generate ca and tls certs for elasticsearch cluster
start a `bash` in an elasticsearch image, such as `docker.elastic.co/elasticsearch/elasticsearch:7.17.0`: `docker run -ti docker.elastic.co/elasticsearch/elasticsearch:7.17.0 bash`
- on index `apm-*` privileges `create_doc`, `create_index`, `view_index_metadata`
- on index `apm-*sourcemap` privilege `read_cross_cluster`
create user `apm` with roles `apm_writer` and `apm_system`. give it a randomly generated password that you save in `secrets/telemetry/elastic_passwords/apm`
check apm data is ingested correctly (visible in kibana)
# create role and user for grafana
create role `grafana`, give privileges:
- on index `apm-*` privileges `read` and `view_index_metadata`
create user `grafana` with role `grafana`. give it a randomly generated password that you save in `secrets/telemetry/elastic_passwords/grafana`