Skip to content

Commit

Permalink
Update local_setup.md (elastic#115169) (elastic#115265)
Browse files Browse the repository at this point in the history
Co-authored-by: Søren Louv-Jansen <[email protected]>
  • Loading branch information
kibanamachine and sorenlouv authored Oct 15, 2021
1 parent 8239f64 commit f1d320f
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions x-pack/plugins/apm/dev_docs/local_setup.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
## Local environment setup

### Kibana
# Start Kibana

```
git clone [email protected]:elastic/kibana.git
Expand All @@ -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 [email protected]: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:
Expand All @@ -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_power_user**: Read+write user.
- **apm_read_user**: Read only 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.

Expand Down

0 comments on commit f1d320f

Please sign in to comment.