Update local_setup.md (#115169)

This commit is contained in:
Søren Louv-Jansen 2021-10-15 21:19:47 +02:00 committed by GitHub
parent 9a15bee8b6
commit 10103325b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,4 @@
## Local environment setup
### Kibana
# Start Kibana
```
git clone git@github.com:elastic/kibana.git
@ -9,25 +7,35 @@ yarn kbn bootstrap
yarn start --no-base-path
```
### APM Server, Elasticsearch and data
# Elasticsearch, APM Server and data generators
To access an elasticsearch instance that has live data you have two options:
#### A. Connect to Elasticsearch on Cloud (internal devs only)
## A. Cloud-based ES Cluster (internal devs only)
Find the credentials for the cluster [here](https://github.com/elastic/observability-dev/blob/master/docs/observability-clusters.md)
Use the [oblt-cli](https://github.com/elastic/observability-test-environments/blob/master/tools/oblt_cli/README.md) to connect to a cloud-based ES cluster.
#### B. Start Elastic Stack and APM data generators
## B. Local ES Cluster
### Start Elasticsearch and APM data generators
_Docker Compose is required_
```
git clone git@github.com:elastic/apm-integration-testing.git
cd apm-integration-testing/
./scripts/compose.py start master --all --no-kibana
```
_Docker Compose is required_
### Connect Kibana to Elasticsearch
### Setup default APM users
Update `config/kibana.dev.yml` with:
```yml
elasticsearch.hosts: http://localhost:9200
elasticsearch.username: admin
elasticsearch.password: changeme
```
# Setup default APM users
APM behaves differently depending on which the role and permissions a logged in user has. To create the users run:
@ -37,11 +45,10 @@ node x-pack/plugins/apm/scripts/create-apm-users-and-roles.js --username admin -
This will create:
**apm_read_user**: Read only user
- **apm_read_user**: Read only user
- **apm_power_user**: Read+write user.
**apm_power_user**: Read+write user.
## Debugging Elasticsearch queries
# Debugging Elasticsearch queries
All APM api endpoints accept `_inspect=true` as a query param that will output all Elasticsearch queries performed in that request. It will be available in the browser response and on localhost it is also available in the Kibana Node.js process output.