Document interactive setup (#163619)

## Summary

Add instruction for developer on how to run interactive setup locally

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Thom Heymann 2023-08-11 12:14:45 +01:00 committed by GitHub
parent a98dfa1c89
commit 1f79ff4f1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 3 deletions

View file

@ -215,7 +215,7 @@ in Kibana, e.g. visualizations. It has the form of a flyout panel.
|{kib-repo}blob/{branch}/src/plugins/interactive_setup/README.md[interactiveSetup]
|The plugin provides UI and APIs for the interactive setup mode.
|This plugin provides UI and APIs for interactive setup mode a.k.a "enrollment flow".
|{kib-repo}blob/{branch}/src/plugins/kibana_overview/README.md[kibanaOverview]

View file

@ -1,3 +1,43 @@
# `interactiveSetup` plugin
# Interactive Setup Plugin
The plugin provides UI and APIs for the interactive setup mode.
This plugin provides UI and APIs for interactive setup mode a.k.a "enrollment flow".
## How to run interactive setup locally
Kibana does not start interactive setup mode if it detects that an Elasticsearch connection has already been configured. This is always the case when running `yarn start` so in order to trigger interactive setup we need to run Elasticsearch manually and pass a special command line flag to the Kibana start command.
1. Start a clean copy of Elasticsearch from inside your Kibana working directory:
```
cd <kibana-repo>/.es/cache
tar -xzf elasticsearch-8.10.0-SNAPSHOT-darwin-aarch64.tar.gz
cd ./elasticsearch-8.10.0-SNAPSHOT
./bin/elasticsearch
```
You should see the enrollment token get logged:
```
Elasticsearch security features have been automatically configured!
• Copy the following enrollment token and paste it into Kibana in your browser:
eyJ2ZXIiOiI4LjEwLjAiLCJhZHIiOlsiMTkyLjE2OC4xLjIxMTo5MjAwIl0sImZnciI6ImZiYWZjOTgxODM0MjAwNzQ0M2ZhMzNmNTQ2N2QzMTM0YTk1NzU2NjEwOTcxNmJmMjdlYWViZWNlYTE3NmM3MTkiLCJrZXkiOiJxdVVQallrQkhOTkFxOVBqNEY0ejpZUkVMaFR5ZlNlZTZGZW9PQVZwaDRnIn0=
```
2. Start Kibana without dev credentials and config:
```
yarn start --no-dev-credentials --no-dev-config
```
You should see the magic link get logged:
```
i Kibana has not been configured.
Go to http://localhost:5601/tcu/?code=651822 to get started.
```
3. Open the link and copy the enrollment token from Elasticsearch when prompted to complete setup.
Note: If you want to go through the enrollment flow again you will need to clear all Elasticsearch settings (`elasticsearch.*`) from your `kibana.yml` file and trash your Elasticsearch folder before starting with Step 1.