Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

gcloud emulator docs #2

Open
garye opened this issue Jan 27, 2017 · 3 comments
Open

gcloud emulator docs #2

garye opened this issue Jan 27, 2017 · 3 comments

Comments

@garye
Copy link

garye commented Jan 27, 2017

Just a note that the emulator is available through gcloud, as well, and the emulator is documented here: https://cloud.google.com/bigtable/docs/emulator

@rgruener
Copy link
Contributor

rgruener commented Jan 27, 2017

Nice, I will add a link in the README. A docker version is still useful for portability and integration testing. But it would actually be better to just run the emulator inside the docker container instead of the go stuff directly. Only issue would be figuring out which port its listening on.

@garye
Copy link
Author

garye commented Jan 27, 2017

You can specify the port with the gcloud command: https://cloud.google.com/sdk/gcloud/reference/beta/emulators/bigtable/start

@yusefnapora
Copy link

It turns out that you can run the bigtable emulator from google's cloud-sdk docker image

docker run -p 127.0.0.1:8086:8086 --rm -ti google/cloud-sdk gcloud beta emulators bigtable start --host-port=0.0.0.0:8086
Executing: /google-cloud-sdk/platform/bigtable-emulator/cbtemulator --host=0.0.0.0 --port=8086
[bigtable] Cloud Bigtable emulator running on [::]:8086

in a different shell (with the cbt tool installed):

export BIGTABLE_EMULATOR_HOST=localhost:8086

cbt -project foo -instance bar createtable foobar
2017/06/14 16:24:15 -creds flag unset, will use gcloud credential

cbt -project foo -instance bar ls
2017/06/14 16:24:17 -creds flag unset, will use gcloud credential
foobar

Hope that's useful :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants