Skip to content

Commit

Permalink
Merge pull request #7306 from tinyspeck/sarabee-vtadmin-docker-vtctld…
Browse files Browse the repository at this point in the history
…s-and-you

Expose vtctld gRPC port in local Docker example + update VTAdmin README
  • Loading branch information
rohit-nayak-ps authored Jan 15, 2021
2 parents 147d196 + f124a0d commit 0fa0fc7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
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
```

# Developer guide
Expand Down

0 comments on commit 0fa0fc7

Please sign in to comment.