Skip to content

Commit 8ed9c36

Browse files
chore: update README (#606)
1 parent ddd263b commit 8ed9c36

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

+39
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
Local viewer for YDB clusters
44

5+
[Docs for users](https://ydb.tech/en/docs/maintenance/embedded_monitoring/ydb_monitoring)
6+
7+
## Preview
8+
9+
You can preview working UI using YDB docker image. It will be UI with the latest stable ydb version.
10+
11+
Run on a machine with Docker installed:
12+
```
13+
docker pull cr.yandex/yc/yandex-docker-local-ydb
14+
docker run -dp 8765:8765 cr.yandex/yc/yandex-docker-local-ydb
15+
```
16+
517
## Development
618

719
1. Run on a machine with Docker installed:
@@ -15,6 +27,21 @@ Local viewer for YDB clusters
1527

1628
For API reference, open Swagger UI on http://localhost:8765/viewer/api/.
1729

30+
### YDB docker images
31+
32+
[Docs on YDB docker images](https://ydb.tech/en/docs/getting_started/self_hosted/ydb_docker)
33+
34+
Image `cr.yandex/yc/yandex-docker-local-ydb` corresponds to `:latest` tag. It's the latest stable ydb version.
35+
36+
To test new features, you can use ydb version that is currently in testing mode with `cr.yandex/yc/yandex-docker-local-ydb:edge` image. Also you can set specific version like `cr.yandex/yc/yandex-docker-local-ydb:23.1`
37+
38+
### Custom backend in dev mode
39+
40+
YDB docker represents a single node cluster with only one version, small amount of storage groups, PDisks and VDisks. It may be not enough for development purposes. If you have your own development cluster with sufficient amount of entities, you can run the app in the dev mode with this cluster as backend. To do it, set you host to `REACT_APP_BACKEND` variable in `dev` script. For example:
41+
```
42+
"dev": "DISABLE_ESLINT_PLUGIN=true TSC_COMPILE_ON_ERROR=true REACT_APP_BACKEND=http://your-cluster-host:8765 npm start"
43+
```
44+
1845
## E2E Tests
1946

2047
For e2e tests we use `@playwright/tests`. Tests configuration is in `playwright.config.ts`. Tests are set up in `tests` dir.
@@ -49,3 +76,15 @@ To test production bundle with latest YDB backend release, do the following:
4976
1. Build a production bundle with a few tweaks for embedded version: `npm run build:embedded`.
5077
2. Invoke `docker run -it --hostname localhost -dp 2135:2135 -p 8765:8765 -v ~/projects/ydb-embedded-ui/build:/ydb_data/node_1/contentmonitoring cr.yandex/yc/yandex-docker-local-ydb:latest`
5178
3. Open [embedded YDB UI](http://localhost:8765/monitoring) to view it in the browser.
79+
80+
### Testing production bundle with specific cluster host
81+
82+
If you want to test embedded version in production mode, but YDB docker is not enough and you have your own ydb development cluster, you can manually update UI for the specific cluster host.
83+
84+
It also could be usefull for development purposes, because some operations, that are not 'read-only', like some update queries or tablets restart could be allowed by CORS only for the same origin and so could not be executed in dev mode.
85+
86+
1. Create production bundle with `npm run build:embedded`
87+
2. Copy your build files from `build` folder to `/contentmonitoring` folder on desired cluster host
88+
3. Open `http://your-cluster-host:8765/monitoring` to see updated UI
89+
90+
It's assumed, that you have all the necessary access rights to update files on the host.

0 commit comments

Comments
 (0)