Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose vtctld gRPC port in local Docker example + update VTAdmin README #7306

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/local/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker run -p 15000:15000 -p 15001:15001 -p 15991:15991 --rm -it vitess/local
docker run -p 15000:15000 -p 15001:15001 -p 15991:15991 -p 15999:15999 --rm -it vitess/local
23 changes: 12 additions & 11 deletions web/vtadmin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In this section, we'll get vtadmin-web, vtadmin-api, and Vitess all running loca
./docker/local/run.sh
```

1. Create an empty vtgate credentials file to avoid the gRPC dialer bug mentioned in https://github.com/vitessio/vitess/pull/7187. Location and filename don't matter since you'll be passing this in as a flag; I put mine at ` /Users/sarabee/id1-grpc_vtgate_credentials.json`:
1. Create an empty vtgate credentials file to avoid the gRPC dialer bug mentioned in https://github.com/vitessio/vitess/pull/7187. Location and filename don't matter since you'll be passing this in as a flag; I put mine at ` /Users/sarabee/vtadmin-creds.json`:

```json
{
Expand All @@ -28,14 +28,14 @@ In this section, we'll get vtadmin-web, vtadmin-api, and Vitess all running loca
{
"host": {
"hostname": "127.0.0.1:15991"
},
"tags": ["pool:pool1", "cell:zone1", "extra:tag"]
},
}
}
],
"vtctlds": [
{
"host": {
"hostname": "127.0.0.1:15992"
},
"tags": ["dead-dove-do-not-eat"]
"hostname": "127.0.0.1:15999"
}
}
]
}
Expand All @@ -47,17 +47,18 @@ In this section, we'll get vtadmin-web, vtadmin-api, and Vitess all running loca
make build

./bin/vtadmin \
--addr ":15999" \
--cluster-defaults "vtsql-credentials-path-tmpl=/Users/sarabee/id1-grpc_vtgate_credentials.json" \
--cluster "name=cluster1,id=id1,discovery=staticFile,discovery-staticFile-path=/Users/sarabee/vtadmin-cluster1.json,vtsql-discovery-tags=cell:zone1"
--addr ":14200" \
--cluster-defaults "vtctld-credentials-path-tmpl=/Users/sarabee/vtadmin-creds.json,vtsql-credentials-path-tmpl=/Users/sarabee/vtadmin-creds.json" \
--cluster "name=cluster1,id=id1,discovery=staticFile,discovery-staticFile-path=/Users/sarabee/vtadmin-cluster1.json" \
--http-origin=http://localhost:3000
```

1. Finally! Start up vtadmin-web on [http://localhost:3000](http://localhost:3000), pointed at the vtadmin-api server you started in the last step.

```bash
cd web/vtadmin
npm install
REACT_APP_VTADMIN_API_ADDRESS="http://127.0.0.1:15999" npm start
REACT_APP_VTADMIN_API_ADDRESS="http://127.0.0.1:14200" npm start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:chef-kiss:

```

# Developer guide
Expand Down