vitess.io/vitess@v0.16.2/go/vt/vtadmin/README.md (about) 1 # VTAdmin 2 3 VTAdmin is web UI and API that allows users to manage multiple Vitess clusters at once. 4 5 For a more detailed writeup, refer to the [original RFC](https://github.com/vitessio/vitess/issues/7117). 6 7 ## Setup 8 9 The simplest VTAdmin deployment involves a single Vitess cluster. You can look 10 at the [local example](../../../examples/local/scripts/vtadmin-up.sh) for a 11 minimal invocation of the `vtadmin-api` and `vtadmin-web` binaries. 12 13 ### Important `vtadmin-api` flags 14 15 Please refer to `vtadmin --help` for the full listing, but a few flags warrant 16 explanation here. 17 18 * `--http-origin` — this flag sets up the allowed CORS origins that `vtadmin-api` 19 will serve HTTP requests for, and is required if you are (very likely) running 20 `vtadmin-api` and `vtadmin-web` on different domains. 21 * `--cluster`, `--cluster-defaults` — A [DSN-style][dsn] flag that allows cluster 22 configuration options to be specified on the command-line rather than needing 23 a config file. When both command-line cluster configs and a config file are 24 provided, any options for a given cluster on the command-line take precedence 25 over options for that cluster in the config file. 26 27 For a description of the cluster configuration options, see [clusters.example.yaml](../../../doc/vtadmin/clusters.yaml). 28 29 * `--http-tablet-url-tmpl` — Go template string to generate a reachable http(s) 30 address for a tablet, used to make passthrough requests to `/debug/vars` 31 endpoints. 32 33 [dsn]: https://www.percona.com/doc/percona-toolkit/LATEST/dsn_data_source_name_specifications.html 34 35 ## Development 36 37 ### Building `vtadmin-api` 38 39 If you are making changes to `.proto` files, make sure you run 40 41 ``` 42 source dev.env 43 make proto grpcvtctldclient vtadmin_web_proto_types 44 ``` 45 46 Then, you can run `make build`, and run `./bin/vtadmin` with any flags you need 47 (see the local example, and also the section on flags above). 48 49 ### Building and running `vtadmin-web` 50 51 Make sure you are using node version 16.x. 52 53 Then, you may run: 54 55 ``` 56 cd ./web/vtadmin 57 npm install 58 59 # This should be the address you passed to `./vtadmin --addr`. For example, 60 # "http://127.0.0.1:14200". 61 export REACT_APP_VTADMIN_API_ADDRESS="${vtadmin_api_addr}" 62 export REACT_APP_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARS="true" 63 npm run start 64 ```