vitess-gh/go/vt/vtadmin
Frances Thai ce558fc4aa
[VTAdmin] RebuildKeyspaceGraph, RemoveKeyspaceCell, NewShard (#11249)
* Add RebuildKeyspaceGraph

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Run lint:prettier:fix

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Connect to backend

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add skeleton for RemoveKeyspaceCell

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add javascript equivalent of removeKeyspaceCell

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Connect remove keyspace cell in UI

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Run prettier

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add skeleton of create shard

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Connect CreateShard to UI

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Use underscores and fix lint issue

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Remove unused component

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Run prettier

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Restart the build

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: notfelineit <notfelineit@gmail.com>

* Undo changes to unrelated protos

Signed-off-by: notfelineit <notfelineit@gmail.com>

Signed-off-by: notfelineit <notfelineit@gmail.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: Florent Poinsard <florent.poinsard@outlook.fr>
2022-09-23 10:01:23 -07:00
..
cache Run latest gofmt on everything & address linter warnings (#11008) 2022-08-16 13:53:42 -07:00
cluster Run latest gofmt on everything & address linter warnings (#11008) 2022-08-16 13:53:42 -07:00
credentials all: gofmt -w -r 'interface{} -> any' src 2022-03-22 09:39:55 +01:00
debug all: gofmt -w -r 'interface{} -> any' src 2022-03-22 09:39:55 +01:00
errors [vtadmin] proper alias types for tablet RPCs (#10290) 2022-05-13 15:45:49 -04:00
grpcserver Run latest gofmt on everything & address linter warnings (#11008) 2022-08-16 13:53:42 -07:00
http [VTAdmin] RebuildKeyspaceGraph, RemoveKeyspaceCell, NewShard (#11249) 2022-09-23 10:01:23 -07:00
internal [vtadmin] non-blocking resolver (#10205) 2022-05-03 11:37:15 -04:00
rbac Run latest gofmt on everything & address linter warnings (#11008) 2022-08-16 13:53:42 -07:00
sort
testutil Run latest gofmt on everything & address linter warnings (#11008) 2022-08-16 13:53:42 -07:00
vtadminproto
vtctldclient update golangci-lint to 1.46.2 (#10568) 2022-06-23 13:04:28 +02:00
vtsql Run latest gofmt on everything & address linter warnings (#11008) 2022-08-16 13:53:42 -07:00
README.md add vtadmin docker image (#10543) 2022-06-26 08:02:12 -07:00
api.go [VTAdmin] RebuildKeyspaceGraph, RemoveKeyspaceCell, NewShard (#11249) 2022-09-23 10:01:23 -07:00
api_authz_test.go use individual API instances for certain test cases (#10555) 2022-06-21 14:09:14 -04:00
api_test.go [cli] [tabletserver/tabletenv] Migrate tabletenv flags to pflags (#11109) 2022-09-08 14:18:44 +02:00
debug.go [vtadmin] threadsafe dynamic clusters (#10044) 2022-04-06 11:32:32 -04:00

README.md

VTAdmin

VTAdmin is an experimental replacement for the vtctld2 web UI, that also allows users to manage multiple Vitess clusters from a single API and web UI.

For a more detailed writeup, refer to the original RFC.

Setup

The simplest VTAdmin deployment involves a single Vitess cluster. You can look at the local example for a minimal invocation of the vtadmin-api and vtadmin-web binaries.

Important vtadmin-api flags

Please refer to vtadmin --help for the full listing, but a few flags warrant explanation here.

  • --http-origin — this flag sets up the allowed CORS origins that vtadmin-api will serve HTTP requests for, and is required if you are (very likely) running vtadmin-api and vtadmin-web on different domains.

  • --cluster, --cluster-defaults — A DSN-style flag that allows cluster configuration options to be specified on the command-line rather than needing a config file. When both command-line cluster configs and a config file are provided, any options for a given cluster on the command-line take precedence over options for that cluster in the config file.

    For a description of the cluster configuration options, see clusters.example.yaml.

  • --http-tablet-url-tmpl — Go template string to generate a reachable http(s) address for a tablet, used to make passthrough requests to /debug/vars endpoints.

Development

Building vtadmin-api

If you are making changes to .proto files, make sure you run

source dev.env
make proto grpcvtctldclient vtadmin_web_proto_types

Then, you can run make build, and run ./bin/vtadmin with any flags you need (see the local example, and also the section on flags above).

Building and running vtadmin-web

Make sure you are using node version 16.x.

Then, you may run:

cd ./web/vtadmin
npm install

# This should be the address you passed to `./vtadmin --addr`. For example,
# "http://127.0.0.1:14200".
export REACT_APP_VTADMIN_API_ADDRESS="${vtadmin_api_addr}"
export REACT_APP_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARS="true"
npm run start